Class BatchFlags


@Beta public class BatchFlags extends TransactionFlags
A set of TransactionFlags for Batch transactions.

Exactly one of the four batch mode flags must be set on a Batch transaction.

This class will be marked Beta until the featureBatch amendment is enabled on mainnet. Its API is subject to change.

  • Field Details

    • ALL_OR_NOTHING

      public static final BatchFlags ALL_OR_NOTHING
      Constant BatchFlags for the tfAllOrNothing flag. All transactions must succeed for any of them to succeed.
    • ONLY_ONE

      public static final BatchFlags ONLY_ONE
      Constant BatchFlags for the tfOnlyOne flag. The first transaction to succeed will be the only one to succeed.
    • UNTIL_FAILURE

      public static final BatchFlags UNTIL_FAILURE
      Constant BatchFlags for the tfUntilFailure flag. All transactions will be applied until the first failure.
    • INDEPENDENT

      public static final BatchFlags INDEPENDENT
      Constant BatchFlags for the tfIndependent flag. All transactions will be applied, regardless of failure.
    • UNSET

      public static final BatchFlags UNSET
      Constant for an unset flag.
    • EMPTY

      public static final BatchFlags EMPTY
      Constant empty TransactionFlags.
  • Method Details

    • of

      public static BatchFlags of(long value)
      Construct BatchFlags with a given value.
      Parameters:
      value - The long-number encoded flags value of this BatchFlags.
      Returns:
      New BatchFlags.
    • with

      public BatchFlags with(BatchFlags flags)
    • ofAllOrNothing

      public static BatchFlags ofAllOrNothing()
      Construct BatchFlags for AllOrNothing mode.
      Returns:
      BatchFlags with tfAllOrNothing set.
    • ofOnlyOne

      public static BatchFlags ofOnlyOne()
      Construct BatchFlags for OnlyOne mode.
      Returns:
      BatchFlags with tfOnlyOne set.
    • ofUntilFailure

      public static BatchFlags ofUntilFailure()
      Construct BatchFlags for UntilFailure mode.
      Returns:
      BatchFlags with tfUntilFailure set.
    • ofIndependent

      public static BatchFlags ofIndependent()
      Construct BatchFlags for Independent mode.
      Returns:
      BatchFlags with tfIndependent set.
    • tfAllOrNothing

      public boolean tfAllOrNothing()
      Check if the tfAllOrNothing flag is set.
      Returns:
      true if tfAllOrNothing is set, otherwise false.
    • tfOnlyOne

      public boolean tfOnlyOne()
      Check if the tfOnlyOne flag is set.
      Returns:
      true if tfOnlyOne is set, otherwise false.
    • tfUntilFailure

      public boolean tfUntilFailure()
      Check if the tfUntilFailure flag is set.
      Returns:
      true if tfUntilFailure is set, otherwise false.
    • tfIndependent

      public boolean tfIndependent()
      Check if the tfIndependent flag is set.
      Returns:
      true if tfIndependent is set, otherwise false.