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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddump()voidstatic voidexecuteNoDb(ODistributedRequest request, OrientDBDistributed ctx) booleanexists()voidgetAvailableNodesButLocal(ODatabaseSession database) protected StringintgetPoolSize(ExecutorService service) longlonggetTxContext(ODistributedRequestId requestId) voidvoidinitFirstOpen(ODatabaseDocumentInternal session) voidlocalLock(OLockKeySource keySource) voidlocalUnlock(List<OLockGuard> guards) 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) voidvoidvoidremoveRunning(List<OTransactionId> res) voidvoidresume()static booleansendResponseBack(ODistributedRequestId iRequestId, Object responsePayload, OrientDBDistributed ctx) voidsetLastValidBackup(OSyncSource lastValidBackup) voidvoidshutdown()voidshutdown(boolean wait) voidsuspend()voidvoidvoidvoidwaitIsReady(ORemoteTask task)
-
Field Details
-
databaseName
-
activeTxContexts
-
-
Constructor Details
-
ODistributedDatabaseImpl
-
-
Method Details
-
initProfilerHooks
public void initProfilerHooks() -
executeNoDb
-
sendResponseBack
public static boolean sendResponseBack(ODistributedRequestId iRequestId, Object responsePayload, OrientDBDistributed ctx) -
getPoolSize
-
getRecordPromiseManager
-
getIndexKeyPromiseManager
-
startOperation
public void startOperation()- Specified by:
startOperationin interfaceODistributedDatabase
-
endOperation
public void endOperation()- Specified by:
endOperationin 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
-
registerTxContext
public ODistributedTxContext registerTxContext(ODistributedRequestId reqId, ODistributedTxContext ctx) - Specified by:
registerTxContextin interfaceODistributedDatabase
-
popTxContext
- Specified by:
popTxContextin interfaceODistributedDatabase
-
getTxContext
- Specified by:
getTxContextin interfaceODistributedDatabase
-
exists
public boolean exists() -
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
-
resume
public void resume() -
dump
- Specified by:
dumpin interfaceODistributedDatabase
-
getActiveTxContexts
-
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
-
getContext
- Specified by:
getContextin interfaceODistributedDatabase
-
removeRunning
-