|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.util.component.AbstractLifeCycle org.eclipse.jetty.server.session.AbstractSessionManager org.openspaces.jee.sessions.jetty.GigaSessionManager
public class GigaSessionManager
GigaspacesSessionManager A Jetty SessionManager where the session data is stored in a data grid "cloud". On each request, the session data is looked up in the "cloud" and brought into the local space cache if doesn't already exist, and an entry put into the managers map of sessions. When the request exists, any changes, including changes to the access time of the session are written back out to the grid.
Nested Class Summary | |
---|---|
class |
GigaSessionManager.Session
Session A session in memory of a Context. |
Nested classes/interfaces inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
---|
org.eclipse.jetty.server.session.AbstractSessionManager.SessionIf |
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
org.eclipse.jetty.util.component.LifeCycle.Listener |
Field Summary | |
---|---|
protected long |
_savePeriodMs
|
protected int |
_scavengeCount
|
protected long |
_scavengePeriodMs
|
Fields inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
---|
__defaultSessionTrackingModes, __distantFuture, _checkingRemoteSessionIdEncoding, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _secureRequestOnly, _sessionAttributeListeners, _sessionComment, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdListeners, _sessionIdManager, _sessionIdPathParameterName, _sessionIdPathParameterNamePrefix, _sessionListeners, _sessionPath, _sessionsStats, _sessionTimeStats, _sessionTrackingModes |
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
Fields inherited from interface org.eclipse.jetty.server.SessionManager |
---|
__CheckRemoteSessionEncoding, __DefaultSessionCookie, __DefaultSessionDomain, __DefaultSessionIdPathParameterName, __MaxAgeProperty, __SessionCookieProperty, __SessionDomainProperty, __SessionIdPathParameterNameProperty, __SessionPathProperty |
Constructor Summary | |
---|---|
GigaSessionManager()
|
Method Summary | |
---|---|
protected void |
add(SessionData data)
|
protected void |
addSession(org.eclipse.jetty.server.session.AbstractSession abstractSession)
|
protected boolean |
delete(String id)
|
void |
doStart()
Start the session manager. |
void |
doStop()
Stop the session manager. |
protected SessionData |
fetch(String sessionId)
|
protected Object[] |
findExpiredSessions(long timestamp)
|
BeanLevelProperties |
getBeanLevelProperties()
|
ClusterInfo |
getClusterInfo()
|
int |
getSavePeriod()
How often an actual update of the session will be performed to the Space. |
int |
getScavengePeriod()
How often the scavenger thread will run in order to check for expired sessions. |
GigaSessionManager.Session |
getSession(String idInCluster)
Get a session matching the id. |
Map |
getSessionMap()
|
int |
getSessions()
|
IJSpace |
getSpace()
|
String |
getSpaceUrl()
|
void |
invalidateSession(String idInCluster)
|
protected void |
invalidateSessions()
|
protected org.eclipse.jetty.server.session.AbstractSession |
newSession(javax.servlet.http.HttpServletRequest request)
|
void |
removeSession(org.eclipse.jetty.server.session.AbstractSession abstractSession,
boolean invalidate)
|
protected boolean |
removeSession(String idInCluster)
|
void |
resetStats()
|
protected void |
scavenge()
Look for expired sessions that we know about in our session map, and double check with the grid that it has really expired, or already been removed. |
void |
setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
|
void |
setClusterInfo(ClusterInfo clusterInfo)
|
void |
setCountSessionPeriod(int seconds)
|
void |
setLease(long lease)
The lease of the SessionData that is written to the Space. |
void |
setSavePeriod(int seconds)
How often an actual update of the session will be performed to the Space. |
void |
setScavengePeriod(int seconds)
How often the scavenger thread will run in order to check for expired sessions. |
void |
setSpace(IJSpace space)
|
void |
setSpaceUrl(String url)
|
protected void |
update(SessionData data)
|
Methods inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
---|
access, addEventListener, addSession, clearEventListeners, complete, doSessionAttributeListeners, getClusterId, getContext, getContextHandler, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getHttpOnly, getHttpSession, getIdManager, getMaxCookieAge, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionCookieConfig, getSessionDomain, getSessionHandler, getSessionIdManager, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, getSessionPath, getSessionsMax, getSessionsTotal, getSessionTimeMax, getSessionTimeMean, getSessionTimeStdDev, getSessionTimeTotal, isCheckingRemoteSessionIdEncoding, isNodeIdInSessionId, isSecureRequestOnly, isUsingCookies, isUsingURLs, isValid, newHttpSession, removeEventListener, removeSession, renewSessionId, setCheckingRemoteSessionIdEncoding, setHttpOnly, setIdManager, setMaxInactiveInterval, setNodeIdInSessionId, setRefreshCookieAge, setSecureRequestOnly, setSessionCookie, setSessionHandler, setSessionIdManager, setSessionIdPathParameterName, setSessionTrackingModes, setUsingCookies, shutdownSessions, statsReset |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Field Detail |
---|
protected long _scavengePeriodMs
protected int _scavengeCount
protected long _savePeriodMs
Constructor Detail |
---|
public GigaSessionManager()
Method Detail |
---|
public void doStart() throws Exception
doStart
in class org.eclipse.jetty.server.session.AbstractSessionManager
Exception
public void doStop() throws Exception
doStop
in class org.eclipse.jetty.server.session.AbstractSessionManager
Exception
public int getSavePeriod()
60
seconds.
public void setSavePeriod(int seconds)
60
seconds.
public int getScavengePeriod()
60 * 5
seconds (5 minutes).
public void setScavengePeriod(int seconds)
60 * 5
seconds (5 minutes).
public void setCountSessionPeriod(int seconds)
public void setSpace(IJSpace space)
public IJSpace getSpace()
public void setSpaceUrl(String url)
public String getSpaceUrl()
public ClusterInfo getClusterInfo()
public void setClusterInfo(ClusterInfo clusterInfo)
public BeanLevelProperties getBeanLevelProperties()
public void setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
public void setLease(long lease)
SessionData
that is written to the Space. Set
in seconds and defaults to FOREVER.
public GigaSessionManager.Session getSession(String idInCluster)
getSession
in class org.eclipse.jetty.server.session.AbstractSessionManager
public Map getSessionMap()
getSessionMap
in class org.eclipse.jetty.server.session.AbstractSessionManager
public int getSessions()
getSessions
in class org.eclipse.jetty.server.session.AbstractSessionManager
public void resetStats()
resetStats
in class org.eclipse.jetty.server.session.AbstractSessionManager
protected void invalidateSessions()
protected org.eclipse.jetty.server.session.AbstractSession newSession(javax.servlet.http.HttpServletRequest request)
newSession
in class org.eclipse.jetty.server.session.AbstractSessionManager
protected boolean removeSession(String idInCluster)
removeSession
in class org.eclipse.jetty.server.session.AbstractSessionManager
public void removeSession(org.eclipse.jetty.server.session.AbstractSession abstractSession, boolean invalidate)
public void invalidateSession(String idInCluster)
protected void addSession(org.eclipse.jetty.server.session.AbstractSession abstractSession)
addSession
in class org.eclipse.jetty.server.session.AbstractSessionManager
protected void scavenge()
protected void add(SessionData data) throws Exception
Exception
protected boolean delete(String id) throws Exception
Exception
protected void update(SessionData data) throws Exception
Exception
protected SessionData fetch(String sessionId) throws Exception
Exception
protected Object[] findExpiredSessions(long timestamp) throws Exception
Exception
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |