Package org.apache.cassandra.concurrent
Enum Class Stage
- All Implemented Interfaces:
Serializable,Comparable<Stage>,Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal booleanSet true if this executor should be gracefully shutdown before stopping the commitlog allocator. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanvoidvoidexecute(ExecutorLocals locals, Runnable task) executor()static StagefromPoolName(String stageName) intReturns core thread pool sizeintReturns maximum pool size of thread pool.voidvoidsetCorePoolSize(int newCorePoolSize) Allows user to resize core thread pool sizevoidsetMaximumPoolSize(int newMaximumPoolSize) Allows user to resize maximum size of the thread pool.static voidshutdownAndAwaitMutatingExecutors(boolean interrupt, long timeout, TimeUnit units) static voidshutdownAndWait(long timeout, TimeUnit units) static voidThis method shuts down all registered stages.Future<?><T> Future<T><T> Future<T>voidunsafeSetExecutor(ExecutorPlus executor) static StageReturns the enum constant of this class with the specified name.static Stage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ
-
MUTATION
-
COUNTER_MUTATION
-
VIEW_MUTATION
-
GOSSIP
-
REQUEST_RESPONSE
-
ANTI_ENTROPY
-
MIGRATION
-
MISC
-
TRACING
-
INTERNAL_RESPONSE
-
IMMEDIATE
-
PAXOS_REPAIR
-
-
Field Details
-
jmxName
-
shutdownBeforeCommitlog
public final boolean shutdownBeforeCommitlogSet 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
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
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 nameNullPointerException- if the argument is null
-
fromPoolName
-
execute
-
execute
-
maybeExecuteImmediately
-
submit
-
submit
-
submit
-
executor
-
unsafeSetExecutor
-
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:
InterruptedExceptionTimeoutException
-
areMutationExecutorsTerminated
public static boolean areMutationExecutorsTerminated() -
shutdownAndWait
public static void shutdownAndWait(long timeout, TimeUnit units) throws InterruptedException, TimeoutException - Throws:
InterruptedExceptionTimeoutException
-
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.
-