|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.session.AbstractSessionManager
org.eclipse.jetty.nosql.NoSqlSessionManager
public abstract class NoSqlSessionManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jetty.server.session.AbstractSessionManager |
|---|
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 ConcurrentMap<String,NoSqlSession> |
_sessions
|
| Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
|---|
_listeners, 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 | |
|---|---|
NoSqlSessionManager()
|
|
| Method Summary | |
|---|---|
protected void |
addSession(AbstractSession session)
|
void |
doStart()
|
int |
getIdlePeriod()
The Idle Period is the time in seconds before an in memory session is passivated. |
int |
getSavePeriod()
The Save Period is the time in seconds between saves of a dirty session to the DB. |
AbstractSession |
getSession(String idInCluster)
|
int |
getStalePeriod()
The State Period is the maximum time in seconds that an in memory session is allows to be stale: If this period is exceeded, the DB will be checked to see if a more recent version is available. If the state period is set to a value < 0, then no staleness check will be made. If the state period is set to 0, then a staleness check is made whenever the active request count goes from 0 to 1. |
protected void |
invalidateSession(String idInCluster)
|
protected void |
invalidateSessions()
|
boolean |
isInvalidateOnStop()
Invalidate sessions when the session manager is stopped otherwise save them to the DB. |
boolean |
isSaveAllAttributes()
Save all attributes of a session or only update the dirty attributes. |
protected abstract NoSqlSession |
loadSession(String clusterId)
|
protected AbstractSession |
newSession(javax.servlet.http.HttpServletRequest request)
|
protected abstract Object |
refresh(NoSqlSession session,
Object version)
|
protected abstract boolean |
remove(NoSqlSession session)
|
protected boolean |
removeSession(String idInCluster)
|
protected abstract Object |
save(NoSqlSession session,
Object version,
boolean activateAfterSave)
|
void |
setIdlePeriod(int idlePeriod)
The Idle Period is the time in seconds before an in memory session is passivated. |
void |
setInvalidateOnStop(boolean invalidateOnStop)
Invalidate sessions when the session manager is stopped otherwise save them to the DB. |
void |
setSaveAllAttributes(boolean saveAllAttributes)
Save all attributes of a session or only update the dirty attributes. |
void |
setSavePeriod(int savePeriod)
The Save Period is the time in seconds between saves of a dirty session to the DB. |
void |
setStalePeriod(int stalePeriod)
The State Period is the maximum time in seconds that an in memory session is allows to be stale: If this period is exceeded, the DB will be checked to see if a more recent version is available. If the state period is set to a value < 0, then no staleness check will be made. If the state period is set to 0, then a staleness check is made whenever the active request count goes from 0 to 1. |
| Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
|---|
addLifeCycleListener, getState, getState, 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.eclipse.jetty.util.component.LifeCycle |
|---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| Field Detail |
|---|
protected final ConcurrentMap<String,NoSqlSession> _sessions
| Constructor Detail |
|---|
public NoSqlSessionManager()
| Method Detail |
|---|
public void doStart()
throws Exception
doStart in class AbstractSessionManagerExceptionprotected void addSession(AbstractSession session)
addSession in class AbstractSessionManagerpublic AbstractSession getSession(String idInCluster)
getSession in class AbstractSessionManager
protected void invalidateSessions()
throws Exception
invalidateSessions in class AbstractSessionManagerExceptionprotected AbstractSession newSession(javax.servlet.http.HttpServletRequest request)
newSession in class AbstractSessionManagerprotected boolean removeSession(String idInCluster)
removeSession in class AbstractSessionManagerprotected void invalidateSession(String idInCluster)
public int getStalePeriod()
public void setStalePeriod(int stalePeriod)
stalePeriod - the stalePeriod in secondspublic int getSavePeriod()
public void setSavePeriod(int savePeriod)
savePeriod - the savePeriod -2,-1,0,1 or the period in seconds >=2public int getIdlePeriod()
public void setIdlePeriod(int idlePeriod)
idlePeriod - the idlePeriod in secondspublic boolean isInvalidateOnStop()
public void setInvalidateOnStop(boolean invalidateOnStop)
invalidateOnStop - the invalidateOnStop to setpublic boolean isSaveAllAttributes()
public void setSaveAllAttributes(boolean saveAllAttributes)
saveAllAttributes - the saveAllAttributes to setprotected abstract NoSqlSession loadSession(String clusterId)
protected abstract Object save(NoSqlSession session,
Object version,
boolean activateAfterSave)
protected abstract Object refresh(NoSqlSession session,
Object version)
protected abstract boolean remove(NoSqlSession session)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||