com.atlassian.sal.core.executor
Class ThreadLocalDelegateScheduledExecutorService

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by com.atlassian.sal.core.executor.ThreadLocalDelegateExecutorService
          extended by com.atlassian.sal.core.executor.ThreadLocalDelegateScheduledExecutorService
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class ThreadLocalDelegateScheduledExecutorService
extends ThreadLocalDelegateExecutorService
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 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, isShutdown, isTerminated, shutdown, shutdownNow
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, 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 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 © 2011 Atlassian. All Rights Reserved.