Enum Class Stage

java.lang.Object
java.lang.Enum<Stage>
org.apache.cassandra.concurrent.Stage
All Implemented Interfaces:
Serializable, Comparable<Stage>, Constable

public enum Stage extends Enum<Stage>
  • Enum Constant Details

    • READ

      public static final Stage READ
    • MUTATION

      public static final Stage MUTATION
    • COUNTER_MUTATION

      public static final Stage COUNTER_MUTATION
    • VIEW_MUTATION

      public static final Stage VIEW_MUTATION
    • GOSSIP

      public static final Stage GOSSIP
    • REQUEST_RESPONSE

      public static final Stage REQUEST_RESPONSE
    • ANTI_ENTROPY

      public static final Stage ANTI_ENTROPY
    • MIGRATION

      public static final Stage MIGRATION
    • MISC

      public static final Stage MISC
    • TRACING

      public static final Stage TRACING
    • INTERNAL_RESPONSE

      public static final Stage INTERNAL_RESPONSE
    • IMMEDIATE

      public static final Stage IMMEDIATE
    • PAXOS_REPAIR

      public static final Stage PAXOS_REPAIR
  • Field Details

    • jmxName

      public final String jmxName
    • shutdownBeforeCommitlog

      public final boolean shutdownBeforeCommitlog
      Set true if this executor should be gracefully shutdown before stopping the commitlog allocator. Tasks on executors that issue mutations may block indefinitely waiting for a new commitlog segment, preventing a clean drain/shutdown.
  • Method Details

    • values

      public static Stage[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Stage valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromPoolName

      public static Stage fromPoolName(String stageName)
    • execute

      public void execute(Runnable task)
    • execute

      public void execute(ExecutorLocals locals, Runnable task)
    • maybeExecuteImmediately

      public void maybeExecuteImmediately(Runnable task)
    • submit

      public <T> Future<T> submit(Callable<T> task)
    • submit

      public Future<?> submit(Runnable task)
    • submit

      public <T> Future<T> submit(Runnable task, T result)
    • executor

      public ExecutorPlus executor()
    • unsafeSetExecutor

      public void unsafeSetExecutor(ExecutorPlus executor)
    • shutdownNow

      public static void shutdownNow()
      This method shuts down all registered stages.
    • shutdownAndAwaitMutatingExecutors

      public static void shutdownAndAwaitMutatingExecutors(boolean interrupt, long timeout, TimeUnit units) throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • areMutationExecutorsTerminated

      public static boolean areMutationExecutorsTerminated()
    • shutdownAndWait

      public static void shutdownAndWait(long timeout, TimeUnit units) throws InterruptedException, TimeoutException
      Throws:
      InterruptedException
      TimeoutException
    • getCorePoolSize

      public int getCorePoolSize()
      Returns core thread pool size
    • setCorePoolSize

      public void setCorePoolSize(int newCorePoolSize)
      Allows user to resize core thread pool size
    • getMaximumPoolSize

      public int getMaximumPoolSize()
      Returns maximum pool size of thread pool.
    • setMaximumPoolSize

      public void setMaximumPoolSize(int newMaximumPoolSize)
      Allows user to resize maximum size of the thread pool.