
public class OHazelcastPlugin extends ODistributedAbstractPlugin implements com.hazelcast.core.MembershipListener, com.hazelcast.core.EntryListener<String,Object>, com.hazelcast.core.LifecycleListener, OBeforeDatabaseOpenNetworkEventListener
ODistributedServerManager.DB_STATUS, ODistributedServerManager.NODE_STATUS| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_COORDINATOR |
static String |
CONFIG_DATABASE_PREFIX |
static String |
CONFIG_DBSTATUS_PREFIX |
static String |
CONFIG_NODE_PREFIX |
static String |
CONFIG_REGISTEREDNODES |
protected OHazelcastDistributedMap |
configurationMap |
protected com.hazelcast.config.Config |
hazelcastConfig |
protected String |
hazelcastConfigFile |
protected com.hazelcast.core.HazelcastInstance |
hazelcastInstance |
protected String |
membershipListenerMapRegistration |
protected String |
membershipListenerRegistration |
activeNodes, activeNodesNamesByUuid, activeNodesUuidByName, autoRemovalOfServers, clusterAssignmentStrategy, coordinatorServer, defaultDatabaseConfigFile, DEPLOY_DB_MAX_RETRIES, enabled, healthCheckerTask, lastClusterChangeOn, listeners, localMessageIdCounter, messageService, NODE_NAME_ENV, nodeId, nodeName, nodeUuid, PAR_DEF_DISTRIB_DB_CONFIG, publishLocalNodeConfigurationTask, registeredNodeById, registeredNodeByName, remoteServers, REPLICATOR_USER, responseManagerFactory, serverInstance, serverStarted, startedOn, status, storages, taskFactoryFILE_DISTRIBUTED_DB_CONFIG| Constructor and Description |
|---|
OHazelcastPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
config(OServer iServer,
OServerParameterConfiguration[] iParams) |
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) |
Set<String> |
getActiveServers() |
long |
getClusterTime() |
OHazelcastDistributedMap |
getConfigurationMap() |
ODistributedServerManager.DB_STATUS |
getDatabaseStatus(String iNode,
String iDatabaseName) |
ODistributedServerManager.DB_STATUS |
getDatabaseStatus(String iNode,
String iDatabaseName,
boolean useCache) |
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance() |
com.orientechnologies.orient.core.record.impl.ODocument |
getNodeConfigurationByUuid(String iNodeId,
boolean useCache) |
int |
getNodeIdByName(String name) |
String |
getNodeNameById(int id) |
String |
getPublicAddress() |
ORemoteServerController |
getRemoteServer(String rNodeName) |
protected void |
initSystemDatabase()
Protecte system database from being replicated
|
protected void |
installNewDatabasesFromCluster() |
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 |
onBeforeDatabaseOpen(String url) |
void |
onCreate(com.orientechnologies.orient.core.db.ODatabaseInternal iDatabase) |
void |
onDrop(com.orientechnologies.orient.core.db.ODatabaseInternal iDatabase) |
protected void |
publishLocalNodeConfiguration() |
protected void |
registerNode(com.hazelcast.core.Member member,
String joinedNodeName) |
void |
reloadRegisteredNodes(String registeredNodesFromClusterAsJson) |
void |
removeNodeFromConfiguration(String nodeLeftName,
boolean removeOnlyDynamicServers) |
boolean |
removeNodeFromConfiguration(String nodeLeftName,
String databaseName,
boolean removeOnlyDynamicServers,
boolean statusOffline) |
void |
removeServer(String nodeLeftName,
boolean removeOnlyDynamicServers) |
void |
setDatabaseStatus(String iNode,
String iDatabaseName,
ODistributedServerManager.DB_STATUS iStatus) |
void |
setHazelcastConfig(com.hazelcast.config.Config config) |
void |
setNodeName(String nodeName) |
void |
shutdown() |
void |
startup() |
void |
stateChanged(com.hazelcast.core.LifecycleEvent event) |
boolean |
updateCachedDatabaseConfiguration(String databaseName,
OModifiableDistributedConfiguration cfg,
boolean iDeployToCluster) |
protected void |
waitStartupIsCompleted() |
assignNodeName, backupCurrentDatabase, checkNodeStatus, closeRemoteServer, dumpServersStatus, executeInDistributedDatabaseLock, executeOnLocalNode, getAvailableNodeNames, getAvailableNodes, getAvailableNodes, getClusterConfiguration, getClusterOwnedExclusivelyByCurrentNode, getConflictResolverFactory, getCoordinatorServer, getDatabaseConfiguration, getDatabaseConfiguration, getDefaultDatabaseConfigFile, getDistributedStrategy, getLastClusterChangeOn, getListeningBinaryAddress, getLocalNodeConfiguration, getLocalNodeId, getLocalNodeName, getLockManagerExecutor, getLockManagerRequester, getManagedDatabases, getMessageService, getName, getNextMessageIdCounter, getNodeName, getNodeName, getNodeStatus, getNodesWithStatus, getNodeUuidByName, getOnlineNodes, getPriority, getServerInstance, getStats, getStorage, getStorageIfExists, getTaskFactory, installClustersOfClass, installDatabase, installDatabaseFromNetwork, installDatabaseOnLocalNode, installDbClustersLocalStrategy, isEnabled, isNodeAvailable, isNodeAvailable, isNodeOnline, isNodeStatusEqualsTo, isOffline, isRelatedToLocalServer, onClose, onCreateClass, onDatabaseEvent, onDropClass, onLocalNodeConfigurationRequest, onMessage, onOpen, propagateSchemaChanges, reassignClustersOwnership, rebalanceClusterOwnership, registerLifecycleListener, removeStorage, requestDatabaseDelta, requestDatabaseFullSync, requestFullDatabase, restartNode, sendRequest, sendShutdown, setDefaultDatabaseConfigFile, setDistributedStrategy, setNodeStatus, stopNode, toString, unregisterLifecycleListener, updateCachedDatabaseConfiguration, updateLastClusterChange, waitUntilNodeOnline, waitUntilNodeOnline, writeDatabaseChunkgetContent, onAfterClientRequest, onBeforeClientRequest, onClientConnection, onClientDisconnection, onClientErrorpublic static final String CONFIG_DATABASE_PREFIX
public static final String CONFIG_NODE_PREFIX
public static final String CONFIG_DBSTATUS_PREFIX
public static final String CONFIG_COORDINATOR
public static final String CONFIG_REGISTEREDNODES
protected String hazelcastConfigFile
protected com.hazelcast.config.Config hazelcastConfig
protected String membershipListenerRegistration
protected String membershipListenerMapRegistration
protected volatile com.hazelcast.core.HazelcastInstance hazelcastInstance
protected OHazelcastDistributedMap configurationMap
public void setHazelcastConfig(com.hazelcast.config.Config config)
public void setNodeName(String nodeName)
public void config(OServer iServer, OServerParameterConfiguration[] iParams)
config in interface OServerPluginconfig in class ODistributedAbstractPluginpublic void startup()
startup in interface com.orientechnologies.common.util.OServicestartup in class ODistributedAbstractPluginprotected void initSystemDatabase()
public int getNodeIdByName(String name)
getNodeIdByName in interface ODistributedServerManagergetNodeIdByName in class ODistributedAbstractPluginpublic String getNodeNameById(int id)
getNodeNameById in interface ODistributedServerManagergetNodeNameById in class ODistributedAbstractPluginprotected void waitStartupIsCompleted()
throws InterruptedException
InterruptedExceptionprotected void publishLocalNodeConfiguration()
public Throwable convertException(Throwable original)
convertException in interface ODistributedServerManagerpublic long getClusterTime()
getClusterTime in interface ODistributedServerManagerpublic void shutdown()
shutdown in interface com.orientechnologies.common.util.OServiceshutdown in class ODistributedAbstractPluginpublic ORemoteServerController getRemoteServer(String rNodeName) throws IOException
getRemoteServer in interface ODistributedServerManagerIOExceptionpublic com.hazelcast.core.HazelcastInstance getHazelcastInstance()
protected com.hazelcast.core.HazelcastInstance configureHazelcast()
throws FileNotFoundException
FileNotFoundExceptionpublic String getPublicAddress()
getPublicAddress in class ODistributedAbstractPluginprotected void loadLocalDatabases()
public OHazelcastDistributedMap getConfigurationMap()
getConfigurationMap in interface ODistributedServerManagerpublic void memberAttributeChanged(com.hazelcast.core.MemberAttributeEvent memberAttributeEvent)
memberAttributeChanged in interface com.hazelcast.core.MembershipListenerpublic boolean updateCachedDatabaseConfiguration(String databaseName, OModifiableDistributedConfiguration cfg, 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 stateChanged(com.hazelcast.core.LifecycleEvent event)
stateChanged in interface com.hazelcast.core.LifecycleListenerpublic void onCreate(com.orientechnologies.orient.core.db.ODatabaseInternal iDatabase)
onCreate in interface com.orientechnologies.orient.core.db.ODatabaseLifecycleListenerpublic void onDrop(com.orientechnologies.orient.core.db.ODatabaseInternal iDatabase)
onDrop in interface com.orientechnologies.orient.core.db.ODatabaseLifecycleListeneronDrop in class ODistributedAbstractPluginpublic com.orientechnologies.orient.core.record.impl.ODocument getNodeConfigurationByUuid(String iNodeId, boolean useCache)
getNodeConfigurationByUuid in interface ODistributedServerManagerpublic ODistributedServerManager.DB_STATUS getDatabaseStatus(String iNode, String iDatabaseName)
getDatabaseStatus in interface ODistributedServerManagerpublic ODistributedServerManager.DB_STATUS getDatabaseStatus(String iNode, String iDatabaseName, boolean useCache)
public void setDatabaseStatus(String iNode, String iDatabaseName, ODistributedServerManager.DB_STATUS iStatus)
setDatabaseStatus in interface ODistributedServerManagerprotected void installNewDatabasesFromCluster()
public void reloadRegisteredNodes(String registeredNodesFromClusterAsJson)
public void removeNodeFromConfiguration(String nodeLeftName, boolean removeOnlyDynamicServers)
public boolean removeNodeFromConfiguration(String nodeLeftName, String databaseName, boolean removeOnlyDynamicServers, boolean statusOffline)
public void removeServer(String nodeLeftName, boolean removeOnlyDynamicServers)
removeServer in interface ODistributedServerManagerpublic Set<String> getActiveServers()
getActiveServers in interface ODistributedServerManagerpublic void onBeforeDatabaseOpen(String url)
onBeforeDatabaseOpen in interface OBeforeDatabaseOpenNetworkEventListenerprotected void registerNode(com.hazelcast.core.Member member,
String joinedNodeName)
Copyright © 2009–2017 OrientDB. All rights reserved.