Package org.opencms.main
Class CmsDefaultSessionStorageProvider
- java.lang.Object
-
- org.opencms.main.CmsDefaultSessionStorageProvider
-
- All Implemented Interfaces:
I_CmsSessionStorageProvider
public class CmsDefaultSessionStorageProvider extends java.lang.Object implements I_CmsSessionStorageProvider
The default session storage provider implementation.Implementation based on a
FastHashMap
.- Since:
- 6.5.5
-
-
Constructor Summary
Constructors Constructor Description CmsDefaultSessionStorageProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsSessionInfo
get(CmsUUID sessionId)
Returns the stored session info object with the given id.java.util.List<CmsSessionInfo>
getAll()
Returns all current stored session info objects.java.util.List<CmsSessionInfo>
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
initialize()
Initializes the storage.CmsSessionInfo
put(CmsSessionInfo sessionInfo)
Stores the given session info object.CmsSessionInfo
remove(CmsUUID sessionId)
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 Detail
-
CmsDefaultSessionStorageProvider
public CmsDefaultSessionStorageProvider()
-
-
Method Detail
-
get
public CmsSessionInfo get(CmsUUID sessionId)
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:
I_CmsSessionStorageProvider.get(org.opencms.util.CmsUUID)
-
getAll
public java.util.List<CmsSessionInfo> 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:
I_CmsSessionStorageProvider.getAll()
-
getAllOfUser
public java.util.List<CmsSessionInfo> getAllOfUser(CmsUUID userId)
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:
I_CmsSessionStorageProvider.getAllOfUser(org.opencms.util.CmsUUID)
-
getSize
public int 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:
I_CmsSessionStorageProvider.getSize()
-
initialize
public void initialize()
Description copied from interface:I_CmsSessionStorageProvider
Initializes the storage.- Specified by:
initialize
in interfaceI_CmsSessionStorageProvider
- See Also:
I_CmsSessionStorageProvider.initialize()
-
put
public CmsSessionInfo put(CmsSessionInfo sessionInfo)
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:
I_CmsSessionStorageProvider.put(org.opencms.main.CmsSessionInfo)
-
remove
public CmsSessionInfo remove(CmsUUID sessionId)
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:
I_CmsSessionStorageProvider.remove(org.opencms.util.CmsUUID)
-
shutdown
public void shutdown()
Description copied from interface:I_CmsSessionStorageProvider
Last cleanup possibility.- Specified by:
shutdown
in interfaceI_CmsSessionStorageProvider
- See Also:
I_CmsSessionStorageProvider.shutdown()
-
validate
public void 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:
I_CmsSessionStorageProvider.validate()
-
-