Package org.opencms.main
Interface I_CmsSessionStorageProvider
- All Known Implementing Classes:
CmsDefaultSessionStorageProvider
public interface I_CmsSessionStorageProvider
This interface is used to define the session storage implementation provider.
- Since:
- 6.5.5
-
Method Summary
Modifier and TypeMethodDescriptionReturns the stored session info object with the given id.getAll()
Returns all current stored session info objects.getAllOfUser
(CmsUUID userId) Returns all current stored session info objects for the given user.int
getSize()
Returns the current number of stored session info objects.void
Initializes the storage.put
(CmsSessionInfo sessionInfo) Stores the given session info object.Removes the stored session info object identified by the given session id.void
shutdown()
Last cleanup possibility.void
validate()
Validates all session info objects removing any session that have became invalidated.
-
Method Details
-
validate
void validate()Validates all session info objects removing any session that have became invalidated. -
get
Returns the stored session info object with the given id.- Parameters:
sessionId
- the id to lookup- Returns:
- the stored session info object, or
null
if not found
-
getAll
Returns all current stored session info objects.- Returns:
- all current stored session info objects
-
getAllOfUser
Returns all current stored session info objects for the given user.- Parameters:
userId
- the id of the user to retrieve the session info objects for- Returns:
- all current stored session info objects for the given user
-
getSize
int getSize()Returns the current number of stored session info objects.- Returns:
- the current number of stored session info objects, or zero if empty
-
initialize
Initializes the storage.- Throws:
CmsInitException
- if initialization fails
-
put
Stores the given session info object.- Parameters:
sessionInfo
- the session info object to be stored- Returns:
- the session info object previously stored with the same session id, or
null
if none
-
remove
Removes the stored session info object identified by the given session id.- Parameters:
sessionId
- the id that identifies the stored session info object to remove- Returns:
- the removed cached entry or
null
if none
-
shutdown
Last cleanup possibility.- Throws:
Exception
- if something goes wrong
-