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

play.utils.ImmediateFuture Maven / Gradle / Ivy

There is a newer version: 2.6.2
Show newest version
package play.utils;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

public final class ImmediateFuture implements Future {
    @Override
    public boolean cancel(boolean mayInterruptIfRunning) {
        return false;
    }

    @Override
    public boolean isCancelled() {
        return false;
    }

    @Override
    public boolean isDone() {
        return true;
    }

    @Override
    public Boolean get() throws InterruptedException, ExecutionException {
        return true;
    }

    @Override
    public Boolean get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy