Class TransactionResultImpl

java.lang.Object
io.quarkus.redis.runtime.datasource.TransactionResultImpl
All Implemented Interfaces:
TransactionResult, Iterable<Object>

public class TransactionResultImpl extends Object implements TransactionResult
  • Field Details

  • Constructor Details

    • TransactionResultImpl

      public TransactionResultImpl(boolean discarded, boolean hasErrors, List<Object> res)
  • Method Details

    • discarded

      public boolean discarded()
      Description copied from interface: TransactionResult
      Checks if the transaction was discarded (rolled back)
      Specified by:
      discarded in interface TransactionResult
      Returns:
      true if the transaction batch was discarded.
    • hasErrors

      public boolean hasErrors()
      Description copied from interface: TransactionResult
      Checks if at least one command in the transaction ended with an error. Errors are represented as Throwables in the list of results.
      Specified by:
      hasErrors in interface TransactionResult
      Returns:
      true if at least one command in the transaction ended with an error
    • size

      public int size()
      Description copied from interface: TransactionResult
      Returns the number of responses.
      Specified by:
      size in interface TransactionResult
      Returns:
      the number of responses
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: TransactionResult
      Returns true if this TransactionResult contains no responses.
      Specified by:
      isEmpty in interface TransactionResult
      Returns:
      true if this TransactionResult contains no responses
    • get

      public <T> T get(int index)
      Description copied from interface: TransactionResult
      Returns the response at the specified position in this TransactionResult. It contains the result of the commands executed at the same position in the transaction. If that command ended with an error, the return value is a Throwable.
      Specified by:
      get in interface TransactionResult
      Type Parameters:
      T - the expected type
      Parameters:
      index - index of the element to return
      Returns:
      the element at the specified position in this TransactionResult
    • iterator

      public Iterator<Object> iterator()
      Specified by:
      iterator in interface Iterable<Object>