Package org.apache.cassandra.service
Class ClientWarn
- java.lang.Object
-
- org.apache.cassandra.service.ClientWarn
-
- All Implemented Interfaces:
ExecutorLocal<ClientWarn.State>
public class ClientWarn extends java.lang.Object implements ExecutorLocal<ClientWarn.State>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientWarn.State
-
Field Summary
Fields Modifier and Type Field Description static ClientWarn
instance
-
Fields inherited from interface org.apache.cassandra.concurrent.ExecutorLocal
all
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
captureWarnings()
ClientWarn.State
get()
This is called when scheduling the task, and also before callingExecutorLocal.set(Object)
when running on a executor thread.java.util.List<java.lang.String>
getWarnings()
void
resetWarnings()
void
set(ClientWarn.State value)
Before a task has been run, this will be called with the value from the thread that scheduled the task, and after the task is finished, the value that was previously retrieved from this thread is restored.void
warn(java.lang.String text)
-
-
-
Field Detail
-
instance
public static ClientWarn instance
-
-
Method Detail
-
get
public ClientWarn.State get()
Description copied from interface:ExecutorLocal
This is called when scheduling the task, and also before callingExecutorLocal.set(Object)
when running on a executor thread.- Specified by:
get
in interfaceExecutorLocal<ClientWarn.State>
- Returns:
- The thread-local value that we want to copy across executor boundaries; may be null if not set.
-
set
public void set(ClientWarn.State value)
Description copied from interface:ExecutorLocal
Before a task has been run, this will be called with the value from the thread that scheduled the task, and after the task is finished, the value that was previously retrieved from this thread is restored.- Specified by:
set
in interfaceExecutorLocal<ClientWarn.State>
- Parameters:
value
- Value to use for the executor local state; may be null.
-
warn
public void warn(java.lang.String text)
-
captureWarnings
public void captureWarnings()
-
getWarnings
public java.util.List<java.lang.String> getWarnings()
-
resetWarnings
public void resetWarnings()
-
-