public class SessionTrackerImpl extends Thread implements SessionTracker
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionTrackerImpl.SessionImpl |
Thread.State, Thread.UncaughtExceptionHandlerSessionTracker.Session, SessionTracker.SessionExpirerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
SessionTrackerImpl(SessionTracker.SessionExpirer expirer,
ConcurrentHashMap<Long,Integer> sessionsWithTimeout,
int tickTime,
long sid) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(long id,
int sessionTimeout) |
void |
checkSession(long sessionId,
Object owner) |
long |
createSession(int sessionTimeout) |
void |
dumpSessions(PrintWriter pwriter)
Text dump of session information, suitable for debugging.
|
static long |
initializeNextSession(long id) |
void |
removeSession(long sessionId) |
void |
run() |
void |
setOwner(long id,
Object owner) |
void |
setSessionClosing(long sessionId)
Mark that the session is in the process of closing.
|
void |
shutdown() |
String |
toString() |
boolean |
touchSession(long sessionId,
int timeout) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yieldpublic SessionTrackerImpl(SessionTracker.SessionExpirer expirer, ConcurrentHashMap<Long,Integer> sessionsWithTimeout, int tickTime, long sid)
public static long initializeNextSession(long id)
public void dumpSessions(PrintWriter pwriter)
SessionTrackerdumpSessions in interface SessionTrackerpwriter - the output writerpublic boolean touchSession(long sessionId,
int timeout)
touchSession in interface SessionTrackerpublic void setSessionClosing(long sessionId)
SessionTrackersetSessionClosing in interface SessionTrackerpublic void removeSession(long sessionId)
removeSession in interface SessionTrackerpublic void shutdown()
shutdown in interface SessionTrackerpublic long createSession(int sessionTimeout)
createSession in interface SessionTrackerpublic void addSession(long id,
int sessionTimeout)
addSession in interface SessionTrackerpublic void checkSession(long sessionId,
Object owner)
throws KeeperException.SessionExpiredException,
KeeperException.SessionMovedException
checkSession in interface SessionTrackerKeeperException.SessionExpiredExceptionKeeperException.SessionMovedExceptionpublic void setOwner(long id,
Object owner)
throws KeeperException.SessionExpiredException
setOwner in interface SessionTrackerKeeperException.SessionExpiredExceptionCopyright © 2014 The Apache Software Foundation