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.AbstractLifeCycleListenerLifeCycle.Listener_random, _reseed, _weakRandom, _workerAttr, _workerNameFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| 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, setWorkerNameaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic 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 - the driver classnameconnectionUrl - the driver connection urlpublic void setDriverInfo(Driver driverClass, String connectionUrl)
driverClass - the driver classconnectionUrl - the driver connection urlpublic void setDatasource(DataSource ds)
public DataSource getDataSource()
public String getDriverClassName()
public String getConnectionUrl()
public void setDatasourceName(String jndi)
public String getDatasourceName()
@Deprecated public void setBlobType(String name)
name - the name of the blobpublic JDBCSessionIdManager.DatabaseAdaptor getDbAdaptor()
public void setDbAdaptor(JDBCSessionIdManager.DatabaseAdaptor dbAdaptor)
@Deprecated public String getBlobType()
@Deprecated public String getLongType()
@Deprecated public void setLongType(String longType)
longType - the long typepublic 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)
SessionIdManagersession - The sessionpublic void addSession(String id)
public void removeSession(HttpSession session)
SessionIdManagersession - the session to removepublic 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)
SessionIdManagerrenewSessionId in interface SessionIdManagerrenewSessionId in class AbstractSessionIdManageroldClusterId - the old cluster idoldNodeId - the old node idrequest - the request containing the sessionpublic void doStart()
throws Exception
doStart in class AbstractSessionIdManagerExceptionpublic void doStop()
throws Exception
doStop in class AbstractSessionIdManagerExceptionprotected Connection getConnection() throws SQLException
SQLException - if unable to get the connectionCopyright © 1995–2017 Webtide. All rights reserved.