Package rocks.xmpp.util.concurrent
Class QueuedScheduledExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- rocks.xmpp.util.concurrent.QueuedExecutorService
-
- rocks.xmpp.util.concurrent.QueuedScheduledExecutorService
-
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
public class QueuedScheduledExecutorService extends QueuedExecutorService implements ScheduledExecutorService
AScheduledExecutorService
implementation of a queued executor service.- See Also:
QueuedExecutorService
-
-
Constructor Summary
Constructors Constructor Description QueuedScheduledExecutorService(Executor delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isTerminated()
ScheduledFuture<?>
schedule(Runnable command, long delay, TimeUnit unit)
<V> ScheduledFuture<V>
schedule(Callable<V> callable, long delay, TimeUnit unit)
ScheduledFuture<?>
scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
ScheduledFuture<?>
scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
void
setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value)
void
setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
void
setRemoveOnCancelPolicy(boolean removeOnCancel)
void
shutdown()
-
Methods inherited from class rocks.xmpp.util.concurrent.QueuedExecutorService
awaitTermination, execute, isShutdown, shutdownNow
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, shutdownNow, submit, submit, submit
-
-
-
-
Constructor Detail
-
QueuedScheduledExecutorService
public QueuedScheduledExecutorService(Executor delegate)
- Parameters:
delegate
- the executor that will handle the tasks
-
-
Method Detail
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceExecutorService
- Overrides:
isTerminated
in classQueuedExecutorService
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedule
in interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfaceScheduledExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceExecutorService
- Overrides:
shutdown
in classQueuedExecutorService
-
setContinueExistingPeriodicTasksAfterShutdownPolicy
public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean value)
-
setExecuteExistingDelayedTasksAfterShutdownPolicy
public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean value)
-
setRemoveOnCancelPolicy
public void setRemoveOnCancelPolicy(boolean removeOnCancel)
-
-