Class InMemoryInternalSessionCacheStep
- java.lang.Object
-
- org.forgerock.openam.session.service.access.persistence.caching.InMemoryInternalSessionCacheStep
-
- All Implemented Interfaces:
InternalSessionStoreStep
@Singleton public class InMemoryInternalSessionCacheStep extends Object implements InternalSessionStoreStep
Session cache implemented using a simple in-memory cache data structure.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(InternalSession session, InternalSessionStore next)Stores the InternalSession in the cache.InternalSessiongetByHandle(String sessionHandle, InternalSessionStore next)Gets a session from a given session handle.InternalSessiongetByRestrictedID(SessionID sessionID, InternalSessionStore next)Gets a restricted session from a given SessionID.InternalSessiongetBySessionID(SessionID sessionID, InternalSessionStore next)Gets a session from a given SessionID.voidinvalidateCache(SessionID sessionID)voidremove(InternalSession session, InternalSessionStore next)Remove the Session from the cache.voidupdate(InternalSession session, InternalSessionStore next)
-
-
-
Method Detail
-
getBySessionID
public InternalSession getBySessionID(SessionID sessionID, InternalSessionStore next) throws SessionPersistenceException
Description copied from interface:InternalSessionStoreStepGets a session from a given SessionID.- Specified by:
getBySessionIDin interfaceInternalSessionStoreStep- Parameters:
sessionID- the ID of the session to retrieve- Returns:
- an Internal Session
- Throws:
SessionPersistenceException- If the storage operation failed.
-
getByHandle
public InternalSession getByHandle(String sessionHandle, InternalSessionStore next) throws SessionPersistenceException
Description copied from interface:InternalSessionStoreStepGets a session from a given session handle.- Specified by:
getByHandlein interfaceInternalSessionStoreStep- Parameters:
sessionHandle- the handle of the session to retrieve- Returns:
- an Internal Session
- Throws:
SessionPersistenceException- If the storage operation failed.
-
getByRestrictedID
public InternalSession getByRestrictedID(SessionID sessionID, InternalSessionStore next) throws SessionPersistenceException
Description copied from interface:InternalSessionStoreStepGets a restricted session from a given SessionID.- Specified by:
getByRestrictedIDin interfaceInternalSessionStoreStep- Parameters:
sessionID- the ID of the restricted session to retrieve- Returns:
- a restricted Internal Session
- Throws:
SessionPersistenceException- If the storage operation failed.
-
create
public void create(InternalSession session, InternalSessionStore next) throws SessionPersistenceException
Description copied from interface:InternalSessionStoreStepStores the InternalSession in the cache. This will also store any associated references which have been stored on the Session:- Session ID
- Session Handle
- Restricted Tokens
- Specified by:
createin interfaceInternalSessionStoreStep- Parameters:
session- Non null InternalSession to store.- Throws:
SessionPersistenceException- If the storage operation failed.
-
update
public void update(InternalSession session, InternalSessionStore next) throws SessionPersistenceException
- Specified by:
updatein interfaceInternalSessionStoreStep- Throws:
SessionPersistenceException
-
remove
public void remove(InternalSession session, InternalSessionStore next) throws SessionPersistenceException
Description copied from interface:InternalSessionStoreStepRemove the Session from the cache.- Specified by:
removein interfaceInternalSessionStoreStep- Parameters:
session- Non null SessionID.- Throws:
SessionPersistenceException- If the storage operation failed.
-
invalidateCache
public void invalidateCache(SessionID sessionID)
-
-