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

io.ebeaninternal.server.query.QueryFutureRowCount Maven / Gradle / Ivy

There is a newer version: 15.8.0
Show newest version
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