public class MongoSessionManager extends NoSqlSessionManager
Modifier and Type | Class and Description |
---|---|
protected class |
MongoSessionManager.ClassLoadingObjectInputStream
ClassLoadingObjectInputStream
|
AbstractSessionManager.SessionIf
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
static String |
__ACCESSED |
static String |
__ID |
static String |
__INVALIDATED |
static String |
__VALID |
static String |
__VERSION |
__defaultSessionTrackingModes, __distantFuture, _checkingRemoteSessionIdEncoding, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _secureRequestOnly, _sessionAttributeListeners, _sessionComment, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdManager, _sessionIdPathParameterName, _sessionIdPathParameterNamePrefix, _sessionListeners, _sessionPath, _sessionsStats, _sessionTimeStats, _sessionTrackingModes, SESSION_KNOWN_ONLY_TO_AUTHENTICATED
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
__CheckRemoteSessionEncoding, __DefaultSessionCookie, __DefaultSessionDomain, __DefaultSessionIdPathParameterName, __MaxAgeProperty, __SessionCookieProperty, __SessionDomainProperty, __SessionIdPathParameterNameProperty, __SessionPathProperty
Constructor and Description |
---|
MongoSessionManager() |
Modifier and Type | Method and Description |
---|---|
protected String |
decodeName(String name) |
protected Object |
decodeValue(Object valueToDecode) |
void |
doStart() |
protected Object |
encodeName(Object value) |
protected String |
encodeName(String name) |
long |
getSessionStoreCount()
returns the total number of session objects in the session store
the count() operation itself is optimized to perform on the server side
and avoid loading to client side.
|
protected void |
invalidateSession(String idInCluster) |
protected NoSqlSession |
loadSession(String clusterId) |
void |
purge() |
void |
purgeFully() |
protected Object |
refresh(NoSqlSession session,
Object version) |
protected boolean |
remove(NoSqlSession session) |
protected Object |
save(NoSqlSession session,
Object version,
boolean activateAfterSave) |
void |
scavenge() |
void |
scavengeFully() |
void |
setSessionIdManager(SessionIdManager metaManager)
Sets the cross context session id manager
|
addSession, getIdlePeriod, getSavePeriod, getSession, getStalePeriod, invalidateSessions, isInvalidateOnStop, isPreserveOnStop, isSaveAllAttributes, newSession, removeSession, setIdlePeriod, setInvalidateOnStop, setPreserveOnStop, setSaveAllAttributes, setSavePeriod, setStalePeriod
access, addEventListener, addSession, clearEventListeners, complete, doSessionAttributeListeners, doStop, getClusterId, getContext, getContextHandler, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getHttpOnly, getHttpSession, getIdManager, getMaxCookieAge, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionCookieConfig, getSessionDomain, getSessionHandler, getSessionIdManager, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, getSessionMap, getSessionPath, getSessions, getSessionsMax, getSessionsTotal, getSessionTimeMax, getSessionTimeMean, getSessionTimeStdDev, getSessionTimeTotal, isCheckingRemoteSessionIdEncoding, isNodeIdInSessionId, isSecureRequestOnly, isUsingCookies, isUsingURLs, isValid, newHttpSession, removeEventListener, removeSession, removeSession, renewSession, resetStats, setCheckingRemoteSessionIdEncoding, setHttpOnly, setIdManager, setMaxInactiveInterval, setNodeIdInSessionId, setRefreshCookieAge, setSecureRequestOnly, setSessionCookie, setSessionHandler, setSessionIdPathParameterName, setSessionTrackingModes, setUsingCookies, statsReset
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
access, addEventListener, clearEventListeners, complete, getClusterId, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getHttpOnly, getHttpSession, getMaxInactiveInterval, getMetaManager, getNodeId, getSessionCookie, getSessionCookieConfig, getSessionIdManager, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, isCheckingRemoteSessionIdEncoding, isUsingCookies, isUsingURLs, isValid, newHttpSession, removeEventListener, setCheckingRemoteSessionIdEncoding, setMaxInactiveInterval, setSessionHandler, setSessionIdPathParameterName, setSessionTrackingModes
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public static final String __ID
public static final String __VALID
public static final String __INVALIDATED
public static final String __ACCESSED
public static final String __VERSION
public MongoSessionManager() throws UnknownHostException, com.mongodb.MongoException
UnknownHostException
com.mongodb.MongoException
public void doStart() throws Exception
doStart
in class NoSqlSessionManager
Exception
public void setSessionIdManager(SessionIdManager metaManager)
SessionManager
setSessionIdManager
in interface SessionManager
setSessionIdManager
in class AbstractSessionManager
metaManager
- The metaManager used for cross context session management.SessionManager.getSessionIdManager()
protected Object save(NoSqlSession session, Object version, boolean activateAfterSave)
save
in class NoSqlSessionManager
protected Object refresh(NoSqlSession session, Object version)
refresh
in class NoSqlSessionManager
protected NoSqlSession loadSession(String clusterId)
loadSession
in class NoSqlSessionManager
protected boolean remove(NoSqlSession session)
remove
in class NoSqlSessionManager
protected void invalidateSession(String idInCluster)
invalidateSession
in class NoSqlSessionManager
protected Object encodeName(Object value) throws IOException
IOException
protected Object decodeValue(Object valueToDecode) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void purge()
public void purgeFully()
public void scavenge()
public void scavengeFully()
public long getSessionStoreCount()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.