|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.component.AbstractLifeCycle org.mortbay.jetty.servlet.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.mortbay.jetty.servlet.AbstractSessionManager |
---|
org.mortbay.jetty.servlet.AbstractSessionManager.NullSessionContext, org.mortbay.jetty.servlet.AbstractSessionManager.SessionIf |
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle |
---|
org.mortbay.component.LifeCycle.Listener |
Field Summary | |
---|---|
protected int |
_savePeriodMs
|
protected int |
_scavengeCount
|
protected int |
_scavengePeriodMs
|
Fields inherited from class org.mortbay.jetty.servlet.AbstractSessionManager |
---|
__distantFuture, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _maxSessions, _minSessions, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _sessionAttributeListeners, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdManager, _sessionListeners, _sessionPath, _sessionURL, _sessionURLPrefix |
Fields inherited from class org.mortbay.component.AbstractLifeCycle |
---|
_listeners |
Fields inherited from interface org.mortbay.jetty.SessionManager |
---|
__DefaultSessionCookie, __DefaultSessionDomain, __DefaultSessionURL, __MaxAgeProperty, __SessionCookieProperty, __SessionDomainProperty, __SessionPathProperty, __SessionURLProperty |
Constructor Summary | |
---|---|
GigaSessionManager()
|
Method Summary | |
---|---|
protected void |
add(SessionData data)
|
protected void |
addSession(org.mortbay.jetty.servlet.AbstractSessionManager.Session 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 perfomed to the Space. |
int |
getScavengePeriod()
How often the scavanger 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 GigaSessionManager.Session |
newSession(javax.servlet.http.HttpServletRequest request)
|
void |
removeSession(org.mortbay.jetty.servlet.AbstractSessionManager.Session abstractSession,
boolean invalidate)
|
protected void |
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 perfomed to the Space. |
void |
setScavengePeriod(int seconds)
How often the scavanger 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.mortbay.jetty.servlet.AbstractSessionManager |
---|
access, addEventListener, addSession, clearEventListeners, complete, getClusterId, getHttpOnly, getHttpSession, getIdManager, getMaxCookieAge, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionDomain, getSessionHandler, getSessionPath, getSessionURL, getSessionURLPrefix, isNodeIdInSessionId, isUsingCookies, isValid, newHttpSession, removeEventListener, removeSession, setHttpOnly, setIdManager, setMaxCookieAge, setMaxInactiveInterval, setMetaManager, setNodeIdInSessionId, setRefreshCookieAge, setSecureCookies, setSessionCookie, setSessionDomain, setSessionHandler, setSessionPath, setSessionURL, setUsingCookies |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, 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.mortbay.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Field Detail |
---|
protected int _scavengePeriodMs
protected int _scavengeCount
protected int _savePeriodMs
Constructor Detail |
---|
public GigaSessionManager()
Method Detail |
---|
public void doStart() throws Exception
doStart
in class org.mortbay.jetty.servlet.AbstractSessionManager
Exception
AbstractSessionManager.doStart()
public void doStop() throws Exception
doStop
in class org.mortbay.jetty.servlet.AbstractSessionManager
Exception
AbstractSessionManager.doStop()
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.mortbay.jetty.servlet.AbstractSessionManager
AbstractSessionManager.getSession(java.lang.String)
public Map getSessionMap()
getSessionMap
in class org.mortbay.jetty.servlet.AbstractSessionManager
public int getSessions()
getSessions
in class org.mortbay.jetty.servlet.AbstractSessionManager
public void resetStats()
resetStats
in class org.mortbay.jetty.servlet.AbstractSessionManager
protected void invalidateSessions()
invalidateSessions
in class org.mortbay.jetty.servlet.AbstractSessionManager
protected GigaSessionManager.Session newSession(javax.servlet.http.HttpServletRequest request)
newSession
in class org.mortbay.jetty.servlet.AbstractSessionManager
protected void removeSession(String idInCluster)
removeSession
in class org.mortbay.jetty.servlet.AbstractSessionManager
public void removeSession(org.mortbay.jetty.servlet.AbstractSessionManager.Session abstractSession, boolean invalidate)
removeSession
in class org.mortbay.jetty.servlet.AbstractSessionManager
public void invalidateSession(String idInCluster)
protected void addSession(org.mortbay.jetty.servlet.AbstractSessionManager.Session abstractSession)
addSession
in class org.mortbay.jetty.servlet.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 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |