org.geotools.arcsde.session
Interface ISessionPool

All Known Implementing Classes:
SharedSessionPool

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

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

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(boolean transactional)
                    throws IOException,
                           UnavailableConnectionException
Grab a session from the pool, this session is the responsibility of the calling code and must be closed after use.

Parameters:
transactional - whether the session is intended to be used on a transaction, so the pool may choose to reuse or not a connection.
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.

getSession

ISession getSession()
                    throws IOException,
                           UnavailableConnectionException
Shortcut for getSession(true)

Throws:
IOException
UnavailableConnectionException
See Also:
getSession(boolean)

getConfig

ArcSDEConnectionConfig getConfig()


Copyright © 1996-2014 Geotools. All Rights Reserved.