public interface ODistributedServerManager
Modifier and Type | Interface and Description |
---|---|
static class |
ODistributedServerManager.DB_STATUS
Database status.
|
static class |
ODistributedServerManager.NODE_STATUS
Server status.
|
Modifier and Type | Field and Description |
---|---|
static String |
FILE_DISTRIBUTED_DB_CONFIG |
static final String FILE_DISTRIBUTED_DB_CONFIG
boolean isNodeStatusEqualsTo(String iNodeName, String iDatabaseName, ODistributedServerManager.DB_STATUS... statuses)
iNodeName
- Node nameiDatabaseName
- Database namestatuses
- vararg of statusesboolean isNodeAvailable(String iNodeName)
@Deprecated String getCoordinatorServer()
String getLockManagerServer()
void waitUntilNodeOnline() throws InterruptedException
InterruptedException
void waitUntilNodeOnline(String nodeName, String databaseName) throws InterruptedException
InterruptedException
OServer getServerInstance()
boolean isEnabled()
ODistributedServerManager registerLifecycleListener(ODistributedLifecycleListener iListener)
ODistributedServerManager unregisterLifecycleListener(ODistributedLifecycleListener iListener)
Object executeOnLocalNode(ODistributedRequestId reqId, ORemoteTask task, ODatabaseDocumentInternal database)
void executeOnLocalNodeFromRemote(ODistributedRequest request)
ORemoteServerController getRemoteServer(String nodeName) throws IOException
IOException
long getLastClusterChangeOn()
ODistributedServerManager.NODE_STATUS getNodeStatus()
void setNodeStatus(ODistributedServerManager.NODE_STATUS iStatus)
boolean checkNodeStatus(ODistributedServerManager.NODE_STATUS string)
void removeServer(String nodeLeftName, boolean removeOnlyDynamicServers)
ODistributedServerManager.DB_STATUS getDatabaseStatus(String iNode, String iDatabaseName)
void setDatabaseStatus(String iNode, String iDatabaseName, ODistributedServerManager.DB_STATUS iStatus)
int getNodesWithStatus(Collection<String> iNodes, String databaseName, ODistributedServerManager.DB_STATUS... statuses)
ODistributedMessageService getMessageService()
ODistributedStrategy getDistributedStrategy()
void setDistributedStrategy(ODistributedStrategy streatgy)
boolean updateCachedDatabaseConfiguration(String iDatabaseName, OModifiableDistributedConfiguration cfg, boolean iDeployToCluster)
long getNextMessageIdCounter()
void updateLastClusterChange()
void reassignClustersOwnership(String iNode, String databaseName, OModifiableDistributedConfiguration cfg, boolean canCreateNewClusters)
boolean isNodeAvailable(String iNodeName, String databaseName)
boolean isNodeOnline(String iNodeName, String databaseName)
int getTotalNodes(String iDatabaseName)
int getAvailableNodes(String iDatabaseName)
int getAvailableNodes(Collection<String> iNodes, String databaseName)
boolean isOffline()
int getLocalNodeId()
String getLocalNodeName()
ODocument getClusterConfiguration()
String getNodeNameById(int id)
int getNodeIdByName(String node)
ODocument getLocalNodeConfiguration()
ODistributedConfiguration getDatabaseConfiguration(String iDatabaseName)
ODistributedConfiguration getDatabaseConfiguration(String iDatabaseName, boolean createIfNotPresent)
ODistributedResponse sendRequest(String iDatabaseName, Collection<String> iClusterNames, Collection<String> iTargetNodeNames, ORemoteTask iTask, long messageId, ODistributedRequest.EXECUTION_MODE iExecutionMode, Object localResult, OCallable<Void,ODistributedRequestId> iAfterSentCallback, OCallable<Void,ODistributedResponseManager> endCallback)
iDatabaseName
- iClusterNames
- iTargetNodeNames
- iTask
- messageId
- Message Id as longiExecutionMode
- localResult
- It's the result of the request executed locallyiAfterSentCallback
- endCallback
- ODocument getStats()
boolean installDatabase(boolean iStartup, String databaseName, boolean forceDeployment, boolean tryWithDeltaFirst)
ORemoteTaskFactoryManager getTaskFactoryManager()
ODistributedConflictResolverFactory getConflictResolverFactory()
long getClusterTime()
Cluster tries to keep a cluster-wide time which might be different than the member's own system time. Cluster-wide time is -almost- the same on all members of the cluster.
File getDefaultDatabaseConfigFile()
ODistributedLockManager getLockManagerRequester()
ODistributedLockManager getLockManagerExecutor()
<T> T executeInDistributedDatabaseLock(String databaseName, long timeoutLocking, OModifiableDistributedConfiguration lastCfg, OCallable<T,OModifiableDistributedConfiguration> iCallback)
T
- Return typedatabaseName
- Database nametimeoutLocking
- iCallback
- Operation @return The operation's result of type Tboolean isWriteQuorumPresent(String databaseName)
void notifyClients(String databaseName)
default void messageReceived(ODistributedRequest request)
default void messagePartitionCalculate(ODistributedRequest request, Set<Integer> involvedWorkerQueues)
default void messageBeforeOp(String op, ODistributedRequestId requestId)
default void messageAfterOp(String op, ODistributedRequestId requestId)
default void messageCurrentPayload(ODistributedRequestId requestId, Object responsePayload)
default void messageProcessStart(ODistributedRequest message)
default void messageProcessEnd(ODistributedRequest iRequest, Object responsePayload)
Copyright © 2009–2020 OrientDB. All rights reserved.