io.ebeaninternal.server.query.QueryFutureRowCount Maven / Gradle / Ivy
package io.ebeaninternal.server.query;
import io.ebean.FutureRowCount;
import io.ebean.Transaction;
import java.util.concurrent.FutureTask;
/**
* Future implementation for the row count query.
*/
public final class QueryFutureRowCount extends BaseFuture implements FutureRowCount {
private final CallableQueryCount call;
public QueryFutureRowCount(CallableQueryCount call) {
super(new FutureTask<>(call));
this.call = call;
}
public FutureTask futureTask() {
return futureTask;
}
public Transaction transaction() {
return call.transaction;
}
@Override
public boolean cancel(boolean mayInterruptIfRunning) {
call.query.cancel();
return super.cancel(mayInterruptIfRunning);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy