Package org.opencms.main
Class CmsDefaultSessionStorageProvider
java.lang.Object
org.opencms.main.CmsDefaultSessionStorageProvider
- All Implemented Interfaces:
I_CmsSessionStorageProvider
The default session storage provider implementation.
Implementation based on a FastHashMap
.
- Since:
- 6.5.5
-
Constructor Summary
-
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.
-
Constructor Details
-
CmsDefaultSessionStorageProvider
public CmsDefaultSessionStorageProvider()
-
-
Method Details
-
get
Description copied from interface:I_CmsSessionStorageProvider
Returns the stored session info object with the given id.- Specified by:
get
in interfaceI_CmsSessionStorageProvider
- Parameters:
sessionId
- the id to lookup- Returns:
- the stored session info object, or
null
if not found - See Also:
-
getAll
Description copied from interface:I_CmsSessionStorageProvider
Returns all current stored session info objects.- Specified by:
getAll
in interfaceI_CmsSessionStorageProvider
- Returns:
- all current stored session info objects
- See Also:
-
getAllOfUser
Description copied from interface:I_CmsSessionStorageProvider
Returns all current stored session info objects for the given user.- Specified by:
getAllOfUser
in interfaceI_CmsSessionStorageProvider
- 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
- See Also:
-
getSize
Description copied from interface:I_CmsSessionStorageProvider
Returns the current number of stored session info objects.- Specified by:
getSize
in interfaceI_CmsSessionStorageProvider
- Returns:
- the current number of stored session info objects, or zero if empty
- See Also:
-
initialize
Description copied from interface:I_CmsSessionStorageProvider
Initializes the storage.- Specified by:
initialize
in interfaceI_CmsSessionStorageProvider
- See Also:
-
put
Description copied from interface:I_CmsSessionStorageProvider
Stores the given session info object.- Specified by:
put
in interfaceI_CmsSessionStorageProvider
- 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 - See Also:
-
remove
Description copied from interface:I_CmsSessionStorageProvider
Removes the stored session info object identified by the given session id.- Specified by:
remove
in interfaceI_CmsSessionStorageProvider
- Parameters:
sessionId
- the id that identifies the stored session info object to remove- Returns:
- the removed cached entry or
null
if none - See Also:
-
shutdown
Description copied from interface:I_CmsSessionStorageProvider
Last cleanup possibility.- Specified by:
shutdown
in interfaceI_CmsSessionStorageProvider
- See Also:
-
validate
Description copied from interface:I_CmsSessionStorageProvider
Validates all session info objects removing any session that have became invalidated.- Specified by:
validate
in interfaceI_CmsSessionStorageProvider
- See Also:
-