org.sequalite.session
Class SessionPool

java.lang.Object
  extended by org.sequalite.session.SessionPool

public class SessionPool
extends java.lang.Object


Constructor Summary
SessionPool(java.sql.Connection connection, java.util.logging.Level sqlLevel, int poolsize, int poolSizeIncrement, long poolMonitorInterval)
           
SessionPool(java.util.Properties properties, java.lang.String jdbcContext, java.util.logging.Level sqlLevel, int poolsize, int poolSizeIncrement, long poolMonitorInterval)
           
SessionPool(java.util.Properties properties, java.lang.String jdbcContext, java.lang.String dsName, java.sql.Connection connection, java.util.logging.Level sqlLevel, int poolsize, int poolSizeIncrement, long poolMonitorInterval)
           
SessionPool(java.lang.String dsName, java.util.logging.Level sqlLevel, int poolsize, int poolSizeIncrement, long poolMonitorInterval)
           
 
Method Summary
 void closeSessions()
          close all sessions
 Session getSession()
          get a session from the pool
 void reapSessions()
          remove unused and stale connections
 void returnSession(Session session)
          returns the session to the pool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionPool

public SessionPool(java.sql.Connection connection,
                   java.util.logging.Level sqlLevel,
                   int poolsize,
                   int poolSizeIncrement,
                   long poolMonitorInterval)

SessionPool

public SessionPool(java.util.Properties properties,
                   java.lang.String jdbcContext,
                   java.util.logging.Level sqlLevel,
                   int poolsize,
                   int poolSizeIncrement,
                   long poolMonitorInterval)

SessionPool

public SessionPool(java.util.Properties properties,
                   java.lang.String jdbcContext,
                   java.lang.String dsName,
                   java.sql.Connection connection,
                   java.util.logging.Level sqlLevel,
                   int poolsize,
                   int poolSizeIncrement,
                   long poolMonitorInterval)

SessionPool

public SessionPool(java.lang.String dsName,
                   java.util.logging.Level sqlLevel,
                   int poolsize,
                   int poolSizeIncrement,
                   long poolMonitorInterval)
Method Detail

closeSessions

public void closeSessions()
                   throws SeQuaLiteException
close all sessions

Throws:
SeQuaLiteException

getSession

public Session getSession()
                   throws SeQuaLiteException
get a session from the pool

Returns:
Throws:
SeQuaLiteException

reapSessions

public void reapSessions()
remove unused and stale connections


returnSession

public void returnSession(Session session)
returns the session to the pool

Parameters:
session -