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.SessionImplNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandlerNested 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, sessionsWithTimeoutFields 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 TypeMethodDescriptionlongcreateSession(int sessionTimeout) booleanisGlobalSession(long sessionId) booleanisLocalSession(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, trackSessionMethods inherited from class org.apache.zookeeper.server.ZooKeeperCriticalThread
handleExceptionMethods 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:
createSessionin interfaceSessionTracker- Overrides:
createSessionin classSessionTrackerImpl
-
localSessions
Description copied from interface:SessionTrackerGet a set of local session IDs- Specified by:
localSessionsin interfaceSessionTracker- Overrides:
localSessionsin classSessionTrackerImpl
-