com.scalar.database.api.Result 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 library that provides a distributed storage abstraction and client-coordinated distributed transaction manager on the storage.
package com.scalar.database.api;
import com.scalar.database.io.Key;
import com.scalar.database.io.Value;
import java.util.Map;
import java.util.Optional;
/**
* A result retrieved from {@link DistributedStorage}.
*
* @author Hiroyuki Yamada
*/
public interface Result {
/**
* Returns the partition {@link Key}
*
* @return an {@code Optional} with the partition {@code Key}
*/
Optional getPartitionKey();
/**
* Returns the clustering {@link Key}
*
* @return an {@code Optional} with the clustering {@code Key}
*/
Optional getClusteringKey();
/**
* Returns the {@link Value} which the specified name is mapped to
*
* @param name name of the {@code Value}
* @return an {@code Optional} with the {@code Value}
*/
Optional getValue(String name);
/**
* Returns a map of {@link Value}s
*
* @return a map of {@code Value}s
*/
Map getValues();
}