Class ODatabaseDocumentTxPooled
java.lang.Object
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTxPooled
- All Implemented Interfaces:
ODatabaseDocument,ODatabase<ORecord>,ODatabaseDocumentInternal,ODatabaseInternal<ORecord>,ODatabasePooled,ODatabaseSession,OBackupable,Closeable,AutoCloseable
Pooled wrapper to the ODatabaseDocumentTx class. Allows to being reused across calls. The close()
method does not close the database for real but release it to the owner pool. The database born
as opened and will leave open until the pool is closed.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.db.ODatabase
ODatabase.ATTRIBUTES, ODatabase.OPERATION_MODE, ODatabase.STATUS -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx
embedded, internal, owner, remoteFields inherited from interface com.orientechnologies.orient.core.db.document.ODatabaseDocument
TYPE -
Constructor Summary
ConstructorsConstructorDescriptionODatabaseDocumentTxPooled(ODatabaseDocumentPool iOwnerPool, String iURL, String iUserName, String iUserPassword) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclose()Avoid to close it but rather release itself to the owner pool.create()Creates a new database.<DB extends ODatabase>
DBCreates new database from database backup.voidForce closing the current instance avoiding to being reused.booleanisClosed()Checks if the database is closed.booleanisPooled()booleanTells if the underlying database is closed.Opens a database using an authentication token received as an argument.Opens a database using the user and password received as arguments.voidReuses current instance.Methods inherited from class com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx
activateOnCurrentThread, addBlobCluster, addCluster, addCluster, afterCreateOperations, afterDeleteOperations, afterReadOperations, afterUpdateOperations, assignAndCheckCluster, backup, beforeCreateOperations, beforeDeleteOperations, beforeReadOperations, beforeUpdateOperations, begin, begin, begin, browseClass, browseClass, browseCluster, browseCluster, browseCluster, browseCluster, browseCluster, callbackHooks, callOnCloseListeners, callOnDropListeners, callOnOpenListeners, checkForClusterPermissions, checkIfActive, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, checkSecurity, cleanOutRecord, clearOwner, closeAll, command, command, command, commit, commit, commitPreallocate, copy, countClass, countClass, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countView, create, declareIntent, delete, delete, delete, drop, dropCluster, dropCluster, dropClusterInternal, execute, execute, executeDeleteRecord, executeReadRecord, exists, existsCluster, freeze, freeze, get, getActiveIntent, getBlobClusterIds, getClusterDataRange, getClusterIdByName, getClusterName, getClusterNameById, getClusterNames, getClusterRecordConflictStrategy, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getClustersIds, getCollectionsChanges, getConfiguration, getConflictStrategy, getDatabaseOwner, getDefaultClusterId, getDefaultSerializer, getDictionary, getHooks, getLastClusterPosition, getListeners, getLocalCache, getMetadata, getName, getOrCreateEmbeddedFactory, getOrCreateRemoteFactory, getProperties, getProperty, getRecord, getRecordMetadata, getRecordType, getSbTreeCollectionManager, getSerializer, getSerializerFactory, getSharedContext, getSize, getStatus, getStorage, getStorageInfo, getStorageVersions, getTransaction, getType, getUnderlying, getURL, getUser, getViewFromCluster, incrementalBackup, internalClose, internalCommit, internalCommitPreallocate, internalLockRecord, internalUnlockRecord, isActiveOnCurrentThread, isClusterEdge, isClusterVertex, isClusterView, isMVCC, isPrefetchRecords, isRemote, isRetainRecords, isUseLightweightEdges, isValidationEnabled, live, live, load, load, load, load, load, load, loadIfVersionIsNotLatest, lock, lock, newBlob, newBlob, newEdge, newEdge, newElement, newElement, newEmbeddedElement, newEmbeddedElement, newInstance, newInstance, newLightweightEdge, newRegularEdge, newVertex, newVertex, query, query, query, rawBegin, recycle, registerHook, registerHook, registerListener, release, reload, reload, reload, reloadUser, replaceStorage, resetInitialization, restore, rollback, rollback, save, save, save, save, saveAll, sendSequenceAction, set, setConflictStrategy, setConflictStrategy, setCustom, setDatabaseOwner, setDefaultClusterId, setDefaultSerializer, setDefaultTransactionMode, setInternal, setMVCC, setPrefetchRecords, setProperty, setRetainRecords, setSerializer, setStatus, setupThreadOwner, setUseLightweightEdges, setUser, setValidationEnabled, truncateClass, truncateClass, truncateCluster, truncateClusterInternal, unlock, unregisterHook, unregisterListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.db.ODatabase
createClass, executeWithRetry, getClassMethods inherited from interface com.orientechnologies.orient.core.db.document.ODatabaseDocument
createClassIfNotExist, createEdgeClass, createVertexClass, newEdge, newVertex, reloadMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseDocumentInternal
endEsclusiveMetadataChange, getActiveQueries, getActiveQuery, getHaStatus, getStorageId, indexQuery, isDistributed, isLocalEnv, queryOnNode, queryStartUsingViewCluster, queryStartUsingViewIndex, realClose, removeHaServer, reuse, startEsclusiveMetadataChange, swapTx, sync, syncCommitMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseInternal
addRidbagPrefetchStats, createInterruptTimerTask, getActiveClusterMap, getActiveDataCenterMap, getEnterpriseEndpoint, getLocalNodeName, getStats, isSharded, resetRecordLoadStats
-
Constructor Details
-
ODatabaseDocumentTxPooled
public ODatabaseDocumentTxPooled(ODatabaseDocumentPool iOwnerPool, String iURL, String iUserName, String iUserPassword)
-
-
Method Details
-
reuse
Description copied from interface:ODatabasePooledReuses current instance.- Specified by:
reusein interfaceODatabasePooled
-
open
Description copied from interface:ODatabaseOpens a database using the user and password received as arguments.- Specified by:
openin interfaceODatabase<ORecord>- Overrides:
openin classODatabaseDocumentTx- Parameters:
iUserName- Username to loginiUserPassword- Password associated to the user- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
open
Description copied from interface:ODatabaseInternalOpens a database using an authentication token received as an argument.- Specified by:
openin interfaceODatabaseInternal<ORecord>- Overrides:
openin classODatabaseDocumentTx- Parameters:
iToken- Authentication token- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
create
Description copied from interface:ODatabaseCreates a new database.- Specified by:
createin interfaceODatabase<ORecord>- Overrides:
createin classODatabaseDocumentTx- Returns:
- The Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
create
Description copied from interface:ODatabaseCreates new database from database backup. Only incremental backups are supported.- Specified by:
createin interfaceODatabase<ORecord>- Overrides:
createin classODatabaseDocumentTx- Type Parameters:
DB- Concrete database instance type.- Parameters:
incrementalBackupPath- Path to incremental backup- Returns:
- he Database instance itself giving a "fluent interface". Useful to call multiple methods in chain.
-
isUnderlyingOpen
public boolean isUnderlyingOpen()Description copied from interface:ODatabasePooledTells if the underlying database is closed.- Specified by:
isUnderlyingOpenin interfaceODatabasePooled
-
isClosed
public boolean isClosed()Description copied from interface:ODatabaseChecks if the database is closed.- Specified by:
isClosedin interfaceODatabase<ORecord>- Overrides:
isClosedin classODatabaseDocumentTx- Returns:
- true if is closed, otherwise false.
-
isPooled
public boolean isPooled()- Specified by:
isPooledin interfaceODatabaseDocument- Overrides:
isPooledin classODatabaseDocumentTx- Returns:
trueif database is obtained from the pool andfalseotherwise.
-
close
public void close()Avoid to close it but rather release itself to the owner pool.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceODatabase<ORecord>- Overrides:
closein classODatabaseDocumentTx
-
forceClose
public void forceClose()Description copied from interface:ODatabasePooledForce closing the current instance avoiding to being reused.- Specified by:
forceClosein interfaceODatabasePooled
-
checkOpenness
protected void checkOpenness()- Overrides:
checkOpennessin classODatabaseDocumentTx
-