public interface ReadResult extends Result
Each result encapsulates one Row returned by the execution of a read statement.
| Modifier and Type | Method and Description |
|---|---|
Optional<Row> |
getRow()
Returns the encapsulated
Row object for this read result, if present. |
default void |
ifSuccess(Consumer<? super Row> consumer)
If the result is a success, invoke the specified consumer with the returned
Row,
otherwise do nothing. |
getBatchSize, getError, getExecutionInfo, getStatement, ifError, isSuccess@NonNull Optional<Row> getRow()
Row object for this read result, if present.
The value is present if the execution succeeded, and absent otherwise.
Row object for this read result, if present.default void ifSuccess(@NonNull
Consumer<? super Row> consumer)
Row,
otherwise do nothing.consumer - block to be executed if the result is a successNullPointerException - if the result is a success and consumer is nullCopyright © 2017–2021 DataStax. All rights reserved.