Package org.apache.cassandra.concurrent
Class ExecutorLocals
java.lang.Object
org.apache.cassandra.concurrent.ExecutorLocals
- All Implemented Interfaces:
Closeable,AutoCloseable,Closeable,WithResources
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.cassandra.utils.WithResources
WithResources.None -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExecutorLocals(TraceState traceState, ClientWarn.State clientWarnState) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()voidclose()static ExecutorLocalscreate(TraceState traceState) static ExecutorLocalscurrent()get()Overwrite current locals, and return the previous onesstatic WithResourcesThecurrent()Locals, if any; otherwiseWithResources.none().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.utils.WithResources
and, isNoOp
-
Field Details
-
traceState
-
clientWarnState
-
-
Constructor Details
-
ExecutorLocals
-
-
Method Details
-
current
- Returns:
- an ExecutorLocals object which has the current trace state and client warn state.
-
propagate
Thecurrent()Locals, if any; otherwiseWithResources.none(). Used to propagate current to other executors as aWithResources. -
create
-
clear
public static void clear() -
get
Overwrite current locals, and return the previous ones- Specified by:
getin interfaceWithResources- Returns:
- an object that closes any instantiated resources
-
close
public void close()
-