Package org.xrpl.xrpl4j.model.flags
Class BatchFlags
java.lang.Object
org.xrpl.xrpl4j.model.flags.Flags
org.xrpl.xrpl4j.model.flags.TransactionFlags
org.xrpl.xrpl4j.model.flags.BatchFlags
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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BatchFlagsConstantBatchFlagsfor thetfAllOrNothingflag.static final BatchFlagsConstant emptyTransactionFlags.static final BatchFlagsConstantBatchFlagsfor thetfIndependentflag.static final BatchFlagsConstantBatchFlagsfor thetfOnlyOneflag.static final BatchFlagsConstant for an unset flag.static final BatchFlagsConstantBatchFlagsfor thetfUntilFailureflag.Fields inherited from class org.xrpl.xrpl4j.model.flags.TransactionFlags
FULLY_CANONICAL_SIG, INNER_BATCH_TXN -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchFlagsof(long value) ConstructBatchFlagswith a given value.static BatchFlagsConstructBatchFlagsfor AllOrNothing mode.static BatchFlagsConstructBatchFlagsfor Independent mode.static BatchFlagsConstructBatchFlagsfor OnlyOne mode.static BatchFlagsConstructBatchFlagsfor UntilFailure mode.booleanCheck if thetfAllOrNothingflag is set.booleanCheck if thetfIndependentflag is set.booleanCheck if thetfOnlyOneflag is set.booleanCheck if thetfUntilFailureflag is set.with(BatchFlags flags) Methods inherited from class org.xrpl.xrpl4j.model.flags.TransactionFlags
tfFullyCanonicalSig, tfInnerBatchTxn
-
Field Details
-
ALL_OR_NOTHING
ConstantBatchFlagsfor thetfAllOrNothingflag. All transactions must succeed for any of them to succeed. -
ONLY_ONE
ConstantBatchFlagsfor thetfOnlyOneflag. The first transaction to succeed will be the only one to succeed. -
UNTIL_FAILURE
ConstantBatchFlagsfor thetfUntilFailureflag. All transactions will be applied until the first failure. -
INDEPENDENT
ConstantBatchFlagsfor thetfIndependentflag. All transactions will be applied, regardless of failure. -
UNSET
Constant for an unset flag. -
EMPTY
Constant emptyTransactionFlags.
-
-
Method Details
-
of
ConstructBatchFlagswith a given value.- Parameters:
value- The long-number encoded flags value of thisBatchFlags.- Returns:
- New
BatchFlags.
-
with
-
ofAllOrNothing
ConstructBatchFlagsfor AllOrNothing mode.- Returns:
BatchFlagswith tfAllOrNothing set.
-
ofOnlyOne
ConstructBatchFlagsfor OnlyOne mode.- Returns:
BatchFlagswith tfOnlyOne set.
-
ofUntilFailure
ConstructBatchFlagsfor UntilFailure mode.- Returns:
BatchFlagswith tfUntilFailure set.
-
ofIndependent
ConstructBatchFlagsfor Independent mode.- Returns:
BatchFlagswith tfIndependent set.
-
tfAllOrNothing
public boolean tfAllOrNothing()Check if thetfAllOrNothingflag is set.- Returns:
trueiftfAllOrNothingis set, otherwisefalse.
-
tfOnlyOne
public boolean tfOnlyOne()Check if thetfOnlyOneflag is set.- Returns:
trueiftfOnlyOneis set, otherwisefalse.
-
tfUntilFailure
public boolean tfUntilFailure()Check if thetfUntilFailureflag is set.- Returns:
trueiftfUntilFailureis set, otherwisefalse.
-
tfIndependent
public boolean tfIndependent()Check if thetfIndependentflag is set.- Returns:
trueiftfIndependentis set, otherwisefalse.
-