
public class OHazelcastPlugin extends ODistributedAbstractPlugin implements com.hazelcast.core.MembershipListener, com.hazelcast.core.EntryListener<String,Object>
ODistributedServerManager.DB_STATUS, ODistributedServerManager.NODE_STATUSODatabaseLifecycleListener.PRIORITY| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_DATABASE_PREFIX |
protected static String |
CONFIG_DBSTATUS_PREFIX |
protected static String |
CONFIG_NODE_PREFIX |
protected static String |
CONFIG_REGISTEREDNODES |
protected OHazelcastDistributedMap |
configurationMap |
protected String |
hazelcastConfigFile |
protected com.hazelcast.core.HazelcastInstance |
hazelcastInstance |
protected String |
membershipListenerMapRegistration |
protected String |
membershipListenerRegistration |
activeNodes, activeNodesNamesByMemberId, clusterAssignmentStrategy, defaultDatabaseConfigFile, DEPLOY_DB_MAX_RETRIES, enabled, lastClusterChangeOn, lastLSNWriting, listeners, localMessageIdCounter, messageService, NODE_NAME_ENV, nodeId, nodeName, nodeUuid, PAR_DEF_DISTRIB_DB_CONFIG, publishLocalNodeConfigurationTask, registeredNodeById, registeredNodeByName, remoteServers, REPLICATOR_USER, serverInstance, startedOn, status, storages, taskFactoryFILE_DISTRIBUTED_DB_CONFIG| Constructor and Description |
|---|
OHazelcastPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
config(OServer iServer,
OServerParameterConfiguration[] iParams)
Configures the handler.
|
protected com.hazelcast.core.HazelcastInstance |
configureHazelcast() |
Throwable |
convertException(Throwable original) |
void |
entryAdded(com.hazelcast.core.EntryEvent<String,Object> iEvent) |
void |
entryEvicted(com.hazelcast.core.EntryEvent<String,Object> iEvent) |
void |
entryRemoved(com.hazelcast.core.EntryEvent<String,Object> iEvent) |
void |
entryUpdated(com.hazelcast.core.EntryEvent<String,Object> iEvent) |
ConcurrentMap<String,Object> |
getConfigurationMap() |
ODistributedServerManager.DB_STATUS |
getDatabaseStatus(String iNode,
String iDatabaseName) |
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance() |
protected ODistributedConfiguration |
getLastDatabaseConfiguration(String databaseName) |
Lock |
getLock(String iName)
Gets a distributed lock
|
ODocument |
getNodeConfigurationByUuid(String iNodeId) |
protected void |
installNewDatabasesFromCluster(boolean iStartup) |
protected ODocument |
loadDatabaseConfiguration(String iDatabaseName,
File file,
boolean saveCfgToDisk) |
protected void |
loadLocalDatabases()
Initializes all the available server's databases as distributed.
|
void |
mapCleared(com.hazelcast.core.MapEvent event) |
void |
mapEvicted(com.hazelcast.core.MapEvent iEvent) |
void |
memberAdded(com.hazelcast.core.MembershipEvent iEvent) |
void |
memberAttributeChanged(com.hazelcast.core.MemberAttributeEvent memberAttributeEvent) |
void |
memberRemoved(com.hazelcast.core.MembershipEvent iEvent)
Removes the node map entry.
|
void |
onCreate(ODatabaseInternal iDatabase) |
void |
onDrop(ODatabaseInternal iDatabase) |
protected void |
publishLocalNodeConfiguration() |
void |
setDatabaseStatus(String iNode,
String iDatabaseName,
ODistributedServerManager.DB_STATUS iStatus) |
void |
shutdown() |
void |
startup() |
void |
updateCachedDatabaseConfiguration(String iDatabaseName,
ODocument cfg,
boolean iSaveToDisk,
boolean iDeployToCluster) |
assignNodeName, backupCurrentDatabase, checkNodeStatus, closeRemoteServer, dumpServersStatus, electCurrentNodeAsNewCoordinator, electCurrentNodeAsNewCoordinator, executeInDistributedDatabaseLock, executeOnLocalNode, getAvailableNodeNames, getAvailableNodes, getAvailableNodes, getClusterConfiguration, getCoordinatorServer, getDatabaseConfiguration, getDistributedConfigFile, getLastClusterChangeOn, getLocalNodeConfiguration, getLocalNodeId, getLocalNodeName, getManagedDatabases, getMessageService, getName, getNextMessageIdCounter, getNodeIdByName, getNodeName, getNodeNameById, getNodeStatus, getPriority, getRemoteServer, getServerInstance, getStats, getStorage, getTaskFactory, installClustersOfClass, installDatabase, installDatabaseFromNetwork, installDatabaseOnLocalNode, installDbClustersLocalStrategy, isEnabled, isNodeAvailable, isNodeAvailable, isNodeOnline, isOffline, isRelatedToLocalServer, onClose, onCreateClass, onDatabaseEvent, onDatabaseEvent, onDropClass, onLocalNodeConfigurationRequest, onMessage, onOpen, propagateSchemaChanges, reassignClustersOwnership, rebalanceClusterOwnership, registerLifecycleListener, requestDatabaseDelta, requestDatabaseFullSync, requestFullDatabase, restartNode, sendRequest, sendShutdown, setDefaultDatabaseConfigFile, setNodeStatus, stopNode, toString, unregisterLifecycleListener, updateCachedDatabaseConfiguration, updateLastClusterChange, waitUntilNodeOnline, waitUntilNodeOnline, writeDatabaseChunkgetContent, onAfterClientRequest, onBeforeClientRequest, onClientConnection, onClientDisconnection, onClientErrorpublic static final String CONFIG_DATABASE_PREFIX
protected static final String CONFIG_NODE_PREFIX
protected static final String CONFIG_DBSTATUS_PREFIX
protected static final String CONFIG_REGISTEREDNODES
protected String hazelcastConfigFile
protected String membershipListenerRegistration
protected String membershipListenerMapRegistration
protected volatile com.hazelcast.core.HazelcastInstance hazelcastInstance
protected OHazelcastDistributedMap configurationMap
public void config(OServer iServer, OServerParameterConfiguration[] iParams)
OServerPluginconfig in interface OServerPluginconfig in class ODistributedAbstractPluginpublic void startup()
startup in interface OServicestartup in class ODistributedAbstractPluginprotected void publishLocalNodeConfiguration()
public Throwable convertException(Throwable original)
convertException in interface ODistributedServerManagerpublic void shutdown()
shutdown in interface OServiceshutdown in class ODistributedAbstractPluginpublic com.hazelcast.core.HazelcastInstance getHazelcastInstance()
protected com.hazelcast.core.HazelcastInstance configureHazelcast()
throws FileNotFoundException
FileNotFoundExceptionprotected ODocument loadDatabaseConfiguration(String iDatabaseName, File file, boolean saveCfgToDisk)
loadDatabaseConfiguration in class ODistributedAbstractPluginprotected void loadLocalDatabases()
public ConcurrentMap<String,Object> getConfigurationMap()
getConfigurationMap in interface ODistributedServerManagerprotected ODistributedConfiguration getLastDatabaseConfiguration(String databaseName)
getLastDatabaseConfiguration in class ODistributedAbstractPluginpublic Lock getLock(String iName)
ODistributedServerManagergetLock in interface ODistributedServerManageriName - name of the lockpublic void memberAttributeChanged(com.hazelcast.core.MemberAttributeEvent memberAttributeEvent)
memberAttributeChanged in interface com.hazelcast.core.MembershipListenerpublic void updateCachedDatabaseConfiguration(String iDatabaseName, ODocument cfg, boolean iSaveToDisk, boolean iDeployToCluster)
updateCachedDatabaseConfiguration in interface ODistributedServerManagerpublic void mapEvicted(com.hazelcast.core.MapEvent iEvent)
mapEvicted in interface com.hazelcast.map.listener.MapEvictedListenerpublic void mapCleared(com.hazelcast.core.MapEvent event)
mapCleared in interface com.hazelcast.map.listener.MapClearedListenerpublic void memberRemoved(com.hazelcast.core.MembershipEvent iEvent)
memberRemoved in interface com.hazelcast.core.MembershipListenerpublic void memberAdded(com.hazelcast.core.MembershipEvent iEvent)
memberAdded in interface com.hazelcast.core.MembershipListenerpublic void onCreate(ODatabaseInternal iDatabase)
onCreate in interface ODatabaseLifecycleListenerpublic void onDrop(ODatabaseInternal iDatabase)
onDrop in interface ODatabaseLifecycleListeneronDrop in class ODistributedAbstractPluginpublic ODocument getNodeConfigurationByUuid(String iNodeId)
getNodeConfigurationByUuid in interface ODistributedServerManagerpublic ODistributedServerManager.DB_STATUS getDatabaseStatus(String iNode, String iDatabaseName)
getDatabaseStatus in interface ODistributedServerManagerpublic void setDatabaseStatus(String iNode, String iDatabaseName, ODistributedServerManager.DB_STATUS iStatus)
setDatabaseStatus in interface ODistributedServerManagerprotected void installNewDatabasesFromCluster(boolean iStartup)
Copyright © 2009–2016 Orient Technologies. All rights reserved.