public class ActorThread extends Thread implements java.util.function.Consumer<Runnable>
| Modifier and Type | Class and Description |
|---|---|
protected class |
ActorThread.ActorTaskRunnerIdleStrategy |
static class |
ActorThread.ActorThreadState |
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected ActorThread.ActorTaskRunnerIdleStrategy |
idleStrategy |
org.agrona.concurrent.ManyToManyConcurrentArrayQueue<Runnable> |
submittedCallbacks |
protected ActorTimerQueue |
timerJobQueue |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ActorThread(String name,
int id,
ActorThreadGroup threadGroup,
TaskScheduler taskScheduler,
ActorClock clock,
ActorThreadMetrics metrics,
ActorTimerQueue timerQueue) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Runnable t) |
CompletableFuture<Void> |
close() |
static ActorThread |
current()
Returns the current
ActorThread or null if the current thread is not an ActorThread. |
ActorThreadGroup |
getActorThreadGroup() |
ActorClock |
getClock() |
ActorJob |
getCurrentJob() |
ActorTask |
getCurrentTask() |
ActorThreadMetrics |
getMetrics() |
int |
getRunnerId() |
void |
hintWorkAvailable() |
ActorJob |
newJob() |
void |
removeTimer(TimerSubscription timer)
Must be called from this thread, remove a scheduled job.
|
void |
run() |
void |
scheduleTimer(TimerSubscription timer)
Must be called from this thread, schedules a job to be run later.
|
void |
start() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitandThenpublic final org.agrona.concurrent.ManyToManyConcurrentArrayQueue<Runnable> submittedCallbacks
protected final ActorTimerQueue timerJobQueue
protected ActorThread.ActorTaskRunnerIdleStrategy idleStrategy
public ActorThread(String name, int id, ActorThreadGroup threadGroup, TaskScheduler taskScheduler, ActorClock clock, ActorThreadMetrics metrics, ActorTimerQueue timerQueue)
public void hintWorkAvailable()
public void scheduleTimer(TimerSubscription timer)
public void removeTimer(TimerSubscription timer)
public static ActorThread current()
ActorThread or null if the current thread is not an ActorThread.ActorThread or nullpublic ActorJob newJob()
public int getRunnerId()
public ActorThreadMetrics getMetrics()
public CompletableFuture<Void> close()
public ActorJob getCurrentJob()
public ActorTask getCurrentTask()
public ActorClock getClock()
public ActorThreadGroup getActorThreadGroup()
public void accept(Runnable t)
accept in interface java.util.function.Consumer<Runnable>Copyright © 2017–2019 camunda services GmbH. All rights reserved.