Interface RedisTransactionResult


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 Type
    Method
    Description
    <T> T
    get(int index)
    Returns the command result at the specified index.
    boolean
    Returns true if the transaction result contains no elements.
    int
    Returns the number of commands executed within the transaction.
    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

      <T> T get(int index) throws IndexOutOfBoundsException

      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

      Stream<Object> stream()

      Returns commands results as stream.

      Returns:
      a stream of commands results