public final class SessionMailCache
extends java.lang.Object
SessionMailCache - Several cacheable data bound to a user session.| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all entries contained in cache.
|
static void |
clearAll(com.openexchange.session.Session session)
Clears all user-related cached data.
|
<V> void |
get(SessionMailCacheEntry<V> entry)
Gets the entry acquired through
SessionMailCacheEntry.getKey(). |
static SessionMailCache |
getInstance(com.openexchange.session.Session session,
int accountId)
Gets the session-bound mail cache.
|
<V> void |
put(SessionMailCacheEntry<V> entry)
|
<V> void |
remove(SessionMailCacheEntry<V> entry)
Removes the entry acquired through
SessionMailCacheEntry.getKey() . |
public static SessionMailCache getInstance(com.openexchange.session.Session session, int accountId)
session - The session whose mail cache shall be returnedaccountId - The account IDpublic static void clearAll(com.openexchange.session.Session session)
public <V> void put(SessionMailCacheEntry<V> entry)
entry into cache if SessionMailCacheEntry.getValue() is not null. Otherwise the a
possibly previously associated value with entry's key is removed from cache.
SessionMailCacheEntry.getKey() is used as key and SessionMailCacheEntry.getValue() as value.
entry - The mail cache entrypublic <V> void get(SessionMailCacheEntry<V> entry)
SessionMailCacheEntry.getKey(). If present it's applied to entry via
SessionMailCacheEntry.setValue(Object).V - The cache entry's typeentry - The mail cache entrypublic <V> void remove(SessionMailCacheEntry<V> entry)
SessionMailCacheEntry.getKey() . If present it's applied to entry via
SessionMailCacheEntry.setValue(Object).V - The cache entry's typeentry - The mail cache entrypublic void clear()