Package org.opennms.core.fiber
Interface PausableFiber
-
- All Superinterfaces:
Fiber
- All Known Subinterfaces:
MockServiceDaemonMBean
,NotifdQueueHandler
,ServiceDaemon
,ServiceDaemonMBean
- All Known Implementing Classes:
AbstractServiceDaemon
,Actiond
,Alarmd
,AsteriskGateway
,Collectd
,Correlator
,DefaultQueueHandler
,Discovery
,EnhancedLinkd
,Eventd
,EventTranslator
,EventTranslator
,JettyServer
,LegacyScheduler
,MockServiceDaemon
,Notifd
,PassiveStatusd
,PassiveStatusKeeper
,Poller
,Queued
,RTCManager
,Scriptd
,SnmpPoller
,Syslogd
,Tl1d
,Trapd
,Vacuumd
public interface PausableFiber extends Fiber
This interface defines an extension to the core
Fiber
interface and adds the methods for pausing and resuming an executable context. The base interface class defines an execution environment, this interface extends the core interface to provide methods for suspending and resuming theFiber
.- Author:
- Brian Weaver
-
-
Field Summary
Fields Modifier and Type Field Description static int
PAUSE_PENDING
This state is used to define when aFiber
has begun the process of pausing its operations.static int
PAUSED
This state is used to denote a paused, or otherwise suspendedFiber
.static int
RESUME_PENDING
This state is used to denote aFiber
recovering from a paused state to a running status.-
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
pause()
This method is used to suspend a currently runningFiber
.void
resume()
This method is used to resume a suspenededFiber
.
-
-
-
Field Detail
-
PAUSE_PENDING
static final int PAUSE_PENDING
This state is used to define when aFiber
has begun the process of pausing its operations. This is the intermedate period where the thread is no longer in theRUNNING
status, but not yet to aPAUSED
status.- See Also:
- Constant Field Values
-
PAUSED
static final int PAUSED
This state is used to denote a paused, or otherwise suspendedFiber
. When aFiber
is in this state it should not be preforming any work.- See Also:
- Constant Field Values
-
RESUME_PENDING
static final int RESUME_PENDING
This state is used to denote aFiber
recovering from a paused state to a running status. During this status theFiber
is reinitializing any necessary internal elements to re-enter theRUNNING
state.- See Also:
- Constant Field Values
-
-
Method Detail
-
pause
void pause()
This method is used to suspend a currently runningFiber
. When invoked theFiber
will begin the transition to aPAUSED
status after changing its internal state, if applicable.
-
resume
void resume()
This method is used to resume a suspenededFiber
. If the thread is already running then this method should have no effect on the currentFiber
.
-
-