public class EventGroup extends AbstractLifecycleEventLoop implements net.openhft.chronicle.core.threads.EventLoop
HandlerPriority priorities. This class will delegate
any EventHandler that is installed on it (via addHandler(EventHandler)) to a child
event loop appropriately. See also other implementations of EventLoop in this library.
Supports event loop monitoring - controlled by system property MONITOR_INTERVAL_MS and documented in README.adoc
| Modifier and Type | Field and Description |
|---|---|
static int |
CONC_THREADS |
name| Constructor and Description |
|---|
EventGroup(boolean daemon,
@NotNull Pauser pauser,
Pauser replicationPauser,
String binding,
String bindingReplication,
@NotNull String name,
int concThreadsNum,
String concBinding,
@NotNull Supplier<Pauser> concPauserSupplier,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities,
@NotNull Supplier<Pauser> blockingPauserSupplier) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(@NotNull net.openhft.chronicle.core.threads.EventHandler handler) |
void |
addTimingMonitor(String description,
long timeLimitNS,
LongSupplier timeSupplier,
Supplier<Thread> threadSupplier) |
static EventGroupBuilder |
builder()
Create an EventGroup builder
|
boolean |
isAlive() |
protected void |
performClose() |
protected void |
performStart()
Starts the event loop and waits for the core (or monitor) event loop thread to start before returning
(or timing out)
|
protected void |
performStopFromNew()
Implement a stop from
EventLoopLifecycle.NEW state, should block until all
handlers have had EventHandler.loopFinished() called. |
protected void |
performStopFromStarted()
Implement a stop from
EventLoopLifecycle.STARTED state, should block until all
handlers have completed their final iteration and had
EventHandler.loopFinished() called. |
boolean |
runsInsideCoreLoop() |
void |
setupTimeLimitMonitor(long timeLimitNS,
LongSupplier timeOfStart) |
void |
unpause() |
awaitTermination, isStarted, isStopped, name, nameWithSlash, start, stopassertCloseable, 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, waitclose, inEventLoop, isStopped, name, start, stoppublic EventGroup(boolean daemon,
@NotNull
@NotNull Pauser pauser,
Pauser replicationPauser,
String binding,
String bindingReplication,
@NotNull
@NotNull String name,
int concThreadsNum,
String concBinding,
@NotNull
@NotNull Supplier<Pauser> concPauserSupplier,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities,
@NotNull
@NotNull Supplier<Pauser> blockingPauserSupplier)
public static EventGroupBuilder builder()
EventGroupBuilderpublic void unpause()
unpause in interface net.openhft.chronicle.core.threads.EventLooppublic void addHandler(@NotNull
@NotNull net.openhft.chronicle.core.threads.EventHandler handler)
addHandler in interface net.openhft.chronicle.core.threads.EventLooppublic void setupTimeLimitMonitor(long timeLimitNS,
LongSupplier timeOfStart)
public void addTimingMonitor(String description, long timeLimitNS, LongSupplier timeSupplier, Supplier<Thread> threadSupplier)
protected void performStart()
performStart in class AbstractLifecycleEventLoopprotected void performStopFromNew()
AbstractLifecycleEventLoopEventLoopLifecycle.NEW state, should block until all
handlers have had EventHandler.loopFinished() called.performStopFromNew in class AbstractLifecycleEventLoopprotected void performStopFromStarted()
AbstractLifecycleEventLoopEventLoopLifecycle.STARTED state, should block until all
handlers have completed their final iteration and had
EventHandler.loopFinished() called.performStopFromStarted in class AbstractLifecycleEventLooppublic boolean isAlive()
isAlive in interface net.openhft.chronicle.core.threads.EventLoopprotected void performClose()
performClose in class AbstractLifecycleEventLooppublic boolean runsInsideCoreLoop()
runsInsideCoreLoop in interface net.openhft.chronicle.core.threads.EventLoopCopyright © 2024. All rights reserved.