Class TxnRequest
java.lang.Object
io.vertx.ext.consul.TxnRequest
Holds list of operations in transaction
- Author:
- Ruslan Sennov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOperation(TxnOperation operation) Adds operation to this requestReturns list of transaction operationsgetOperations(int index) Returns the operation at the specified position in this listintReturns the number of operations in this requesttoJson()Convert to JSON
-
Constructor Details
-
TxnRequest
public TxnRequest()Default constructor -
TxnRequest
-
-
Method Details
-
toJson
-
getOperations
Returns list of transaction operations- Returns:
- list of transaction operations
-
getOperationsSize
public int getOperationsSize()Returns the number of operations in this request- Returns:
- the number of operations in this request
-
getOperations
Returns the operation at the specified position in this list- Parameters:
index- index of the operation to return- Returns:
- the operation at the specified position in this list
-
addOperation
Adds operation to this request- Parameters:
operation- operation to add- Returns:
- reference to this, for fluency
-