public class EventGroup extends AbstractLifecycleEventLoop implements net.openhft.chronicle.core.threads.EventLoop
| Modifier and Type | Field and Description |
|---|---|
static int |
CONC_THREADS |
name| Constructor and Description |
|---|
EventGroup(boolean daemon) |
EventGroup(boolean daemon,
boolean binding) |
EventGroup(boolean daemon,
@NotNull Pauser pauser,
boolean binding) |
EventGroup(boolean daemon,
@NotNull Pauser pauser,
boolean binding,
int bindingCpuCore,
int bindingCpuReplication,
String name) |
EventGroup(boolean daemon,
@NotNull Pauser pauser,
boolean binding,
String name) |
EventGroup(boolean daemon,
@NotNull Pauser pauser,
String binding,
String bindingReplication,
String name,
int concThreadsNum,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities)
Create an EventGroup
|
EventGroup(boolean daemon,
@NotNull Pauser pauser,
String binding,
String bindingReplication,
String name,
int concThreadsNum,
String concBinding,
@NotNull Pauser concPauser,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities) |
| 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) |
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. |
void |
setupTimeLimitMonitor(long timeLimitNS,
LongSupplier timeOfStart) |
void |
unpause() |
awaitTermination, isStarted, isStopped, name, start, stopassertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, toString, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic EventGroup(boolean daemon,
@NotNull
@NotNull Pauser pauser,
String binding,
String bindingReplication,
String name,
int concThreadsNum,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities)
daemon - whether to create threads as daemonpauser - pauser to usebinding - CPU to bind core event loop to.bindingReplication - CPU to bind replication event loop to. -1 means no bindingname - name of event group. Any created threads are named after thisconcThreadsNum - number of concurrent threads to supportpriorities - priorities that we expect to supportpublic EventGroup(boolean daemon,
@NotNull
@NotNull Pauser pauser,
String binding,
String bindingReplication,
String name,
int concThreadsNum,
String concBinding,
@NotNull
@NotNull Pauser concPauser,
Set<net.openhft.chronicle.core.threads.HandlerPriority> priorities)
public EventGroup(boolean daemon)
public EventGroup(boolean daemon,
boolean binding)
public EventGroup(boolean daemon,
@NotNull
@NotNull Pauser pauser,
boolean binding)
public EventGroup(boolean daemon,
@NotNull
@NotNull Pauser pauser,
boolean binding,
String name)
public 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 AbstractLifecycleEventLoopCopyright © 2021. All rights reserved.