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,ThreadPoolContext
public abstract class AbstractThreadContext extends Object implements ThreadContext
Abstract thread context.
-
-
Constructor Summary
Constructors Constructor Description AbstractThreadContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblock()Marks the thread context as blocked.booleanisBlocked()Returns whether the thread context is currently marked blocked.voidunblock()Marks the thread context as unblocked.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.atomix.utils.concurrent.Scheduler
schedule, schedule, schedule, schedule
-
Methods inherited from interface io.atomix.utils.concurrent.ThreadContext
checkThread, close, isCurrentContext
-
-
-
-
Method Detail
-
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
-
-