LocalSessionTracker (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.quorum

## 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

      public class LocalSessionTracker
      extends SessionTrackerImpl

  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`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalSessionTracker(SessionTracker.SessionExpirer expirer, ConcurrentMap<Long,Integer> sessionsWithTimeouts, int tickTime, long id, ZooKeeperServerListener listener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `createSession(int sessionTimeout)`
    `boolean` | `isGlobalSession(long sessionId)`
    `boolean` | `isLocalSession(long sessionId)`

    - ### Methods inherited from class org.apache.zookeeper.server.SessionTrackerImpl

      `checkGlobalSession, checkSession, commitSession, dumpSessions, getLocalSessionCount, getSessionExpiryMap, getSessionTimeout, 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`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### LocalSessionTracker

          public LocalSessionTracker(SessionTracker.SessionExpirer expirer,
                                     ConcurrentMap<Long,Integer> sessionsWithTimeouts,
                                     int tickTime,
                                     long id,
                                     ZooKeeperServerListener listener)

  - ### Method Detail

    - #### isLocalSession

          public boolean isLocalSession(long sessionId)

    - #### isGlobalSession

          public boolean isGlobalSession(long sessionId)

    - #### createSession

          public long createSession(int sessionTimeout)

      Specified by:
        `createSession` in interface `SessionTracker`
      Overrides:
        `createSession` in class `SessionTrackerImpl`

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.