public abstract class ODatabasePoolAbstract<DB extends ODatabaseInternal> extends OAdaptiveLock implements OResourcePoolListener<String,DB>, OOrientListener
Constructor and Description |
---|
ODatabasePoolAbstract(Object iOwner,
int iMinSize,
int iMaxSize) |
ODatabasePoolAbstract(Object iOwner,
int iMinSize,
int iMaxSize,
int iTimeout,
long idleTimeoutMillis,
long timeBetweenEvictionRunsMillis) |
ODatabasePoolAbstract(Object iOwner,
int iMinSize,
int iMaxSize,
long idleTimeout,
long timeBetweenEvictionRunsMillis) |
Modifier and Type | Method and Description |
---|---|
DB |
acquire(String iURL,
String iUserName,
String iUserPassword) |
DB |
acquire(String iURL,
String iUserName,
String iUserPassword,
Map<String,Object> iOptionalParams) |
void |
close()
Closes all the databases.
|
int |
getAvailableConnections(String url,
String userName) |
int |
getConnectionsInCurrentThread(String url,
String userName) |
int |
getCreatedInstances(String url,
String userName) |
int |
getMaxConnections(String url,
String userName) |
int |
getMaxSize() |
Map<String,OReentrantResourcePool<String,DB>> |
getPools() |
void |
onShutdown() |
void |
onStorageRegistered(OStorage iStorage) |
void |
onStorageUnregistered(OStorage iStorage)
Removes from memory the pool associated to the closed storage.
|
void |
release(DB iDatabase) |
void |
remove(String iPoolName) |
void |
remove(String iName,
String iUser) |
getUnderlying, isConcurrent, isHeldByCurrentThread, lock, tryAcquireLock, tryAcquireLock, unlock
callInLock
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createNewResource, reuseResource
protected Object owner
public ODatabasePoolAbstract(Object iOwner, int iMinSize, int iMaxSize)
public ODatabasePoolAbstract(Object iOwner, int iMinSize, int iMaxSize, long idleTimeout, long timeBetweenEvictionRunsMillis)
public ODatabasePoolAbstract(Object iOwner, int iMinSize, int iMaxSize, int iTimeout, long idleTimeoutMillis, long timeBetweenEvictionRunsMillis)
public DB acquire(String iURL, String iUserName, String iUserPassword) throws OLockException
OLockException
public DB acquire(String iURL, String iUserName, String iUserPassword, Map<String,Object> iOptionalParams) throws OLockException
OLockException
public void release(DB iDatabase)
public Map<String,OReentrantResourcePool<String,DB>> getPools()
public void close()
close
in interface OLock
close
in class OAdaptiveLock
public void remove(String iPoolName)
public int getMaxSize()
public void onStorageRegistered(OStorage iStorage)
onStorageRegistered
in interface OOrientListener
public void onStorageUnregistered(OStorage iStorage)
onStorageUnregistered
in interface OOrientListener
public void onShutdown()
onShutdown
in interface OOrientListener
onShutdown
in interface OOrientShutdownListener
Copyright © 2009–2020 OrientDB. All rights reserved.