Interface ReadOperation<T>
-
- Type Parameters:
T- type of the value that is read and returned by this read operation
public interface ReadOperation<T>Function performing a read operation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Trun(ReadableTransaction txn)Executes a read operation, and returns the read value.
-
-
-
Method Detail
-
run
T run(ReadableTransaction txn) throws Exception
Executes a read operation, and returns the read value.Implementations need not be idempotent: unlike
WriteOperation, a read operation is never replayed byStorage.read(ReadOperation), so it is free to print, to write to a stream, or to accumulate state outside of the transaction.- Parameters:
txn- the read transaction where to execute the read operation- Returns:
- the read value
- Throws:
Exception- if a problem occurs with the underlying storage engine
-
-