public class SessionTrackerImpl extends ZooKeeperCriticalThread implements SessionTracker
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionTrackerImpl.SessionImpl |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandlerSessionTracker.Session, SessionTracker.SessionExpirer| Constructor and Description |
|---|
SessionTrackerImpl(SessionTracker.SessionExpirer expirer,
java.util.concurrent.ConcurrentHashMap<java.lang.Long,java.lang.Integer> sessionsWithTimeout,
int tickTime,
long sid,
ZooKeeperServerListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(long id,
int sessionTimeout) |
void |
checkSession(long sessionId,
java.lang.Object owner) |
long |
createSession(int sessionTimeout) |
void |
dumpSessions(java.io.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,
java.lang.Object owner) |
void |
setSessionClosing(long sessionId)
Mark that the session is in the process of closing.
|
void |
shutdown() |
java.lang.String |
toString() |
boolean |
touchSession(long sessionId,
int timeout) |
handleExceptionactiveCount, 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, java.util.concurrent.ConcurrentHashMap<java.lang.Long,java.lang.Integer> sessionsWithTimeout, int tickTime, long sid, ZooKeeperServerListener listener)
public static long initializeNextSession(long id)
public void dumpSessions(java.io.PrintWriter pwriter)
SessionTrackerdumpSessions in interface SessionTrackerpwriter - the output writerpublic java.lang.String toString()
toString in class java.lang.Threadpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic 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,
java.lang.Object owner)
throws KeeperException.SessionExpiredException,
KeeperException.SessionMovedException
checkSession in interface SessionTrackerKeeperException.SessionExpiredExceptionKeeperException.SessionMovedExceptionpublic void setOwner(long id,
java.lang.Object owner)
throws KeeperException.SessionExpiredException
setOwner in interface SessionTrackerKeeperException.SessionExpiredExceptionCopyright © 2016 The Apache Software Foundation