Package io.atomix.utils.concurrent
Class AbstractThreadContext
java.lang.Object
io.atomix.utils.concurrent.AbstractThreadContext
- All Implemented Interfaces:
Scheduler,ThreadContext,AutoCloseable,Executor
- Direct Known Subclasses:
SingleThreadContext
Abstract thread context.
-
Constructor Summary
Constructors -
Method Summary
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.Scheduler
schedule, schedule, schedule, scheduleMethods inherited from interface io.atomix.utils.concurrent.ThreadContext
checkThread, close, isCurrentContext
-
Constructor Details
-
AbstractThreadContext
public AbstractThreadContext()
-
-
Method Details
-
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
-