com.scalar.db.api.Scanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalardb Show documentation
Show all versions of scalardb Show documentation
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;
}