public abstract class AbstractLifecycleEventLoop
extends net.openhft.chronicle.core.io.AbstractCloseable
implements net.openhft.chronicle.core.threads.EventLoop
start(), stop()stop() only returns when the EventLoop is stoppedEventLoopLifecycle for details of the life-cycle| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLifecycleEventLoop(@NotNull String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
awaitTermination() |
protected boolean |
isStarted() |
boolean |
isStopped() |
String |
name() |
protected String |
nameWithSlash() |
protected void |
performClose() |
protected abstract void |
performStart()
Implement whatever this event loop needs to start, will only
ever be called once
|
protected abstract void |
performStopFromNew()
Implement a stop from
EventLoopLifecycle.NEW state, should block until all
handlers have had EventHandler.loopFinished() called. |
protected abstract void |
performStopFromStarted()
Implement a stop from
EventLoopLifecycle.STARTED state, should block until all
handlers have completed their final iteration and had
EventHandler.loopFinished() called. |
void |
start() |
void |
stop() |
assertCloseable, assertCloseablesClosed, close, createdHere, disableCloseableTracing, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, shouldPerformCloseInBackground, shouldWaitForClosed, singleThreadedCheckDisabled, singleThreadedCheckDisabled, singleThreadedCheckReset, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, toString, unmonitor, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddHandler, close, inEventLoop, isAlive, runsInsideCoreLoop, unpauseprotected final String name
protected AbstractLifecycleEventLoop(@NotNull
@NotNull String name)
protected String nameWithSlash()
public final void start()
start in interface net.openhft.chronicle.core.threads.EventLooppublic final String name()
name in interface net.openhft.chronicle.core.threads.EventLoopprotected abstract void performStart()
public final void stop()
stop in interface net.openhft.chronicle.core.threads.EventLoopprotected abstract void performStopFromNew()
EventLoopLifecycle.NEW state, should block until all
handlers have had EventHandler.loopFinished() called.protected abstract void performStopFromStarted()
EventLoopLifecycle.STARTED state, should block until all
handlers have completed their final iteration and had
EventHandler.loopFinished() called.protected final void awaitTermination()
protected void performClose()
performClose in class net.openhft.chronicle.core.io.AbstractCloseableprotected boolean isStarted()
public boolean isStopped()
isStopped in interface net.openhft.chronicle.core.threads.EventLoopCopyright © 2024. All rights reserved.