Class OModifiableDistributedConfiguration
java.lang.Object
com.orientechnologies.orient.server.distributed.ODistributedConfiguration
com.orientechnologies.orient.server.distributed.OModifiableDistributedConfiguration
Modifiable Distributed configuration. It's created starting from a ODistributedConfiguration
object. Every changes increment the field "version".
- Author:
- Luca Garulli (l.garulli--at--orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.orientechnologies.orient.server.distributed.ODistributedConfiguration
ODistributedConfiguration.NEW_NODE_STRATEGIES, ODistributedConfiguration.ROLES -
Field Summary
Fields inherited from class com.orientechnologies.orient.server.distributed.ODistributedConfiguration
ALL_WILDCARD, AUTO_DEPLOY, CLUSTERS, configuration, DCS, DEFAULT_CLUSTER_NAME, DEFAULT_READ_QUORUM, DEFAULT_WRITE_QUORUM, EXECUTION_MODE, EXECUTION_MODE_SYNCHRONOUS, NEW_NODE_STRATEGY, NEW_NODE_TAG, OWNER, QUORUM_ALL, QUORUM_LOCAL_DC, QUORUM_MAJORITY, READ_QUORUM, READ_YOUR_WRITES, SERVERS, VERSION, WRITE_QUORUM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNewNodeInServerList(String iNode) Adds a server in the configuration.modify()voidremoveServer(String iNode) Removes a server from the list.
NOTE: It must be executed in distributed database lock.setServerOffline(String iNode, String newLockManagerServer) Set a server offline.voidsetServerOwner(String iClusterName, String iServerName) Sets the server as owner for the given cluster.voidsetServerRole(String iServerName, ODistributedConfiguration.ROLES role) Sets the server role between MASTER (default) and REPLICA.Methods inherited from class com.orientechnologies.orient.server.distributed.ODistributedConfiguration
clearForceWriteQuorum, forceWriteQuorum, getAllConfiguredServers, getClusterConfiguration, getClusterNames, getClusterOwner, getClustersOwnedByServer, getConfiguredClusterOwner, getConfiguredServers, getDataCenterOfServer, getDataCenters, getDataCenterServers, getDataCenterWriteQuorum, getDefaultServerRole, getDocument, getGlobalReadQuorum, getMasterServers, getNewNodeStrategy, getOwnedClustersByServer, getReadQuorum, getRegisteredServers, getServerClusterMap, getServerRole, getServers, getServers, getServers, getVersion, getWriteQuorum, hasDataCenterConfiguration, isAutoDeploy, isExecutionModeSynchronous, isLocalDataCenterWriteQuorum, isReadYourWrites, isReplicationActive, isServerContainingAllClusters, isServerContainingCluster, toString
-
Constructor Details
-
OModifiableDistributedConfiguration
-
-
Method Details
-
modify
- Overrides:
modifyin classODistributedConfiguration
-
setServerRole
Sets the server role between MASTER (default) and REPLICA. -
addNewNodeInServerList
Adds a server in the configuration. It replaces all the tags <NEW_NODE> with the new server name
NOTE: It must be executed in distributed database lock.- Parameters:
iNode- Server name- Returns:
- the list of changed partitions or null if no changes have applied
-
setServerOwner
Sets the server as owner for the given cluster. The owner server is the first in server list.
NOTE: It must be executed in distributed database lock.- Parameters:
iClusterName- Cluster name or *. Does not accept null.
-
removeServer
Removes a server from the list.
NOTE: It must be executed in distributed database lock.- Parameters:
iNode- Server name- Returns:
-
setServerOffline
Set a server offline. It assures the offline server is never on top of the list.
NOTE: It must be executed in distributed database lock.- Parameters:
iNode- Server namenewLockManagerServer- New Lock Manager server name- Returns:
-
override
-