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 Details

    • TxnServiceOperation

      public TxnServiceOperation()
      Default constructor
    • TxnServiceOperation

      public TxnServiceOperation(JsonObject json)
      Constructor from JSON
      Parameters:
      json - the JSON
  • Method Details

    • 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 interface TxnOperation
      Returns:
      the type of operation in a transaction