Package io.atomix.utils.concurrent
Class NullThreadContext
java.lang.Object
io.atomix.utils.concurrent.NullThreadContext
- All Implemented Interfaces:
Scheduler,ThreadContext,AutoCloseable,Executor
Null thread context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblock()Marks the thread context as blocked.voidclose()Closes the context.voidbooleanReturns whether the thread context is currently marked blocked.Schedules a runnable after a delay.Schedules a runnable at a fixed rate.voidunblock()Marks the thread context as unblocked.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.atomix.utils.concurrent.ThreadContext
checkThread, isCurrentContext
-
Constructor Details
-
NullThreadContext
public NullThreadContext()
-
-
Method Details
-
schedule
Description copied from interface:SchedulerSchedules a runnable after a delay. -
schedule
Description copied from interface:SchedulerSchedules a runnable at a fixed rate. -
isBlocked
public boolean isBlocked()Description copied from interface:ThreadContextReturns whether the thread context is currently marked blocked.- Specified by:
isBlockedin interfaceThreadContext- Returns:
- whether the thread context is currently marked blocked
-
block
public void block()Description copied from interface:ThreadContextMarks the thread context as blocked.- Specified by:
blockin interfaceThreadContext
-
unblock
public void unblock()Description copied from interface:ThreadContextMarks the thread context as unblocked.- Specified by:
unblockin interfaceThreadContext
-
close
public void close()Description copied from interface:ThreadContextCloses the context.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceThreadContext
-
execute
-