Class TraceableScheduledExecutorService
- java.lang.Object
-
- org.springframework.cloud.sleuth.instrument.async.TraceableExecutorService
-
- org.springframework.cloud.sleuth.instrument.async.TraceableScheduledExecutorService
-
- All Implemented Interfaces:
Executor,ExecutorService,ScheduledExecutorService
public class TraceableScheduledExecutorService extends TraceableExecutorService implements ScheduledExecutorService
A decorator class forScheduledExecutorServiceto support tracing in Executors.- Since:
- 1.0.0
- Author:
- Gaurav Rai Mazra
-
-
Constructor Summary
Constructors Constructor Description TraceableScheduledExecutorService(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate)TraceableScheduledExecutorService(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate, String beanName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)static TraceableScheduledExecutorServicewrap(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate)Wraps the Executor in a trace instance.static TraceableScheduledExecutorServicewrap(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate, String beanName)Wraps the Executor in a trace instance.-
Methods inherited from class org.springframework.cloud.sleuth.instrument.async.TraceableExecutorService
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
-
-
-
-
Constructor Detail
-
TraceableScheduledExecutorService
public TraceableScheduledExecutorService(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate)
-
TraceableScheduledExecutorService
public TraceableScheduledExecutorService(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate, String beanName)
-
-
Method Detail
-
wrap
public static TraceableScheduledExecutorService wrap(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate, String beanName)
Wraps the Executor in a trace instance.- Parameters:
beanFactory- bean factorydelegate- delegate to wrapbeanName- bean name- Returns:
- traced instance
-
wrap
public static TraceableScheduledExecutorService wrap(org.springframework.beans.factory.BeanFactory beanFactory, ExecutorService delegate)
Wraps the Executor in a trace instance.- Parameters:
beanFactory- bean factorydelegate- delegate to wrap- Returns:
- traced instance
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
- Specified by:
schedulein interfaceScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
- Specified by:
schedulein interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
- Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
- Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService
-
-