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

com.scalar.db.api.Scanner Maven / Gradle / Ivy

Go to download

A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases

The newest version!
package com.scalar.db.api;

import com.scalar.db.exception.storage.ExecutionException;
import java.io.Closeable;
import java.util.List;
import java.util.Optional;

/**
 * A scanner abstraction for iterating results.
 *
 * @author Hiroyuki Yamada
 */
public interface Scanner extends Closeable, Iterable {

  /**
   * Returns the first result in the results.
   *
   * @return the first result in the results
   * @throws ExecutionException if the operation fails
   */
  Optional one() throws ExecutionException;

  /**
   * Returns all the results.
   *
   * @return the list of {@code Result}s
   * @throws ExecutionException if the operation fails
   */
  List all() throws ExecutionException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy