Package org.eclipse.jetty.server.session
Class JDBCSessionDataStore.SessionTableSchema
- java.lang.Object
-
- org.eclipse.jetty.server.session.JDBCSessionDataStore.SessionTableSchema
-
- Enclosing class:
- JDBCSessionDataStore
public static class JDBCSessionDataStore.SessionTableSchema extends java.lang.Object
SessionTableSchema
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_accessTimeColumn
protected java.lang.String
_catalogName
protected java.lang.String
_contextPathColumn
protected java.lang.String
_cookieTimeColumn
protected java.lang.String
_createTimeColumn
protected DatabaseAdaptor
_dbAdaptor
protected java.lang.String
_expiryTimeColumn
protected java.lang.String
_idColumn
protected java.lang.String
_lastAccessTimeColumn
protected java.lang.String
_lastNodeColumn
protected java.lang.String
_lastSavedTimeColumn
protected java.lang.String
_mapColumn
protected java.lang.String
_maxIntervalColumn
protected java.lang.String
_schemaName
protected java.lang.String
_tableName
protected java.lang.String
_virtualHostColumn
static java.lang.String
INFERRED
static int
MAX_INTERVAL_NOT_SET
-
Constructor Summary
Constructors Constructor Description SessionTableSchema()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccessTimeColumn()
java.sql.PreparedStatement
getAllAncientExpiredSessionsStatement(java.sql.Connection connection)
java.lang.String
getAlterTableForMaxIntervalAsString()
java.lang.String
getCatalogName()
java.sql.PreparedStatement
getCheckSessionExistsStatement(java.sql.Connection connection, SessionContext context)
java.lang.String
getContextPathColumn()
java.lang.String
getCookieTimeColumn()
java.lang.String
getCreateIndexOverExpiryStatementAsString(java.lang.String indexName)
java.lang.String
getCreateIndexOverSessionStatementAsString(java.lang.String indexName)
java.lang.String
getCreateStatementAsString()
java.lang.String
getCreateTimeColumn()
java.sql.PreparedStatement
getDeleteStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId)
java.sql.PreparedStatement
getExpiredSessionsStatement(java.sql.Connection connection, java.lang.String canonicalContextPath, java.lang.String vhost, long expiry)
java.lang.String
getExpiryTimeColumn()
java.lang.String
getIdColumn()
java.lang.String
getInsertSessionStatementAsString()
java.lang.String
getLastAccessTimeColumn()
java.lang.String
getLastNodeColumn()
java.lang.String
getLastSavedTimeColumn()
java.sql.PreparedStatement
getLoadStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId)
java.lang.String
getMapColumn()
java.lang.String
getMaxIntervalColumn()
java.sql.PreparedStatement
getMyExpiredSessionsStatement(java.sql.Connection connection, SessionContext sessionContext, long expiry)
java.lang.String
getSchemaName()
java.lang.String
getTableName()
java.sql.PreparedStatement
getUpdateSessionStatement(java.sql.Connection connection, java.lang.String id, SessionContext context)
java.sql.PreparedStatement
getUpdateStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId)
java.lang.String
getVirtualHostColumn()
void
prepareTables()
Set up the tables in the databasevoid
setAccessTimeColumn(java.lang.String accessTimeColumn)
void
setCatalogName(java.lang.String catalogName)
void
setContextPathColumn(java.lang.String contextPathColumn)
void
setCookieTimeColumn(java.lang.String cookieTimeColumn)
void
setCreateTimeColumn(java.lang.String createTimeColumn)
protected void
setDatabaseAdaptor(DatabaseAdaptor dbadaptor)
void
setExpiryTimeColumn(java.lang.String expiryTimeColumn)
void
setIdColumn(java.lang.String idColumn)
void
setLastAccessTimeColumn(java.lang.String lastAccessTimeColumn)
void
setLastNodeColumn(java.lang.String lastNodeColumn)
void
setLastSavedTimeColumn(java.lang.String lastSavedTimeColumn)
void
setMapColumn(java.lang.String mapColumn)
void
setMaxIntervalColumn(java.lang.String maxIntervalColumn)
void
setSchemaName(java.lang.String schemaName)
void
setTableName(java.lang.String tableName)
void
setVirtualHostColumn(java.lang.String virtualHostColumn)
java.lang.String
toString()
-
-
-
Field Detail
-
MAX_INTERVAL_NOT_SET
public static final int MAX_INTERVAL_NOT_SET
- See Also:
- Constant Field Values
-
INFERRED
public static final java.lang.String INFERRED
- See Also:
- Constant Field Values
-
_dbAdaptor
protected DatabaseAdaptor _dbAdaptor
-
_schemaName
protected java.lang.String _schemaName
-
_catalogName
protected java.lang.String _catalogName
-
_tableName
protected java.lang.String _tableName
-
_idColumn
protected java.lang.String _idColumn
-
_contextPathColumn
protected java.lang.String _contextPathColumn
-
_virtualHostColumn
protected java.lang.String _virtualHostColumn
-
_lastNodeColumn
protected java.lang.String _lastNodeColumn
-
_accessTimeColumn
protected java.lang.String _accessTimeColumn
-
_lastAccessTimeColumn
protected java.lang.String _lastAccessTimeColumn
-
_createTimeColumn
protected java.lang.String _createTimeColumn
-
_cookieTimeColumn
protected java.lang.String _cookieTimeColumn
-
_lastSavedTimeColumn
protected java.lang.String _lastSavedTimeColumn
-
_expiryTimeColumn
protected java.lang.String _expiryTimeColumn
-
_maxIntervalColumn
protected java.lang.String _maxIntervalColumn
-
_mapColumn
protected java.lang.String _mapColumn
-
-
Method Detail
-
setDatabaseAdaptor
protected void setDatabaseAdaptor(DatabaseAdaptor dbadaptor)
-
setCatalogName
public void setCatalogName(java.lang.String catalogName)
-
getCatalogName
public java.lang.String getCatalogName()
-
getSchemaName
public java.lang.String getSchemaName()
-
setSchemaName
public void setSchemaName(java.lang.String schemaName)
-
getTableName
public java.lang.String getTableName()
-
setTableName
public void setTableName(java.lang.String tableName)
-
getIdColumn
public java.lang.String getIdColumn()
-
setIdColumn
public void setIdColumn(java.lang.String idColumn)
-
getContextPathColumn
public java.lang.String getContextPathColumn()
-
setContextPathColumn
public void setContextPathColumn(java.lang.String contextPathColumn)
-
getVirtualHostColumn
public java.lang.String getVirtualHostColumn()
-
setVirtualHostColumn
public void setVirtualHostColumn(java.lang.String virtualHostColumn)
-
getLastNodeColumn
public java.lang.String getLastNodeColumn()
-
setLastNodeColumn
public void setLastNodeColumn(java.lang.String lastNodeColumn)
-
getAccessTimeColumn
public java.lang.String getAccessTimeColumn()
-
setAccessTimeColumn
public void setAccessTimeColumn(java.lang.String accessTimeColumn)
-
getLastAccessTimeColumn
public java.lang.String getLastAccessTimeColumn()
-
setLastAccessTimeColumn
public void setLastAccessTimeColumn(java.lang.String lastAccessTimeColumn)
-
getCreateTimeColumn
public java.lang.String getCreateTimeColumn()
-
setCreateTimeColumn
public void setCreateTimeColumn(java.lang.String createTimeColumn)
-
getCookieTimeColumn
public java.lang.String getCookieTimeColumn()
-
setCookieTimeColumn
public void setCookieTimeColumn(java.lang.String cookieTimeColumn)
-
getLastSavedTimeColumn
public java.lang.String getLastSavedTimeColumn()
-
setLastSavedTimeColumn
public void setLastSavedTimeColumn(java.lang.String lastSavedTimeColumn)
-
getExpiryTimeColumn
public java.lang.String getExpiryTimeColumn()
-
setExpiryTimeColumn
public void setExpiryTimeColumn(java.lang.String expiryTimeColumn)
-
getMaxIntervalColumn
public java.lang.String getMaxIntervalColumn()
-
setMaxIntervalColumn
public void setMaxIntervalColumn(java.lang.String maxIntervalColumn)
-
getMapColumn
public java.lang.String getMapColumn()
-
setMapColumn
public void setMapColumn(java.lang.String mapColumn)
-
getCreateStatementAsString
public java.lang.String getCreateStatementAsString()
-
getCreateIndexOverExpiryStatementAsString
public java.lang.String getCreateIndexOverExpiryStatementAsString(java.lang.String indexName)
-
getCreateIndexOverSessionStatementAsString
public java.lang.String getCreateIndexOverSessionStatementAsString(java.lang.String indexName)
-
getAlterTableForMaxIntervalAsString
public java.lang.String getAlterTableForMaxIntervalAsString()
-
getInsertSessionStatementAsString
public java.lang.String getInsertSessionStatementAsString()
-
getUpdateSessionStatement
public java.sql.PreparedStatement getUpdateSessionStatement(java.sql.Connection connection, java.lang.String id, SessionContext context) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getExpiredSessionsStatement
public java.sql.PreparedStatement getExpiredSessionsStatement(java.sql.Connection connection, java.lang.String canonicalContextPath, java.lang.String vhost, long expiry) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getMyExpiredSessionsStatement
public java.sql.PreparedStatement getMyExpiredSessionsStatement(java.sql.Connection connection, SessionContext sessionContext, long expiry) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getAllAncientExpiredSessionsStatement
public java.sql.PreparedStatement getAllAncientExpiredSessionsStatement(java.sql.Connection connection) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getCheckSessionExistsStatement
public java.sql.PreparedStatement getCheckSessionExistsStatement(java.sql.Connection connection, SessionContext context) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getLoadStatement
public java.sql.PreparedStatement getLoadStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getUpdateStatement
public java.sql.PreparedStatement getUpdateStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getDeleteStatement
public java.sql.PreparedStatement getDeleteStatement(java.sql.Connection connection, java.lang.String id, SessionContext contextId) throws java.lang.Exception
- Throws:
java.lang.Exception
-
prepareTables
public void prepareTables() throws java.sql.SQLException
Set up the tables in the database- Throws:
java.sql.SQLException
- if unable to prepare tables
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-