public class PrioritizedExecutorService extends AbstractExecutorService implements com.google.common.util.concurrent.ListeningExecutorService
Modifier and Type | Class and Description |
---|---|
static class |
PrioritizedExecutorService.PrioritizedListenableFutureTask<V> |
Constructor and Description |
---|
PrioritizedExecutorService(ThreadPoolExecutor threadPoolExecutor) |
PrioritizedExecutorService(ThreadPoolExecutor threadPoolExecutor,
boolean allowRegularTasks,
int defaultPriority) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long l,
TimeUnit timeUnit) |
static PrioritizedExecutorService |
create(com.metamx.common.lifecycle.Lifecycle lifecycle,
com.metamx.common.concurrent.ExecutorServiceConfig config) |
void |
execute(Runnable runnable) |
int |
getQueueSize() |
boolean |
isShutdown() |
boolean |
isTerminated() |
protected <T> PrioritizedExecutorService.PrioritizedListenableFutureTask<T> |
newTaskFor(Callable<T> callable) |
protected <T> PrioritizedExecutorService.PrioritizedListenableFutureTask<T> |
newTaskFor(Runnable runnable,
T value) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> com.google.common.util.concurrent.ListenableFuture<T> |
submit(Callable<T> task) |
com.google.common.util.concurrent.ListenableFuture<?> |
submit(Runnable task) |
<T> com.google.common.util.concurrent.ListenableFuture<T> |
submit(Runnable task,
T result) |
invokeAll, invokeAll, invokeAny, invokeAny
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invokeAll, invokeAll
invokeAny, invokeAny
public PrioritizedExecutorService(ThreadPoolExecutor threadPoolExecutor)
public PrioritizedExecutorService(ThreadPoolExecutor threadPoolExecutor, boolean allowRegularTasks, int defaultPriority)
public static PrioritizedExecutorService create(com.metamx.common.lifecycle.Lifecycle lifecycle, com.metamx.common.concurrent.ExecutorServiceConfig config)
protected <T> PrioritizedExecutorService.PrioritizedListenableFutureTask<T> newTaskFor(Runnable runnable, T value)
newTaskFor
in class AbstractExecutorService
protected <T> PrioritizedExecutorService.PrioritizedListenableFutureTask<T> newTaskFor(Callable<T> callable)
newTaskFor
in class AbstractExecutorService
public com.google.common.util.concurrent.ListenableFuture<?> submit(Runnable task)
submit
in interface com.google.common.util.concurrent.ListeningExecutorService
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Runnable task, @Nullable T result)
submit
in interface com.google.common.util.concurrent.ListeningExecutorService
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Callable<T> task)
submit
in interface com.google.common.util.concurrent.ListeningExecutorService
submit
in interface ExecutorService
submit
in class AbstractExecutorService
public void shutdown()
shutdown
in interface ExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public int getQueueSize()
Copyright © 2011–2015. All rights reserved.