Package io.vertx.ext.consul
Class TxnRequest
- java.lang.Object
-
- io.vertx.ext.consul.TxnRequest
-
public class TxnRequest extends Object
Holds list of operations in transaction- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description TxnRequest()
Default constructorTxnRequest(JsonObject json)
Constructor from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TxnRequest
addOperation(TxnOperation operation)
Adds operation to this requestList<TxnOperation>
getOperations()
Returns list of transaction operationsTxnOperation
getOperations(int index)
Returns the operation at the specified position in this listint
getOperationsSize()
Returns the number of operations in this requestJsonObject
toJson()
Convert to JSON
-
-
-
Constructor Detail
-
TxnRequest
public TxnRequest()
Default constructor
-
TxnRequest
public TxnRequest(JsonObject json)
Constructor from JSON- Parameters:
json
- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getOperations
public List<TxnOperation> 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
public TxnOperation getOperations(int index)
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
public TxnRequest addOperation(TxnOperation operation)
Adds operation to this request- Parameters:
operation
- operation to add- Returns:
- reference to this, for fluency
-
-