Interface SessionStore
- All Superinterfaces:
Component
- All Known Implementing Classes:
AbstractLettuceSessionStore
,AbstractSessionStore
,ClusterLettuceSessionStore
,DefaultLettuceSessionStore
,FileSessionStore
,MasterReplicaLettuceSessionStore
A SessionStore is a mechanism for (persistently) storing data associated with sessions.
Created: 2017. 6. 15.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanOrphans
(long time) Remove all unmanaged sessions that expired at or before the given time.boolean
Delete session data.boolean
Test if data exists for a given session id.getExpired
(Set<String> candidates) Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.Returns the names of the attributes that should be excluded from serialization.Read in session data.void
save
(String id, SessionData data) Save the session data.Methods inherited from interface com.aspectran.core.component.Component
destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitialized
-
Method Details
-
load
Read in session data.- Parameters:
id
- identity of session to load- Returns:
- the SessionData matching the id
- Throws:
Exception
- if unable to load session data
-
save
Save the session data.- Parameters:
id
- identity of session to storedata
- info of session to store- Throws:
Exception
- if unable to write session data
-
delete
Delete session data.- Parameters:
id
- identity of session to delete- Returns:
- true if the session was deleted
- Throws:
Exception
- if unable to delete session data
-
exists
Test if data exists for a given session id.- Parameters:
id
- Identity of session whose existence should be checked- Returns:
- true if valid, non-expired session exists
- Throws:
Exception
- if there is a problem checking the existence with persistence layer
-
getExpired
Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.- Parameters:
candidates
- if provided, these are keys of sessions that the SessionStore thinks has expired and should be verified by the SessionStore- Returns:
- set of session ids
-
cleanOrphans
void cleanOrphans(long time) Remove all unmanaged sessions that expired at or before the given time.- Parameters:
time
- the time before which the sessions must have expired
-
getNonPersistentAttributes
Returns the names of the attributes that should be excluded from serialization.- Returns:
- the attribute names to be excluded from serialization
-
getAllSessions
-