Package io.vertx.ext.consul
Class TxnServiceOperation
- java.lang.Object
-
- io.vertx.ext.consul.TxnServiceOperation
-
- All Implemented Interfaces:
TxnOperation
public class TxnServiceOperation extends Object implements TxnOperation
Holds the operation to apply to the service inside a transaction
-
-
Constructor Summary
Constructors Constructor Description TxnServiceOperation()Default constructorTxnServiceOperation(JsonObject json)Constructor from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNode()Get the nodeTxnOperationTypegetOperationType()Returns the type of operation in a transactionServiceOptionsgetServiceOptions()Get the serviceTxnServiceVerbgetType()Get the type of operation to performTxnServiceOperationsetNode(String node)Set the nodeTxnServiceOperationsetServiceOptions(ServiceOptions serviceOptions)Set the serviceTxnServiceOperationsetType(TxnServiceVerb type)Set the type of operation to performJsonObjecttoJson()Convert to JSON
-
-
-
Constructor Detail
-
TxnServiceOperation
public TxnServiceOperation()
Default constructor
-
TxnServiceOperation
public TxnServiceOperation(JsonObject json)
Constructor from JSON- Parameters:
json- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getType
public TxnServiceVerb getType()
Get the type of operation to perform- Returns:
- the type of operation to perform
-
getNode
public String getNode()
Get the node- Returns:
- the node name
-
getServiceOptions
public ServiceOptions getServiceOptions()
Get the service- Returns:
- the service
-
setType
public TxnServiceOperation setType(TxnServiceVerb type)
Set the type of operation to perform- Parameters:
type- the type of operation to perform- Returns:
- reference to this, for fluency
-
setNode
public TxnServiceOperation setNode(String node)
Set the node- Parameters:
node-- Returns:
- reference to this, for fluency
-
setServiceOptions
public TxnServiceOperation setServiceOptions(ServiceOptions serviceOptions)
Set the service- Parameters:
serviceOptions-- Returns:
- reference to this, for fluency
-
getOperationType
public TxnOperationType getOperationType()
Description copied from interface:TxnOperationReturns the type of operation in a transaction- Specified by:
getOperationTypein interfaceTxnOperation- Returns:
- the type of operation in a transaction
-
-