Class LocalSessionTracker
java.lang.Object
java.lang.Thread
org.apache.zookeeper.server.ZooKeeperThread
org.apache.zookeeper.server.ZooKeeperCriticalThread
org.apache.zookeeper.server.SessionTrackerImpl
org.apache.zookeeper.server.quorum.LocalSessionTracker
- All Implemented Interfaces:
Runnable
,SessionTracker
Local session tracker.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.zookeeper.server.SessionTrackerImpl
SessionTrackerImpl.SessionImpl
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
Nested classes/interfaces inherited from interface org.apache.zookeeper.server.SessionTracker
SessionTracker.Session, SessionTracker.SessionExpirer
-
Field Summary
Fields inherited from class org.apache.zookeeper.server.SessionTrackerImpl
sessionsById, sessionsWithTimeout
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionLocalSessionTracker
(SessionTracker.SessionExpirer expirer, ConcurrentMap<Long, Integer> sessionsWithTimeouts, int tickTime, long id, ZooKeeperServerListener listener) -
Method Summary
Modifier and TypeMethodDescriptionlong
createSession
(int sessionTimeout) boolean
isGlobalSession
(long sessionId) boolean
isLocalSession
(long sessionId) Get a set of local session IDsMethods inherited from class org.apache.zookeeper.server.SessionTrackerImpl
checkGlobalSession, checkSession, commitSession, dumpSessions, getLocalSessionCount, getSessionExpiryMap, getSessionTimeout, globalSessions, initializeNextSessionId, isLocalSessionsEnabled, isTrackingSession, removeSession, run, setOwner, setSessionClosing, shutdown, toString, touchSession, trackSession
Methods inherited from class org.apache.zookeeper.server.ZooKeeperCriticalThread
handleException
Methods inherited from class java.lang.Thread
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, yield
-
Constructor Details
-
LocalSessionTracker
public LocalSessionTracker(SessionTracker.SessionExpirer expirer, ConcurrentMap<Long, Integer> sessionsWithTimeouts, int tickTime, long id, ZooKeeperServerListener listener)
-
-
Method Details
-
isLocalSession
public boolean isLocalSession(long sessionId) -
isGlobalSession
public boolean isGlobalSession(long sessionId) -
createSession
public long createSession(int sessionTimeout) - Specified by:
createSession
in interfaceSessionTracker
- Overrides:
createSession
in classSessionTrackerImpl
-
localSessions
Description copied from interface:SessionTracker
Get a set of local session IDs- Specified by:
localSessions
in interfaceSessionTracker
- Overrides:
localSessions
in classSessionTrackerImpl
-