Class OObjectDatabaseTxPooled
java.lang.Object
com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object>
com.orientechnologies.orient.object.db.OObjectDatabaseTx
com.orientechnologies.orient.object.db.OObjectDatabaseTxPooled
- All Implemented Interfaces:
ODatabaseObject,ODatabase<Object>,ODatabaseInternal<Object>,ODatabasePooled,OUserObject2RecordHandler,OBackupable,Closeable,AutoCloseable
Pooled wrapper to the OObjectDatabaseTx 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.object.db.OObjectDatabaseTx
automaticSchemaGeneration, dictionary, entityManager, lazyLoading, metadata, saveOnlyDirty, TYPEFields inherited from class com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract
databaseOwner, underlying -
Constructor Summary
ConstructorsConstructorDescriptionOObjectDatabaseTxPooled(OObjectDatabasePool 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.<THISDB extends ODatabase>
THISDBCreates new database from database backup.voidForce closing the current instance avoiding to being reused.booleanisClosed()Checks if the database is closed.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.object.db.OObjectDatabaseTx
addBlobCluster, attach, attachAndSave, begin, begin, begin, browseClass, browseClass, browseClass, browseClass, browseCluster, callbackHooks, checkSecurity, checkSecurity, checkSecurity, command, command, command, commit, commit, convertParameter, convertParameters, countClass, countClass, countClass, delete, delete, delete, delete, deleteCascade, deleteOrphans, deregisterClassMethodFilter, detach, detach, detachAll, detachAll, execute, execute, executeWithRetry, existsUserObjectByRID, getBlobClusterIds, getConflictStrategy, getDictionary, getEntityManager, getHooks, getIdentity, getListeners, getMetadata, getRecordByUserObject, getSharedContext, getStorageInfo, getTransaction, getType, getUnderlying, getUser, getUserObjectByRecord, getUserObjectByRecord, getVersion, incrementalBackup, init, isAutomaticSchemaGeneration, isLazyLoading, isManaged, isMVCC, isRetainObjects, isSaveOnlyDirty, live, live, load, load, load, load, load, load, lock, lock, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, objectCommand, objectCommand, objectQuery, objectQuery, pojo2Stream, query, query, query, registerClassMethodFilter, registerHook, registerHook, registerUserObject, registerUserObjectAfterLinkSave, reload, reload, reload, reload, resetInitialization, rollback, rollback, save, save, save, save, setAutomaticSchemaGeneration, setConflictStrategy, setConflictStrategy, setDirty, setInternal, setLazyLoading, setMVCC, setRetainObjects, setSaveOnlyDirty, setUser, stream2pojo, stream2pojo, unlock, unregisterHook, unregisterPojo, unsetDirtyMethods inherited from class com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract
activateOnCurrentThread, addCluster, addCluster, backup, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, create, declareIntent, drop, dropCluster, dropCluster, equals, exists, existsCluster, freeze, freeze, get, getActiveIntent, getClusterIdByName, getClusterNameById, getClusterNames, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getConfiguration, getDatabaseOwner, getDefaultClusterId, getLocalCache, getName, getProperties, getProperty, getRecordMetadata, getSize, getStatus, getStorage, getURL, isActiveOnCurrentThread, registerListener, release, reload, replaceStorage, restore, set, setDatabaseOwner, setProperty, setStatus, toString, truncateCluster, unregisterListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.util.OBackupable
backup, restoreMethods inherited from interface com.orientechnologies.orient.core.db.ODatabase
activateOnCurrentThread, addCluster, addCluster, countClusterElements, countClusterElements, countClusterElements, countClusterElements, countClusterElements, create, createClass, declareIntent, drop, dropCluster, dropCluster, exists, existsCluster, freeze, freeze, get, getActiveIntent, getClass, getClusterIdByName, getClusterNameById, getClusterNames, getClusterRecordSizeById, getClusterRecordSizeByName, getClusters, getConfiguration, getDefaultClusterId, getLocalCache, getName, getProperties, getProperty, getRecordMetadata, getSize, getStatus, getURL, isActiveOnCurrentThread, registerListener, release, reload, set, setProperty, setStatus, truncateCluster, unregisterListenerMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseInternal
addRidbagPrefetchStats, createInterruptTimerTask, getActiveClusterMap, getActiveDataCenterMap, getEnterpriseEndpoint, getLocalNodeName, getStats, isSharded, resetRecordLoadStatsMethods inherited from interface com.orientechnologies.orient.core.db.object.ODatabaseObject
detachAll
-
Constructor Details
-
OObjectDatabaseTxPooled
public OObjectDatabaseTxPooled(OObjectDatabasePool 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<Object>- Overrides:
openin classOObjectDatabaseTx- 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<Object>- Overrides:
openin classOObjectDatabaseTx- 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<Object>- Overrides:
createin classODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object> - 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<Object>- Overrides:
createin classODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object> - Type Parameters:
THISDB- 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.
-
isClosed
public boolean isClosed()Description copied from interface:ODatabaseChecks if the database is closed.- Specified by:
isClosedin interfaceODatabase<Object>- Overrides:
isClosedin classODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object> - Returns:
- true if is closed, otherwise false.
-
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<Object>- Overrides:
closein classODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object>
-
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 classODatabaseWrapperAbstract<ODatabaseDocumentInternal,Object>
-
isUnderlyingOpen
public boolean isUnderlyingOpen()Description copied from interface:ODatabasePooledTells if the underlying database is closed.- Specified by:
isUnderlyingOpenin interfaceODatabasePooled
-