Class ODistributedDatabaseImpl
java.lang.Object
com.orientechnologies.orient.server.distributed.impl.ODistributedDatabaseImpl
- All Implemented Interfaces:
ODistributedDatabase
Distributed database implementation. There is one instance per database. Each node creates own
instance to talk with each others.
- Author:
- Luca Garulli (l.garulli--at--orientechnologies.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<ODistributedRequestId,ODistributedTxContext> protected final Stringstatic final Stringprotected final ODistributedPlugin -
Constructor Summary
ConstructorsConstructorDescriptionODistributedDatabaseImpl(OrientDBDistributed context, ODistributedPlugin manager, String iDatabaseName) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckReverseSync(OTransactionSequenceStatus lastState) voidvoiddump()voidbooleanexists()voidvoidgetAvailableNodesButLocal(ODatabaseSession database) protected StringintgetPoolSize(ExecutorService service) longlonggetTxContext(ODistributedRequestId requestId) voidhandleUnreachableNode(String nodeName) Unlocks all the record locked by node iNodeNamevoidvoidinitFirstOpen(ODatabaseDocumentInternal session) voidlocalLock(OLockKeySource keySource) voidlocalUnlock(List<OLockGuard> guards) missingTransactions(OTransactionSequenceStatus lastState) nextId()voidpopTxContext(ODistributedRequestId requestId) voidprocessRequest(ODistributedRequest request, boolean waitForAcceptingRequests) Distributed requests against the available workers by using one queue per worker.voidreEnqueue(ODistributedRequestId requestId, String databaseName, ORemoteTask payload, int retryCount, int autoRetryDelay) voidvoidvoidvoidresume()voidstatic booleansendResponseBack(Object current, ODistributedServerManager manager, ODistributedRequestId iRequestId, Object responsePayload) voidsetLastValidBackup(OSyncSource lastValidBackup) voidvoidshutdown()voidshutdown(boolean wait) voidstatus()voidsuspend()voidvoidunlockResourcesOfServer(ODatabaseDocumentInternal database, String serverName) voidvoidvoidvoidvoidwaitIsReady(ORemoteTask task)
-
Field Details
-
DISTRIBUTED_SYNC_JSON_FILENAME
- See Also:
-
manager
-
databaseName
-
activeTxContexts
-
-
Constructor Details
-
ODistributedDatabaseImpl
public ODistributedDatabaseImpl(OrientDBDistributed context, ODistributedPlugin manager, String iDatabaseName)
-
-
Method Details
-
initProfilerHooks
public void initProfilerHooks() -
sendResponseBack
public static boolean sendResponseBack(Object current, ODistributedServerManager manager, ODistributedRequestId iRequestId, Object responsePayload) -
getPoolSize
-
getRecordPromiseManager
-
getIndexKeyPromiseManager
-
startOperation
public void startOperation() -
endOperation
public void endOperation() -
waitForOnline
public void waitForOnline()- Specified by:
waitForOnlinein interfaceODistributedDatabase
-
reEnqueue
public void reEnqueue(ODistributedRequestId requestId, String databaseName, ORemoteTask payload, int retryCount, int autoRetryDelay) - Specified by:
reEnqueuein interfaceODistributedDatabase
-
processRequest
Distributed requests against the available workers by using one queue per worker. This guarantee the sequence of the operations against the same record cluster.- Specified by:
processRequestin interfaceODistributedDatabase
-
trackTransactions
-
untrackTransactions
-
waitIsReady
-
waitDistributedIsReady
public void waitDistributedIsReady() -
setOnline
public void setOnline()- Specified by:
setOnlinein interfaceODistributedDatabase
-
fillStatus
public void fillStatus()- Specified by:
fillStatusin interfaceODistributedDatabase
-
unlockResourcesOfServer
- Specified by:
unlockResourcesOfServerin interfaceODistributedDatabase
-
validate
- Specified by:
validatein interfaceODistributedDatabase
-
commit
- Specified by:
commitin interfaceODistributedDatabase
-
rollback
- Specified by:
rollbackin interfaceODistributedDatabase
-
registerTxContext
public ODistributedTxContext registerTxContext(ODistributedRequestId reqId, ODistributedTxContext ctx) - Specified by:
registerTxContextin interfaceODistributedDatabase
-
nextId
- Specified by:
nextIdin interfaceODistributedDatabase
-
nextDDLId
- Specified by:
nextDDLIdin interfaceODistributedDatabase
-
missingTransactions
- Specified by:
missingTransactionsin interfaceODistributedDatabase
-
popTxContext
- Specified by:
popTxContextin interfaceODistributedDatabase
-
getTxContext
- Specified by:
getTxContextin interfaceODistributedDatabase
-
getManager
- Specified by:
getManagerin interfaceODistributedDatabase
-
exists
public boolean exists() -
handleUnreachableNode
Description copied from interface:ODistributedDatabaseUnlocks all the record locked by node iNodeName- Specified by:
handleUnreachableNodein interfaceODistributedDatabase- Parameters:
nodeName- node id
-
getDatabaseName
- Specified by:
getDatabaseNamein interfaceODistributedDatabase
-
getDatabaseInstance
- Specified by:
getDatabaseInstancein interfaceODistributedDatabase
-
getReceivedRequests
public long getReceivedRequests()- Specified by:
getReceivedRequestsin interfaceODistributedDatabase
-
getProcessedRequests
public long getProcessedRequests()- Specified by:
getProcessedRequestsin interfaceODistributedDatabase
-
onDropShutdown
public void onDropShutdown() -
shutdown
public void shutdown() -
shutdown
public void shutdown(boolean wait) -
removeProfilerHook
public void removeProfilerHook() -
initFirstOpen
-
getLocalNodeName
-
checkTxTimeout
public void checkTxTimeout() -
suspend
public void suspend() -
resume
public void resume() -
dump
- Specified by:
dumpin interfaceODistributedDatabase
-
getActiveTxContexts
-
validateStatus
- Specified by:
validateStatusin interfaceODistributedDatabase
-
status
- Specified by:
statusin interfaceODistributedDatabase
-
checkReverseSync
- Specified by:
checkReverseSyncin interfaceODistributedDatabase
-
localLock
-
localUnlock
-
getLastValidBackup
-
setLastValidBackup
-
resetLastValidBackup
public void resetLastValidBackup() -
clearLastValidBackup
public void clearLastValidBackup() -
freezeStatus
public void freezeStatus() -
releaseStatus
public void releaseStatus() -
incSentRequest
public void incSentRequest() -
getAvailableNodesButLocal
-