public class JDBCSessionIdManager extends AbstractSessionIdManager
Modifier and Type | Class and Description |
---|---|
static class |
JDBCSessionIdManager.DatabaseAdaptor
DatabaseAdaptor
Handles differences between databases.
|
protected class |
JDBCSessionIdManager.Scavenger
Scavenger
|
static class |
JDBCSessionIdManager.SessionIdTableSchema
SessionIdTableSchema
|
static class |
JDBCSessionIdManager.SessionTableSchema
SessionTableSchema
|
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
_random, _reseed, _weakRandom, _workerAttr, _workerName
Constructor and Description |
---|
JDBCSessionIdManager(Server server) |
JDBCSessionIdManager(Server server,
Random random) |
Modifier and Type | Method and Description |
---|---|
void |
addSession(HttpSession session)
Add a session to the list of known sessions for a given ID.
|
void |
addSession(String id) |
void |
doStart()
Start up the id manager.
|
void |
doStop()
Stop the scavenger.
|
String |
getBlobType()
Deprecated.
see DbAdaptor.getBlobType
|
protected Connection |
getConnection()
Get a connection from the driver or datasource.
|
String |
getConnectionUrl() |
DataSource |
getDataSource() |
String |
getDatasourceName() |
JDBCSessionIdManager.DatabaseAdaptor |
getDbAdaptor() |
int |
getDeleteBlockSize() |
String |
getDriverClassName() |
String |
getLongType()
Deprecated.
see DbAdaptor.getLogType
|
long |
getScavengeInterval() |
JDBCSessionIdManager.SessionIdTableSchema |
getSessionIdTableSchema() |
JDBCSessionIdManager.SessionTableSchema |
getSessionTableSchema() |
boolean |
idInUse(String id) |
void |
invalidateAll(String id)
Invalidate the session matching the id on all contexts.
|
void |
removeSession(HttpSession session)
Remove session from the list of known sessions for a given ID.
|
void |
removeSession(String id) |
void |
renewSessionId(String oldClusterId,
String oldNodeId,
HttpServletRequest request)
Change the existing session id.
|
void |
setBlobType(String name)
Deprecated.
see DbAdaptor.setBlobType
|
void |
setDatasource(DataSource ds) |
void |
setDatasourceName(String jndi) |
void |
setDbAdaptor(JDBCSessionIdManager.DatabaseAdaptor dbAdaptor) |
void |
setDeleteBlockSize(int bsize) |
void |
setDriverInfo(Driver driverClass,
String connectionUrl)
Configure jdbc connection information via a jdbc Driver
|
void |
setDriverInfo(String driverClassName,
String connectionUrl)
Configure jdbc connection information via a jdbc Driver
|
void |
setLongType(String longType)
Deprecated.
see DbAdaptor.setLongType
|
void |
setScavengeInterval(long sec) |
void |
setSessionIdTableSchema(JDBCSessionIdManager.SessionIdTableSchema sessionIdTableSchema) |
void |
setSessionTableSchema(JDBCSessionIdManager.SessionTableSchema sessionTableSchema) |
getClusterId, getNodeId, getRandom, getReseed, getWorkerName, initRandom, newSessionId, newSessionId, setRandom, setReseed, setWorkerName
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public static final int MAX_INTERVAL_NOT_SET
protected Server _server
protected Driver _driver
protected String _driverClassName
protected String _connectionUrl
protected DataSource _datasource
protected String _jndiName
protected int _deleteBlockSize
protected Scheduler.Task _task
protected Scheduler _scheduler
protected JDBCSessionIdManager.Scavenger _scavenger
protected boolean _ownScheduler
protected long _lastScavengeTime
protected long _scavengeIntervalMs
protected String _createSessionIdTable
protected String _createSessionTable
protected String _selectBoundedExpiredSessions
protected String _insertId
protected String _deleteId
protected String _queryId
protected String _insertSession
protected String _deleteSession
protected String _updateSession
protected String _updateSessionNode
protected String _updateSessionAccessTime
protected JDBCSessionIdManager.DatabaseAdaptor _dbAdaptor
protected JDBCSessionIdManager.SessionIdTableSchema _sessionIdTableSchema
protected JDBCSessionIdManager.SessionTableSchema _sessionTableSchema
public JDBCSessionIdManager(Server server)
public void setDriverInfo(String driverClassName, String connectionUrl)
driverClassName
- connectionUrl
- public void setDriverInfo(Driver driverClass, String connectionUrl)
driverClass
- connectionUrl
- public void setDatasource(DataSource ds)
public DataSource getDataSource()
public String getDriverClassName()
public String getConnectionUrl()
public void setDatasourceName(String jndi)
public String getDatasourceName()
public void setBlobType(String name)
name
- public JDBCSessionIdManager.DatabaseAdaptor getDbAdaptor()
public void setDbAdaptor(JDBCSessionIdManager.DatabaseAdaptor dbAdaptor)
public String getBlobType()
public String getLongType()
public void setLongType(String longType)
longType
- public JDBCSessionIdManager.SessionIdTableSchema getSessionIdTableSchema()
public void setSessionIdTableSchema(JDBCSessionIdManager.SessionIdTableSchema sessionIdTableSchema)
public JDBCSessionIdManager.SessionTableSchema getSessionTableSchema()
public void setSessionTableSchema(JDBCSessionIdManager.SessionTableSchema sessionTableSchema)
public void setDeleteBlockSize(int bsize)
public int getDeleteBlockSize()
public void setScavengeInterval(long sec)
public long getScavengeInterval()
public void addSession(HttpSession session)
SessionIdManager
session
- The sessionpublic void addSession(String id)
public void removeSession(HttpSession session)
SessionIdManager
public void removeSession(String id)
public boolean idInUse(String id)
id
- The session ID without any cluster node extensionpublic void invalidateAll(String id)
id
- The session ID without any cluster node extensionSessionIdManager.invalidateAll(java.lang.String)
public void renewSessionId(String oldClusterId, String oldNodeId, HttpServletRequest request)
SessionIdManager
renewSessionId
in interface SessionIdManager
renewSessionId
in class AbstractSessionIdManager
public void doStart() throws Exception
doStart
in class AbstractSessionIdManager
Exception
public void doStop() throws Exception
doStop
in class AbstractSessionIdManager
Exception
protected Connection getConnection() throws SQLException
SQLException
Copyright © 1995-2015 Webtide. All Rights Reserved.