org.eclipse.jetty.nosql.mongodb
Class MongoSessionManager
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.session.AbstractSessionManager
org.eclipse.jetty.nosql.NoSqlSessionManager
org.eclipse.jetty.nosql.mongodb.MongoSessionManager
- All Implemented Interfaces:
- SessionManager, LifeCycle
public class MongoSessionManager
- extends NoSqlSessionManager
Fields inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
__defaultSessionTrackingModes, __distantFuture, _checkingRemoteSessionIdEncoding, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _sessionAttributeListeners, _sessionComment, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdManager, _sessionIdPathParameterName, _sessionIdPathParameterNamePrefix, _sessionListeners, _sessionPath, _sessionsStats, _sessionTimeStats, _sessionTrackingModes |
Methods inherited from class org.eclipse.jetty.nosql.NoSqlSessionManager |
addSession, getIdlePeriod, getSavePeriod, getSession, getStalePeriod, invalidateSessions, isInvalidateOnStop, isSaveAllAttributes, newSession, removeSession, setIdlePeriod, setInvalidateOnStop, setSaveAllAttributes, setSavePeriod, setStalePeriod |
Methods inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
access, addEventListener, addSession, clearEventListeners, complete, doSessionAttributeListeners, doStop, getClusterId, getContext, getContextHandler, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getHttpOnly, getHttpSession, getIdManager, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionCookieConfig, getSessionDomain, getSessionHandler, getSessionIdManager, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, getSessionMap, getSessions, getSessionsMax, getSessionsTotal, getSessionTimeMax, getSessionTimeMean, getSessionTimeStdDev, getSessionTimeTotal, isCheckingRemoteSessionIdEncoding, isNodeIdInSessionId, isUsingCookies, isUsingURLs, isValid, newHttpSession, removeEventListener, removeSession, removeSession, resetStats, setCheckingRemoteSessionIdEncoding, setHttpOnly, setIdManager, setMaxInactiveInterval, setNodeIdInSessionId, setRefreshCookieAge, setSessionCookie, setSessionHandler, setSessionIdPathParameterName, setSessionTrackingModes, setUsingCookies, statsReset |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString |
Methods inherited from interface org.eclipse.jetty.server.SessionManager |
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 |
__ID
public static final String __ID
- See Also:
- Constant Field Values
__VALID
public static final String __VALID
- See Also:
- Constant Field Values
__INVALIDATED
public static final String __INVALIDATED
- See Also:
- Constant Field Values
__ACCESSED
public static final String __ACCESSED
- See Also:
- Constant Field Values
__VERSION
public static final String __VERSION
- See Also:
- Constant Field Values
MongoSessionManager
public MongoSessionManager()
throws UnknownHostException,
com.mongodb.MongoException
- Throws:
UnknownHostException
com.mongodb.MongoException
doStart
public void doStart()
throws Exception
- Overrides:
doStart
in class NoSqlSessionManager
- Throws:
Exception
setSessionIdManager
public void setSessionIdManager(SessionIdManager metaManager)
- Description copied from interface:
SessionManager
- Sets the cross context session id manager
- Specified by:
setSessionIdManager
in interface SessionManager
- Overrides:
setSessionIdManager
in class AbstractSessionManager
- Parameters:
metaManager
- The metaManager used for cross context session management.- See Also:
SessionManager.getSessionIdManager()
save
protected Object save(NoSqlSession session,
Object version,
boolean activateAfterSave)
- Specified by:
save
in class NoSqlSessionManager
refresh
protected Object refresh(NoSqlSession session,
Object version)
- Specified by:
refresh
in class NoSqlSessionManager
loadSession
protected NoSqlSession loadSession(String clusterId)
- Specified by:
loadSession
in class NoSqlSessionManager
remove
protected boolean remove(NoSqlSession session)
- Specified by:
remove
in class NoSqlSessionManager
invalidateSession
protected void invalidateSession(String idInCluster)
- Overrides:
invalidateSession
in class NoSqlSessionManager
encodeName
protected String encodeName(String name)
decodeName
protected String decodeName(String name)
encodeName
protected Object encodeName(ObjectOutputStream out,
ByteArrayOutputStream bout,
Object value)
throws IOException
- Throws:
IOException
decodeValue
protected Object decodeValue(Object value)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
purge
public void purge()
purgeFully
public void purgeFully()
scavenge
public void scavenge()
scavengeFully
public void scavengeFully()
getSessionStoreCount
public 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.
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.