
io.ebeaninternal.server.query.BaseFuture Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.server.query;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/**
* A base object for query Future objects.
*
* @param the entity bean type
* @author rbygrave
*/
abstract class BaseFuture implements Future {
final FutureTask futureTask;
BaseFuture(FutureTask futureTask) {
this.futureTask = futureTask;
}
public boolean cancel(boolean mayInterruptIfRunning) {
return futureTask.cancel(mayInterruptIfRunning);
}
public T get() throws InterruptedException, ExecutionException {
return futureTask.get();
}
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
return futureTask.get(timeout, unit);
}
public boolean isCancelled() {
return futureTask.isCancelled();
}
public boolean isDone() {
return futureTask.isDone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy