@Test public void scheduleCallable() throws Exception { final Object testObj = new Object(); ScheduledFuture schedule = tracerScheduleExecutorService .schedule(()-> testObj, 1000, TIME_UNIT); Thread.sleep(1100); Object o = schedule.get(); Assert.assertTrue(testObj == o); }
@Override public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { SofaTracerRunnable r = new SofaTracerRunnable(command, this.traceContext); return getScheduledExecutorService().schedule(r, delay, unit); }
TracerScheduleExecutorService extends TracedExecutorService implements
                                                                        ScheduledExecutorService { @Override public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { SofaTracerRunnable r = new SofaTracerRunnable(command, this.traceContext); return getScheduledExecutorService().schedule(r, delay, unit); } }
TracerScheduleExecutorService extends TracedExecutorService implements
                                                                        ScheduledExecutorService { @Override public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { SofaTracerRunnable r = new SofaTracerRunnable(command, this.traceContext); return getScheduledExecutorService().schedule(r, delay, unit); } TracerScheduleExecutorService(ScheduledExecutorService delegate);  TracerScheduleExecutorService(ScheduledExecutorService delegate,
                                         SofaTraceContext traceContext); }
TracerScheduleExecutorService extends TracedExecutorService implements
                                                                        ScheduledExecutorService { @Override public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { SofaTracerRunnable r = new SofaTracerRunnable(command, this.traceContext); return getScheduledExecutorService().schedule(r, delay, unit); } TracerScheduleExecutorService(ScheduledExecutorService delegate);  TracerScheduleExecutorService(ScheduledExecutorService delegate,
                                         SofaTraceContext traceContext); @Override ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit); @Override ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit); @Override ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period,
                                                  TimeUnit unit); @Override ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay,
                                                     long delay, TimeUnit unit); }
TracerScheduleExecutorService extends TracedExecutorService implements
                                                                        ScheduledExecutorService { @Override public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { SofaTracerRunnable r = new SofaTracerRunnable(command, this.traceContext); return getScheduledExecutorService().schedule(r, delay, unit); } TracerScheduleExecutorService(ScheduledExecutorService delegate);  TracerScheduleExecutorService(ScheduledExecutorService delegate,
                                         SofaTraceContext traceContext); @Override ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit); @Override ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit); @Override ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period,
                                                  TimeUnit unit); @Override ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay,
                                                     long delay, TimeUnit unit);  }