| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | _sessions
The cache of sessions in a concurrent map |
| private final CounterStatistic | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultSessionCache(SessionManager
The SessionHandler related to this SessionCache manager, ConcurrentMap<String, ManagedSession> The session map implementation to use sessions)
|
| Modifier and Type | Method and Description |
|---|---|
| protected ManagedSession | doComputeIfAbsent(String
the session id id, Function<String, ManagedSession> the function to load the data for the session mappingFunction)Implements abstract org. |
| public ManagedSession | doDelete(String
the id id)Implements abstract org. |
| public ManagedSession | doGet(String
session id id)Implements abstract org. |
| public Session | doPutIfAbsent(String
the identity of the session id, ManagedSession the session object session)Implements abstract org. |
| public boolean | doReplace(String
the id id, ManagedSession the old value oldValue, ManagedSession the new value newValue)Implements abstract org. |
| public long | |
| public long | |
| public long | |
| public ManagedSession | newSession(SessionData
the session data data)Implements abstract org. Implements org. |
| public void | |
| public void |
| _sessions | back to summary |
|---|---|
| private final ConcurrentMap<String, ManagedSession> _sessions The cache of sessions in a concurrent map | |
| _stats | back to summary |
|---|---|
| private final CounterStatistic _stats | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| DefaultSessionCache | back to summary |
|---|---|
public DefaultSessionCache(SessionManager manager)
| |
| DefaultSessionCache | back to summary |
|---|---|
public DefaultSessionCache(SessionManager manager, ConcurrentMap<String, ManagedSession> sessions)
| |
| doComputeIfAbsent | back to summary |
|---|---|
| protected ManagedSession doComputeIfAbsent(String id, Function<String, ManagedSession> mappingFunction) Implements abstract org. Doc from org. Compute the mappingFunction to create a Session object iff the session
with the given id isn't already in the map, otherwise return the existing Session.
This method is expected to have precisely the same behaviour as
| |
| doDelete | back to summary |
|---|---|
| public ManagedSession doDelete(String id) Implements abstract org. Doc from org. Remove the session with this identity from the store
| |
| doGet | back to summary |
|---|---|
| public ManagedSession doGet(String id) Implements abstract org. Doc from org. Get the session matching the key from the cache. Does not load the session.
| |
| doPutIfAbsent | back to summary |
|---|---|
| public Session doPutIfAbsent(String id, ManagedSession session) Implements abstract org. Doc from org. Put the session into the map if it wasn't already there
| |
| doReplace | back to summary |
|---|---|
| public boolean doReplace(String id, ManagedSession oldValue, ManagedSession newValue) Implements abstract org. Doc from org. Replace the mapping from id to oldValue with newValue
| |
| getSessionsCurrent | back to summary |
|---|---|
public long getSessionsCurrent()
| |
| getSessionsMax | back to summary |
|---|---|
public long getSessionsMax()
| |
| getSessionsTotal | back to summary |
|---|---|
public long getSessionsTotal()
| |
| newSession | back to summary |
|---|---|
| public ManagedSession newSession(SessionData data) Implements abstract org. Implements org. Doc from org. Create a new Session object from pre-existing session data
| |
| resetStats | back to summary |
|---|---|
public void resetStats()
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements org.
| |