@InterfaceAudience.Private class TimeoutExecutorThread<TEnvironment> extends StoppableThread
InlineChore
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private ProcedureExecutor<TEnvironment> |
executor |
private static org.slf4j.Logger |
LOG |
private DelayQueue<DelayedUtil.DelayedWithTimeout> |
queue |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
TimeoutExecutorThread(ProcedureExecutor<TEnvironment> executor,
ThreadGroup group,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(InlineChore chore) |
void |
add(Procedure<TEnvironment> procedure) |
private void |
execDelayedProcedure(DelayedProcedure<TEnvironment> delayed) |
private void |
execInlineChore(InlineChore chore) |
private void |
executeInMemoryChore(ProcedureInMemoryChore<TEnvironment> chore) |
protected void |
executeTimedoutProcedure(Procedure<TEnvironment> proc) |
boolean |
remove(Procedure<TEnvironment> procedure) |
void |
run() |
void |
sendStopSignal() |
awaitTermination
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, start, stop, stop, suspend, toString, yield
private static final org.slf4j.Logger LOG
private final ProcedureExecutor<TEnvironment> executor
private final DelayQueue<DelayedUtil.DelayedWithTimeout> queue
public TimeoutExecutorThread(ProcedureExecutor<TEnvironment> executor, ThreadGroup group, String name)
public void sendStopSignal()
sendStopSignal
in class StoppableThread
public void add(InlineChore chore)
public void add(Procedure<TEnvironment> procedure)
public boolean remove(Procedure<TEnvironment> procedure)
private void execInlineChore(InlineChore chore)
private void execDelayedProcedure(DelayedProcedure<TEnvironment> delayed)
private void executeInMemoryChore(ProcedureInMemoryChore<TEnvironment> chore)
protected void executeTimedoutProcedure(Procedure<TEnvironment> proc)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.