Class ContextualScheduledExecutorService
java.lang.Object
org.jboss.resteasy.concurrent.ContextualExecutorService
org.jboss.resteasy.concurrent.ContextualScheduledExecutorService
- All Implemented Interfaces:
Executor
,ExecutorService
,ScheduledExecutorService
public class ContextualScheduledExecutorService
extends ContextualExecutorService
implements ScheduledExecutorService
An executor which wraps runnables and callables to capture the context of the
current thread.
If a server is managed it's the responsibility of the user or container to manage the lifecycle of the wrapped executor service.
Note: if the executor is consider managed, for example running in a Jakarta EE environment, the following methods are effectively ignored.
- Since:
- 5.0.0
- Author:
- James R. Perkins
-
Method Summary
Modifier and TypeMethodDescription<V> ScheduledFuture
<V> scheduleAtFixedRate
(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay
(Runnable command, long initialDelay, long delay, TimeUnit unit) Methods inherited from class org.jboss.resteasy.concurrent.ContextualExecutorService
awaitTermination, execute, invokeAll, invokeAll, invokeAny, invokeAny, isManaged, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Method Details
-
schedule
- Specified by:
schedule
in interfaceScheduledExecutorService
-
schedule
- 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
-