public final class SharedSessionPool extends Object implements ISessionPool
session pool that is not closable and hence can be shared between
different applications/datastores when referenced by a JNDI context.| Modifier | Constructor and Description |
|---|---|
protected |
SharedSessionPool(ISessionPool delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes all connections in this pool.
|
protected void |
finalize() |
int |
getAvailableCount()
Returns the number of idle connections
|
ArcSDEConnectionConfig |
getConfig() |
static ISessionPool |
getInstance(ArcSDEConnectionConfig config,
ISessionPoolFactory factory) |
int |
getInUseCount()
Number of active sessions.
|
int |
getPoolSize()
returns the number of actual connections held by this connection pool.
|
ISession |
getSession()
Shortcut for
getSession(true) |
ISession |
getSession(boolean transactional)
Grab a session from the pool, this session is the responsibility of the calling code and must
be closed after use.
|
boolean |
isClosed()
Returns whether this pool is closed
|
String |
toString() |
protected SharedSessionPool(ISessionPool delegate) throws IOException
IOExceptionpublic static ISessionPool getInstance(ArcSDEConnectionConfig config, ISessionPoolFactory factory) throws IOException
IOExceptionpublic void close()
ISessionPoolclose in interface ISessionPoolISessionPool.close()public int getAvailableCount()
ISessionPoolgetAvailableCount in interface ISessionPoolISessionPool.getAvailableCount()public ArcSDEConnectionConfig getConfig()
getConfig in interface ISessionPoolISessionPool.getConfig()public int getInUseCount()
ISessionPoolgetInUseCount in interface ISessionPoolISessionPool.getInUseCount()public int getPoolSize()
ISessionPoolgetPoolSize in interface ISessionPoolISessionPool.getPoolSize()public ISession getSession() throws IOException, UnavailableConnectionException
ISessionPoolgetSession(true)getSession in interface ISessionPoolIOExceptionUnavailableConnectionExceptionISessionPool.getSession()public ISession getSession(boolean transactional) throws IOException, UnavailableConnectionException
ISessionPoolgetSession in interface ISessionPooltransactional - whether the session is intended to be used on a transaction, so the pool
may choose to reuse or not a connection.IOException - If we could not get a connectionUnavailableConnectionException - If we are out of connectionsISessionPool.getSession(boolean)public boolean isClosed()
ISessionPoolisClosed in interface ISessionPoolISessionPool.isClosed()Copyright © 1996–2019 Geotools. All rights reserved.