org.jtrim2.executor.DebugTaskExecutorService Maven / Gradle / Ivy
package org.jtrim2.executor;
import java.util.concurrent.CompletionStage;
import org.jtrim2.cancel.CancellationToken;
/**
* @see TaskExecutors#debugExecutorService(TaskExecutorService)
*/
final class DebugTaskExecutorService extends DelegatedTaskExecutorService {
public DebugTaskExecutorService(TaskExecutorService wrappedExecutor) {
super(wrappedExecutor);
}
@Override
public void execute(Runnable command) {
wrappedExecutor.execute(new DebugTaskExecutor.DebugRunnableWrapper(command));
}
@Override
public CompletionStage executeStaged(Runnable task) {
return wrappedExecutor.executeStaged(new DebugTaskExecutor.DebugRunnableWrapper(task));
}
@Override
public CompletionStage execute(CancellationToken cancelToken, CancelableTask task) {
return wrappedExecutor.execute(cancelToken, new DebugTaskExecutor.DebugTaskWrapper(task));
}
@Override
public CompletionStage executeFunction(
CancellationToken cancelToken,
CancelableFunction extends V> function) {
return wrappedExecutor.executeFunction(cancelToken, new DebugTaskExecutor.DebugFunctionWrapper<>(function));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy