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

org.apache.zookeeper.server

## Class ZooKeeperCriticalThread

- java.lang.Object
- - java.lang.Thread
  - - org.apache.zookeeper.server.ZooKeeperThread
    - - org.apache.zookeeper.server.ZooKeeperCriticalThread

- All Implemented Interfaces:
    Runnable
  Direct Known Subclasses:
    CommitProcessor, FollowerRequestProcessor, LearnerSender, ObserverRequestProcessor, PrepRequestProcessor, ReadOnlyRequestProcessor, RequestThrottler, SessionTrackerImpl, SyncRequestProcessor

      public class ZooKeeperCriticalThread
      extends ZooKeeperThread

  Represents critical thread. When there is an uncaught exception thrown by the thread this will exit the system.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

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

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZooKeeperCriticalThread(String threadName, ZooKeeperServerListener listener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `handleException(String threadName, Throwable e)` This will be used by the uncaught exception handler and make the system exit.

    - ### 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

- - ### Constructor Detail

    - #### ZooKeeperCriticalThread

          public ZooKeeperCriticalThread(String threadName,
                                         ZooKeeperServerListener listener)

  - ### Method Detail

    - #### handleException

          protected void handleException(String threadName,
                                         Throwable e)

      This will be used by the uncaught exception handler and make the system exit.
      Overrides:
        `handleException` in class `ZooKeeperThread`
      Parameters:
        `threadName` - - thread name
        `e` - - exception object

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