com.atlassian.sal.core.executor
Class ThreadLocalDelegateScheduledExecutorService<C>

java.lang.Object
  extended by com.atlassian.sal.core.executor.ThreadLocalDelegateExecutorService<C>
      extended by com.atlassian.sal.core.executor.ThreadLocalDelegateScheduledExecutorService<C>
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class ThreadLocalDelegateScheduledExecutorService<C>
extends ThreadLocalDelegateExecutorService<C>
implements ScheduledExecutorService

Scheduled executor service that wraps executing callables and runnables in a wrapper that transfers the thread local state of the caller to the thread of the executing task.

Since:
2.0

Field Summary
 
Fields inherited from class com.atlassian.sal.core.executor.ThreadLocalDelegateExecutorService
manager
 
Constructor Summary
ThreadLocalDelegateScheduledExecutorService(ThreadLocalContextManager<C> manager, ScheduledExecutorService delegate)
           
 
Method Summary
<V> ScheduledFuture<V>
schedule(Callable<V> callable, long delay, TimeUnit unit)
           
 ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
           
 ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
           
 ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
           
 
Methods inherited from class com.atlassian.sal.core.executor.ThreadLocalDelegateExecutorService
awaitTermination, execute, invokeAll, invokeAll, invokeAny, invokeAny, 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
 
Methods inherited from interface java.util.concurrent.Executor
execute
 

Constructor Detail

ThreadLocalDelegateScheduledExecutorService

public ThreadLocalDelegateScheduledExecutorService(ThreadLocalContextManager<C> manager,
                                                   ScheduledExecutorService delegate)
Method Detail

schedule

public ScheduledFuture<?> schedule(Runnable command,
                                   long delay,
                                   TimeUnit unit)
Specified by:
schedule in interface ScheduledExecutorService

schedule

public <V> ScheduledFuture<V> schedule(Callable<V> callable,
                                       long delay,
                                       TimeUnit unit)
Specified by:
schedule in interface ScheduledExecutorService

scheduleAtFixedRate

public ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
                                              long initialDelay,
                                              long period,
                                              TimeUnit unit)
Specified by:
scheduleAtFixedRate in interface ScheduledExecutorService

scheduleWithFixedDelay

public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
                                                 long initialDelay,
                                                 long delay,
                                                 TimeUnit unit)
Specified by:
scheduleWithFixedDelay in interface ScheduledExecutorService


Copyright © 2015 Atlassian. All rights reserved.