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 String
getNode()
Get the nodeTxnOperationType
getOperationType()
Returns the type of operation in a transactionServiceOptions
getServiceOptions()
Get the serviceTxnServiceVerb
getType()
Get the type of operation to performTxnServiceOperation
setNode(String node)
Set the nodeTxnServiceOperation
setServiceOptions(ServiceOptions serviceOptions)
Set the serviceTxnServiceOperation
setType(TxnServiceVerb type)
Set the type of operation to performJsonObject
toJson()
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:TxnOperation
Returns the type of operation in a transaction- Specified by:
getOperationType
in interfaceTxnOperation
- Returns:
- the type of operation in a transaction
-
-