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

de.julielab.geneexpbase.services.ShutdownRequiringExecutorService Maven / Gradle / Ivy

package de.julielab.geneexpbase.services;

import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.List;
import java.util.concurrent.*;

public class ShutdownRequiringExecutorService implements ExecutorService, ShutdownRequiring {
    private final ExecutorService delegate;

    public ShutdownRequiringExecutorService(ExecutorService delegate) {
        this.delegate = delegate;
    }

    @Override
    public void shutdown() {
        delegate.shutdown();
    }

    @NotNull
    @Override
    public List shutdownNow() {
        return delegate.shutdownNow();
    }

    @Override
    public boolean isShutdown() {
        return delegate.isShutdown();
    }

    @Override
    public boolean isTerminated() {
        return delegate.isTerminated();
    }

    @Override
    public boolean awaitTermination(long timeout, @NotNull TimeUnit unit) throws InterruptedException {
        return delegate.awaitTermination(timeout, unit);
    }

    @NotNull
    @Override
    public  Future submit(@NotNull Callable task) {
        return delegate.submit(task);
    }

    @NotNull
    @Override
    public  Future submit(@NotNull Runnable task, T result) {
        return delegate.submit(task, result);
    }

    @NotNull
    @Override
    public Future submit(@NotNull Runnable task) {
        return delegate.submit(task);
    }

    @NotNull
    @Override
    public  List> invokeAll(@NotNull Collection> tasks) throws InterruptedException {
        return delegate.invokeAll(tasks);
    }

    @NotNull
    @Override
    public  List> invokeAll(@NotNull Collection> tasks, long timeout, @NotNull TimeUnit unit) throws InterruptedException {
        return delegate.invokeAll(tasks, timeout, unit);
    }

    @NotNull
    @Override
    public  T invokeAny(@NotNull Collection> tasks) throws InterruptedException, ExecutionException {
        return delegate.invokeAny(tasks);
    }

    @Override
    public  T invokeAny(@NotNull Collection> tasks, long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
        return delegate.invokeAny(tasks, timeout, unit);
    }

    @Override
    public void execute(@NotNull Runnable command) {
        delegate.execute(command);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy