Lifecycle.SingleUse
connectionName, connectionPassword, connectionURL, dataSource, dataSourceName, driver, driverName, preparedClearSql, preparedLoadSql, preparedRemoveSql, preparedSaveSql, preparedSizeSql, sessionAppCol, sessionDataCol, sessionIdCol, sessionLastAccessedCol, sessionMaxInactiveCol, sessionTable, sessionValidCol, storeName, threadName
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
DataSourceStore() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all of the Sessions in this Store.
|
protected void |
close(Connection dbConnection)
Close the specified database connection.
|
String[] |
expiredKeys()
Get only those keys of sessions, that are saved in the Store and are to
be expired.
|
int |
getSize()
Return an integer containing a count of all Sessions
currently saved in this Store.
|
String[] |
keys() |
Session |
load(String id)
Load the Session associated with the id
id . |
protected Connection |
open()
Open (if necessary) and return a database connection for use by
this Store.
|
void |
remove(String id)
Remove the Session with the specified session identifier from
this Store, if present.
|
void |
save(Session session)
Save a session to the Store.
|
getConnection, getConnectionName, getConnectionPassword, getConnectionURL, getDataSourceName, getDriverName, getLocalDataSource, getName, getSessionAppCol, getSessionDataCol, getSessionIdCol, getSessionLastAccessedCol, getSessionMaxInactiveCol, getSessionTable, getSessionValidCol, getStoreName, getThreadName, release, setConnectionName, setConnectionPassword, setConnectionURL, setDataSourceName, setDriverName, setLocalDataSource, setSessionAppCol, setSessionDataCol, setSessionIdCol, setSessionLastAccessedCol, setSessionMaxInactiveCol, setSessionTable, setSessionValidCol, startInternal, stopInternal
addPropertyChangeListener, destroyInternal, getManager, getObjectInputStream, initInternal, processExpires, removePropertyChangeListener, setManager, toString
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
public String[] expiredKeys() throws IOException
StoreBase
expiredKeys
in class JDBCStore
IOException
- if an input-/output error occurredpublic String[] keys() throws IOException
keys
in interface Store
keys
in class JDBCStore
IOException
- if an input/output error occurredpublic int getSize() throws IOException
0
is returned.getSize
in interface Store
getSize
in class JDBCStore
IOException
- if an input/output error occurredpublic Session load(String id) throws ClassNotFoundException, IOException
id
.
If no such session is found null
is returned.load
in interface Store
load
in class JDBCStore
id
- a value of type String
Session
ClassNotFoundException
- if an error occursIOException
- if an input/output error occurredpublic void remove(String id) throws IOException
remove
in interface Store
remove
in class JDBCStore
id
- Session identifier of the Session to be removedIOException
- if an input/output error occurspublic void clear() throws IOException
clear
in interface Store
clear
in class JDBCStore
IOException
- if an input/output error occurspublic void save(Session session) throws IOException
save
in interface Store
save
in class JDBCStore
session
- the session to be storedIOException
- if an input/output error occursprotected Connection open() throws SQLException
open
in class JDBCStore
SQLException
- if a database error occursprotected void close(Connection dbConnection)
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.