Package org.apache.cassandra.concurrent
Enum Stage
- java.lang.Object
-
- java.lang.Enum<Stage>
-
- org.apache.cassandra.concurrent.Stage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Stage.ExecutorServiceInitialiser
-
Enum Constant Summary
Enum Constants Enum Constant Description ANTI_ENTROPY
COUNTER_MUTATION
GOSSIP
IMMEDIATE
INTERNAL_RESPONSE
MIGRATION
MISC
MUTATION
READ
REQUEST_RESPONSE
TRACING
VIEW_MUTATION
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
jmxName
static long
KEEP_ALIVE_SECONDS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.Runnable command)
void
execute(java.lang.Runnable command, ExecutorLocals locals)
LocalAwareExecutorService
executor()
static Stage
fromPoolName(java.lang.String stageName)
int
getCorePoolSize()
Returns core thread pool sizeint
getMaximumPoolSize()
Returns maximum pool size of thread pool.void
maybeExecuteImmediately(java.lang.Runnable command)
void
setCorePoolSize(int newCorePoolSize)
Allows user to resize core thread pool sizevoid
setMaximumPoolSize(int newMaximumPoolSize)
Allows user to resize maximum size of the thread pool.static void
shutdownAndWait(long timeout, java.util.concurrent.TimeUnit units)
static void
shutdownNow()
This method shuts down all registered stages.java.util.concurrent.Future<?>
submit(java.lang.Runnable task)
<T> java.util.concurrent.Future<T>
submit(java.lang.Runnable task, T result)
<T> java.util.concurrent.Future<T>
submit(java.util.concurrent.Callable<T> task)
static Stage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Stage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
-
-
Field Detail
-
KEEP_ALIVE_SECONDS
public static final long KEEP_ALIVE_SECONDS
- See Also:
- Constant Field Values
-
jmxName
public final java.lang.String jmxName
-
-
Method Detail
-
values
public static Stage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Stage c : Stage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Stage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromPoolName
public static Stage fromPoolName(java.lang.String stageName)
-
execute
public void execute(java.lang.Runnable command)
-
execute
public void execute(java.lang.Runnable command, ExecutorLocals locals)
-
maybeExecuteImmediately
public void maybeExecuteImmediately(java.lang.Runnable command)
-
submit
public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
-
submit
public java.util.concurrent.Future<?> submit(java.lang.Runnable task)
-
submit
public <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result)
-
executor
public LocalAwareExecutorService executor()
-
shutdownNow
public static void shutdownNow()
This method shuts down all registered stages.
-
shutdownAndWait
public static void shutdownAndWait(long timeout, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException
- Throws:
java.lang.InterruptedException
java.util.concurrent.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.
-
-