public class OReentrantResourcePool<K,V> extends OResourcePool<K,V> implements OOrientStartupListener, OOrientShutdownListener
OResourcePool
created, listener, resources, resourcesOut, sem, unmodifiableresources
Constructor and Description |
---|
OReentrantResourcePool(int maxResources,
OResourcePoolListener<K,V> listener) |
Modifier and Type | Method and Description |
---|---|
int |
getConnectionsInCurrentThread(K key) |
V |
getResource(K key,
long maxWaitMillis,
Object... additionalArgs) |
void |
onShutdown() |
void |
onStartup() |
void |
remove(V res) |
boolean |
returnResource(V res) |
close, getAllResources, getAvailableResources, getCreatedInstances, getInPoolResources, getMaxResources, getResources, getResourcesOutCount
public OReentrantResourcePool(int maxResources, OResourcePoolListener<K,V> listener)
public void onShutdown()
onShutdown
in interface OOrientShutdownListener
public void onStartup()
onStartup
in interface OOrientStartupListener
public V getResource(K key, long maxWaitMillis, Object... additionalArgs) throws OLockException
getResource
in class OResourcePool<K,V>
OLockException
public boolean returnResource(V res)
returnResource
in class OResourcePool<K,V>
public int getConnectionsInCurrentThread(K key)
public void remove(V res)
remove
in class OResourcePool<K,V>
Copyright © 2009–2020 OrientDB. All rights reserved.