org.opencms.main
Class CmsDefaultSessionStorageProvider

java.lang.Object
  extended by 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
Version:
$Revision: 1.8 $
Author:
Michael Moossen

Constructor Summary
CmsDefaultSessionStorageProvider()
           
 
Method Summary
 CmsSessionInfo get(CmsUUID sessionId)
          Returns the stored session info object with the given id.
 java.util.List getAll()
          Returns all current stored session info objects.
 java.util.List 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface I_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 getAll()
Description copied from interface: I_CmsSessionStorageProvider
Returns all current stored session info objects.

Specified by:
getAll in interface I_CmsSessionStorageProvider
Returns:
all current stored session info objects
See Also:
I_CmsSessionStorageProvider.getAll()

getAllOfUser

public java.util.List getAllOfUser(CmsUUID userId)
Description copied from interface: I_CmsSessionStorageProvider
Returns all current stored session info objects for the given user.

Specified by:
getAllOfUser in interface I_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 interface I_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 interface I_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 interface I_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 interface I_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 interface I_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 interface I_CmsSessionStorageProvider
See Also:
I_CmsSessionStorageProvider.validate()