use of org.apache.openejb.threads.task.CURunnable in project tomee by apache.
the class ManagedExecutorServiceImpl method execute.
@Override
public void execute(final Runnable command) {
final CURunnable wrapper = new CURunnable(command);
delegate.execute(wrapper);
wrapper.taskSubmitted(null, this, command);
}
use of org.apache.openejb.threads.task.CURunnable in project tomee by apache.
the class ManagedScheduledExecutorServiceImpl method scheduleWithFixedDelay.
@Override
public ScheduledFuture<?> scheduleWithFixedDelay(final Runnable command, final long initialDelay, final long delay, final TimeUnit unit) {
final CURunnable wrapper = new CURunnable(command);
final ScheduledFuture<?> future = delegate.scheduleWithFixedDelay(wrapper, initialDelay, delay, unit);
wrapper.taskSubmitted(future, this, command);
return new CUScheduleFuture<Object>(ScheduledFuture.class.cast(future), wrapper);
}
Aggregations