public class DelayedExecutor extends Object
Modifier and Type | Class and Description |
---|---|
class |
DelayedExecutor.DelayQueue<E> |
static interface |
DelayedExecutor.Resolver<E> |
static interface |
DelayedExecutor.Worker<E> |
Modifier and Type | Field and Description |
---|---|
static long |
UNSET_TIMEOUT |
Constructor and Description |
---|
DelayedExecutor(ExecutorService threadPool) |
DelayedExecutor(ExecutorService threadPool,
long checkInterval,
TimeUnit timeunit) |
Modifier and Type | Method and Description |
---|---|
<E> DelayedExecutor.DelayQueue<E> |
createDelayQueue(DelayedExecutor.Worker<E> worker,
DelayedExecutor.Resolver<E> resolver) |
void |
destroy() |
ExecutorService |
getThreadPool() |
void |
start() |
void |
stop() |
public static final long UNSET_TIMEOUT
public DelayedExecutor(ExecutorService threadPool)
public DelayedExecutor(ExecutorService threadPool, long checkInterval, TimeUnit timeunit)
public void start()
public void stop()
public void destroy()
public ExecutorService getThreadPool()
public <E> DelayedExecutor.DelayQueue<E> createDelayQueue(DelayedExecutor.Worker<E> worker, DelayedExecutor.Resolver<E> resolver)
Copyright © 2015 Oracle Corporation. All rights reserved.