public interface ISessionPool
SeConnection
's for a single set of connection properties (for instance: by
server, port, user and password) in a pool to recycle used connections.
The expected optional parameters that you can set up in the argument Map for createDataStore are:
Modifier and Type | Method and Description |
---|---|
void |
close()
closes all connections in this pool.
|
int |
getAvailableCount()
Returns the number of idle connections
|
ArcSDEConnectionConfig |
getConfig() |
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
|
int getPoolSize()
void close()
boolean isClosed()
int getAvailableCount()
int getInUseCount()
ISession getSession(boolean transactional) throws IOException, UnavailableConnectionException
transactional
- 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 connectionsIllegalStateException
- If pool has been closed.ISession getSession() throws IOException, UnavailableConnectionException
getSession(true)
IOException
UnavailableConnectionException
getSession(boolean)
ArcSDEConnectionConfig getConfig()
Copyright © 1996–2019 Geotools. All rights reserved.