| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final Set | |
| private final Executor | |
| private final Lock | executeLock
The execute lock is only needed necessary to guard from submitting the first queued task before the last non-queued (active == maxCount) task can be submitted to the executor. |
| private volatile boolean | |
| private static final Logger | |
| private static final int | |
| private final int | |
| private final Queue | |
| private static final int | |
| private static final long | |
| private static final int | |
| private final int | |
| private static final long | |
| private final Object | |
| private volatile long | state
State structure. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv | EnhancedViewExecutor(final Executor delegate, final int maxCount, final int queueLimit, final Thread.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | awaitTermination(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
| private EnhancedViewExecutor. | blockingTake()
Tasks are enqueued after a successful state update, they may not be immediately available at this point. |
| private boolean | |
| private boolean | |
| private void | enqueue(EnhancedViewExecutor.
Only called after the queue size component of |
| public void | execute(Runnable
the runnable task task)Implements java. |
| private static int | |
| private static int | |
| public boolean | isShutdown()
Implements java. true if this executor has been shut down.
|
| private static boolean | |
| public boolean | isTerminated()
Implements java. true if all tasks have completed following shut down.
|
| private static boolean | |
| private void | |
| public void | |
| public List | shutdownNow()
Implements java. |
| private EnhancedViewExecutor. | |
| public String | |
| private Thread. |
| ACTIVE_COUNT_MASK | back to summary |
|---|---|
| private static final long ACTIVE_COUNT_MASK | |
| activeRunnables | back to summary |
|---|---|
| private final Set<EnhancedViewExecutor. | |
| delegate | back to summary |
|---|---|
| private final Executor delegate | |
| executeLock | back to summary |
|---|---|
| private final Lock executeLock The execute lock is only needed necessary to guard from submitting the first queued task before the last non-queued (active == maxCount) task can be submitted to the executor. Locks are not used when the queue is disabled. This lock is required to prevent tasks from beginning to queue while tasks that have acquired permits have not been successfully submitted to the delegate executor. In this case the queue may be left in an unrecoverable state if the delegate executor rejects input. | |
| interrupted | back to summary |
|---|---|
| private volatile boolean interrupted | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| MAX_QUEUE_SPINS | back to summary |
|---|---|
| private static final int MAX_QUEUE_SPINS | |
| maxCount | back to summary |
|---|---|
| private final int maxCount | |
| queue | back to summary |
|---|---|
| private final Queue<EnhancedViewExecutor. Queue handling:
The queue must only be modified after a successful CAS | |
| QUEUE_FAILURE_LOG_INTERVAL | back to summary |
|---|---|
| private static final int QUEUE_FAILURE_LOG_INTERVAL | |
| QUEUED_SIZE_MASK | back to summary |
|---|---|
| private static final long QUEUED_SIZE_MASK | |
| QUEUED_SIZE_OFFSET | back to summary |
|---|---|
| private static final int QUEUED_SIZE_OFFSET | |
| queueLimit | back to summary |
|---|---|
| private final int queueLimit | |
| SHUTDOWN_MASK | back to summary |
|---|---|
| private static final long SHUTDOWN_MASK | |
| shutdownLock | back to summary |
|---|---|
| private final Object shutdownLock | |
| state | back to summary |
|---|---|
| private volatile long state State structure.
| |
| stateOffset | back to summary |
|---|---|
| private static final long stateOffset | |
| EnhancedViewExecutor | back to summary |
|---|---|
| pack-priv EnhancedViewExecutor(final Executor delegate, final int maxCount, final int queueLimit, final Thread. | |
| awaitTermination | back to summary |
|---|---|
| public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException Implements java. Doc from java. Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
| |
| blockingTake | back to summary |
|---|---|
| private EnhancedViewExecutor. Tasks are enqueued after a successful state update, they may not be immediately available at this point. | |
| compareAndSwapState | back to summary |
|---|---|
| private boolean compareAndSwapState(long expected, long update) | |
| decrementQueueSize | back to summary |
|---|---|
| private boolean decrementQueueSize() | |
| enqueue | back to summary |
|---|---|
| private void enqueue(EnhancedViewExecutor. Only called after the queue size component of | |
| execute | back to summary |
|---|---|
| public void execute(Runnable task) Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the | |
| getActiveCount | back to summary |
|---|---|
| private static int getActiveCount(long state) | |
| getQueueSize | back to summary |
|---|---|
| private static int getQueueSize(long state) | |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() Implements java. Doc from java. Returns
| |
| isShutdown | back to summary |
|---|---|
| private static boolean isShutdown(long state) | |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Implements java. Doc from java. Returns
| |
| isTerminated | back to summary |
|---|---|
| private static boolean isTerminated(long state) | |
| notifyWaitersIfTerminated | back to summary |
|---|---|
| private void notifyWaitersIfTerminated(long stateSnapshot) | |
| shutdown | back to summary |
|---|---|
| public void shutdown(boolean interrupt) Implements abstract org.
| |
| shutdownNow | back to summary |
|---|---|
| public List Implements java. Doc from java. Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. This method does not wait for actively executing tasks to
terminate. Use There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. For example, typical
implementations will cancel via | |
| taskComplete | back to summary |
|---|---|
| private EnhancedViewExecutor. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| uncaughtExceptionHandler | back to summary |
|---|---|
| private Thread. | |
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private Runnable | |
| private volatile Thread |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv synchronized void | |
| public void | |
| public String |
| contextClassLoader | back to summary |
|---|---|
| private ClassLoader contextClassLoader | |
| delegate | back to summary |
|---|---|
| private Runnable delegate | |
| thread | back to summary |
|---|---|
| private volatile Thread thread
| |
| EnhancedViewExecutorRunnable | back to summary |
|---|---|
| pack-priv EnhancedViewExecutorRunnable(Runnable delegate, ClassLoader contextClassLoader) | |
| interrupt | back to summary |
|---|---|
| pack-priv synchronized void interrupt() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |