public interface RedisTransactionResult
Redis MULTI/EXEC sequence result.
It indicates whether a Redis transaction was discarded and exposes commands results.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescription<T> T
get
(int index) Returns the command result at the specified index.boolean
isEmpty()
Returns true if the transaction result contains no elements.int
size()
Returns the number of commands executed within the transaction.stream()
Returns commands results as stream.boolean
Indicates whether the transaction was discarded.
-
Method Details
-
wasDiscarded
boolean wasDiscarded()Indicates whether the transaction was discarded.
- Returns:
- true if the transaction batch was discarded.
-
size
int size()Returns the number of commands executed within the transaction.
- Returns:
- the number of commands
-
isEmpty
boolean isEmpty()Returns true if the transaction result contains no elements.
- Returns:
- true if the transaction result contains no elements, false otherwise
-
get
Returns the command result at the specified index.
- Type Parameters:
T
- inferred type- Parameters:
index
- index of the result to return- Returns:
- the command result at the specified index
- Throws:
IndexOutOfBoundsException
- if the index is out of range
-
stream
Returns commands results as stream.
- Returns:
- a stream of commands results
-