public class ODatabaseDocumentDistributed extends ODatabaseDocumentEmbedded
ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS
activeQueries, componentsFactory, currentIntent, currentTx, databaseOwner, hooks, hooksByScope, inHook, initialized, localCache, metadata, microTransaction, properties, recordType, retainRecords, serializer, sharedContext, status, unmodifiableHooks, url, user
TYPE
Constructor and Description |
---|
ODatabaseDocumentDistributed(OStorage storage,
OHazelcastPlugin hazelcastPlugin) |
Modifier and Type | Method and Description |
---|---|
void |
acquireLocksForTx(OTransactionInternal tx,
ODistributedTxContext txContext) |
int |
addCluster(String iClusterName,
int iRequestedId)
Adds a new cluster.
|
int |
addCluster(String iClusterName,
Object... iParameters)
Adds a new cluster.
|
int |
assignAndCheckCluster(ORecord record,
String iClusterName) |
boolean |
beginDistributedTx(ODistributedRequestId requestId,
OTransactionId id,
OTransactionInternal tx,
boolean local,
int retryCount) |
boolean |
commit2pc(ODistributedRequestId transactionId,
boolean local,
ODistributedRequestId requestId) |
void |
commit2pcLocal(ODistributedRequestId transactionId)
The Local commit is different from a remote commit due to local rid pre-allocation
|
ODatabaseDocumentInternal |
copy()
Returns a copy of current database if it's open.
|
protected void |
createMetadata(OSharedContext ctx) |
void |
distributedCommitV1(OTransactionInternal iTx) |
protected boolean |
dropClusterInternal(int clusterId) |
protected boolean |
dropClusterInternal(String clusterName) |
ODistributedResponse |
executeTaskOnNode(ORemoteTask task,
String nodeName) |
Map<String,Set<String>> |
getActiveClusterMap()
returns the cluster map for current deploy.
|
Map<String,Set<String>> |
getActiveDataCenterMap()
returns the data center map for current deploy.
|
Set<String> |
getClustersOnServer(ODistributedConfiguration cfg,
String server) |
ODistributedConfiguration |
getDistributedConfiguration() |
ODistributedServerManager |
getDistributedManager() |
OEnterpriseEndpoint |
getEnterpriseEndpoint() |
Map<String,Object> |
getHaStatus(boolean servers,
boolean db,
boolean latency,
boolean messages) |
String |
getLocalNodeName()
return the name of local node in the cluster
|
ODistributedStorage |
getStorageDistributed() |
OView |
getViewFromCluster(int cluster) |
void |
init(OrientDBConfig config,
OSharedContext sharedContext) |
void |
internalBegin2pc(ONewDistributedTxContextImpl txContext,
boolean local) |
void |
internalCommit(OTransactionInternal iTx)
Executed the commit on the storage hiding away storage concepts from the transaction
|
void |
internalCommit2pc(ONewDistributedTxContextImpl txContext) |
boolean |
isDistributed() |
boolean |
isSharded()
checks the cluster map and tells whether this is a sharded database (ie.
|
protected void |
loadMetadata() |
protected void |
loadMetadata(OSharedContext ctx) |
OResultSet |
queryOnNode(String nodeName,
OExecutionPlan executionPlan,
Map<Object,Object> inputParameters)
sends an execution plan to a remote node for a remote query execution
|
void |
register(ODistributedRequestId requestId,
ODistributedDatabase localDistributedDatabase,
ONewDistributedTxContextImpl txContext) |
boolean |
removeHaServer(String serverName) |
boolean |
rollback2pc(ODistributedRequestId transactionId) |
void |
sendDDLCommand(String command,
boolean excludeLocal) |
<T> T |
sendSequenceAction(OSequenceAction action) |
boolean |
sync(boolean forceDeployment,
boolean tryWithDelta)
synchronizes current database instance with the rest of the cluster (if in distributed mode).
|
addBlobCluster, afterCommitOperations, afterCreateOperations, afterDeleteOperations, afterReadOperations, afterRollbackOperations, afterUpdateOperations, beforeCreateOperations, beforeDeleteOperations, beforeReadOperations, beforeUpdateOperations, beginMicroTransaction, callOnCreateListeners, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, command, command, create, create, create, delete, drop, execute, execute, executeDeleteRecord, executeReadRecord, exists, getClusterName, getConfig, getStorage, getStorageInfo, installHooksEmbedded, internalCreate, internalLockRecord, internalLockRecord, internalOpen, internalOpen, internalUnlockRecord, isClosed, live, live, lock, lock, open, open, query, query, query, rebuildIndexes, recycle, replaceStorage, saveAll, set, setCustom, syncCommit, unlock
activateOnCurrentThread, backup, beforeCommitOperations, beforeRollbackOperations, begin, begin, begin, browseClass, browseClass, browseCluster, browseCluster, browseCluster, browseCluster, browseCluster, callbackHookFailure, callbackHookFinalize, callbackHooks, callbackHookSuccess, callOnCloseListeners, callOnDropListeners, callOnOpenListeners, checkClusterSecurity, checkForClusterPermissions, checkIfActive, checkOpenness, checkRecordClass, cleanOutRecord, clearDocumentTracking, close, closeActiveQueries, command, commit, commit, countClass, countClass, countClass, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countView, declareIntent, delete, delete, dropCluster, dropCluster, executeWithRetries, executeWithRetries, executeWithRetries, existsCluster, freeze, freeze, get, getActiveIntent, getActiveQueries, getActiveQuery, getBlobClusterIds, getClusterIdByName, getClusterNameById, getClusterNames, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getCollectionsChanges, getConfiguration, getConflictStrategy, getDatabaseOwner, getDefaultClusterId, getDefaultSerializer, getDictionary, getHooks, getListeners, getLocalCache, getMetadata, getMicroOrRegularTransaction, getName, getProperties, getProperty, getRecord, getRecordMetadata, getRecordType, getSbTreeCollectionManager, getSerializer, getSerializerFactory, getSharedContext, getSize, getStatus, getStorageVersions, getTransaction, getType, getUnderlying, getURL, getUser, incrementalBackup, init, internalClose, isActiveOnCurrentThread, isClusterEdge, isClusterVertex, isClusterView, isMVCC, isPooled, isPrefetchRecords, isRetainRecords, isUseLightweightEdges, isValidationEnabled, load, load, load, load, load, load, loadIfVersionIsNotLatest, newBlob, newBlob, newEdge, newEdge, newElement, newElement, newElement, newEmbeddedElement, newEmbeddedElement, newInstance, newInstance, newLightweightEdge, newRegularEdge, newVertex, newVertex, pessimisticLockChecks, query, queryClosed, queryStarted, rawBegin, registerHook, registerHook, release, reload, reload, reload, reload, reload, reloadUser, resetInitialization, restore, rollback, rollback, save, save, save, save, setConflictStrategy, setConflictStrategy, setCurrentDatabaseInThreadLocal, setDatabaseOwner, setDefaultClusterIdInternal, setDefaultSerializer, setDefaultTransactionMode, setInternal, setMVCC, setPrefetchRecords, setProperty, setRetainRecords, setSerializer, setStatus, setStatusInternal, setUseLightweightEdges, setUser, setValidationEnabled, swapTx, truncateCluster, unregisterHook
browseListeners, getListenersCopy, registerListener, resetListeners, unregisterListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
queryClosed, queryStarted
indexQuery, isRemote, realClose, reuse
createClassIfNotExist, createEdgeClass, createVertexClass, newEdge, newVertex
createClass, executeWithRetry, getClass, registerListener, unregisterListener
public ODatabaseDocumentDistributed(OStorage storage, OHazelcastPlugin hazelcastPlugin)
public ODistributedStorage getStorageDistributed()
public String getLocalNodeName()
public Map<String,Set<String>> getActiveClusterMap()
public Set<String> getClustersOnServer(ODistributedConfiguration cfg, String server)
protected void loadMetadata()
loadMetadata
in class ODatabaseDocumentEmbedded
protected void loadMetadata(OSharedContext ctx)
loadMetadata
in class ODatabaseDocumentEmbedded
public Map<String,Set<String>> getActiveDataCenterMap()
public boolean isSharded()
ODatabaseInternal
public boolean isDistributed()
public ODatabaseDocumentInternal copy()
ODatabaseDocumentEmbedded
copy
in interface ODatabaseDocumentInternal
copy
in class ODatabaseDocumentEmbedded
public boolean sync(boolean forceDeployment, boolean tryWithDelta)
ODatabaseDocumentInternal
public Map<String,Object> getHaStatus(boolean servers, boolean db, boolean latency, boolean messages)
public boolean removeHaServer(String serverName)
public OResultSet queryOnNode(String nodeName, OExecutionPlan executionPlan, Map<Object,Object> inputParameters)
ODatabaseDocumentInternal
nodeName
- the node nameexecutionPlan
- the execution planinputParameters
- the input parameters for executionpublic ODistributedResponse executeTaskOnNode(ORemoteTask task, String nodeName)
public void init(OrientDBConfig config, OSharedContext sharedContext)
init
in class ODatabaseDocumentEmbedded
protected void createMetadata(OSharedContext ctx)
createMetadata
in class ODatabaseDocumentEmbedded
public int assignAndCheckCluster(ORecord record, String iClusterName)
assignAndCheckCluster
in interface ODatabaseDocumentInternal
assignAndCheckCluster
in class ODatabaseDocumentAbstract
public void internalCommit(OTransactionInternal iTx)
ODatabaseDocumentInternal
internalCommit
in interface ODatabaseDocumentInternal
internalCommit
in class ODatabaseDocumentAbstract
public <T> T sendSequenceAction(OSequenceAction action) throws ExecutionException, InterruptedException
sendSequenceAction
in interface ODatabaseDocumentInternal
sendSequenceAction
in class ODatabaseDocumentEmbedded
ExecutionException
InterruptedException
public void distributedCommitV1(OTransactionInternal iTx)
public void acquireLocksForTx(OTransactionInternal tx, ODistributedTxContext txContext)
public boolean beginDistributedTx(ODistributedRequestId requestId, OTransactionId id, OTransactionInternal tx, boolean local, int retryCount)
public void register(ODistributedRequestId requestId, ODistributedDatabase localDistributedDatabase, ONewDistributedTxContextImpl txContext)
public void commit2pcLocal(ODistributedRequestId transactionId)
transactionId
- public boolean commit2pc(ODistributedRequestId transactionId, boolean local, ODistributedRequestId requestId)
transactionId
- public boolean rollback2pc(ODistributedRequestId transactionId)
public void internalCommit2pc(ONewDistributedTxContextImpl txContext)
public void internalBegin2pc(ONewDistributedTxContextImpl txContext, boolean local)
public OView getViewFromCluster(int cluster)
getViewFromCluster
in interface ODatabaseDocumentInternal
getViewFromCluster
in class ODatabaseDocumentEmbedded
public OEnterpriseEndpoint getEnterpriseEndpoint()
public ODistributedServerManager getDistributedManager()
public ODistributedConfiguration getDistributedConfiguration()
public void sendDDLCommand(String command, boolean excludeLocal)
public int addCluster(String iClusterName, Object... iParameters)
ODatabase
addCluster
in interface ODatabase<ORecord>
addCluster
in class ODatabaseDocumentAbstract
iClusterName
- Cluster nameiParameters
- Additional parameters to pass to the factoriespublic int addCluster(String iClusterName, int iRequestedId)
ODatabase
addCluster
in interface ODatabase<ORecord>
addCluster
in class ODatabaseDocumentAbstract
iClusterName
- Cluster nameiRequestedId
- requested id of the clusterprotected boolean dropClusterInternal(String clusterName)
dropClusterInternal
in class ODatabaseDocumentAbstract
protected boolean dropClusterInternal(int clusterId)
dropClusterInternal
in class ODatabaseDocumentAbstract
Copyright © 2009–2020 OrientDB. All rights reserved.