org.geotools.arcsde.session
Interface ISessionPool


public interface ISessionPool

Maintains 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:

Author:
Gabriel Roldan
Module:
modules/plugin/common (gt-common.jar)

Method Summary
 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()
          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
 

Method Detail

getPoolSize

int getPoolSize()
returns the number of actual connections held by this connection pool. In other words, the sum of used and available connections, regardless


close

void close()
closes all connections in this pool. The first call closes all SeConnections, further calls have no effect.


isClosed

boolean isClosed()
Returns whether this pool is closed

Returns:

getAvailableCount

int getAvailableCount()
Returns the number of idle connections


getInUseCount

int getInUseCount()
Number of active sessions.

Returns:
Number of active session; used to monitor the live pool.

getSession

ISession getSession()
                    throws IOException,
                           UnavailableConnectionException
Grab a session from the pool, this session is the responsibility of the calling code and must be closed after use.

Returns:
A Session, when close() is called it will be recycled into the pool
Throws:
IOException - If we could not get a connection
UnavailableConnectionException - If we are out of connections
IllegalStateException - If pool has been closed.

getConfig

ArcSDEConnectionConfig getConfig()


Copyright © 1996-2009 Geotools. All Rights Reserved.