All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jtrim2.executor.DebugTaskExecutorService Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
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 function) {
        return wrappedExecutor.executeFunction(cancelToken, new DebugTaskExecutor.DebugFunctionWrapper<>(function));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy