Package io.vertx.ext.consul
Class TxnError
- java.lang.Object
-
- io.vertx.ext.consul.TxnError
-
public class TxnError extends Object
Holds information describing which operations failed if the transaction was rolled back.- Author:
- Ruslan Sennov
-
-
Constructor Summary
Constructors Constructor Description TxnError()
Default constructorTxnError(JsonObject json)
Constructor from JSON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOpIndex()
Get the index of the failed operation in the transactionString
getWhat()
Get error message about why that operation failed.TxnError
setOpIndex(int opIndex)
Set the index of the failed operation in the transactionTxnError
setWhat(String what)
Set error message about why that operation failed.JsonObject
toJson()
Convert to JSON
-
-
-
Constructor Detail
-
TxnError
public TxnError()
Default constructor
-
TxnError
public TxnError(JsonObject json)
Constructor from JSON- Parameters:
json
- the JSON
-
-
Method Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
getOpIndex
public int getOpIndex()
Get the index of the failed operation in the transaction- Returns:
- the index of the failed operation in the transaction
-
getWhat
public String getWhat()
Get error message about why that operation failed.- Returns:
- error message about why that operation failed.
-
setOpIndex
public TxnError setOpIndex(int opIndex)
Set the index of the failed operation in the transaction- Parameters:
opIndex
- the index of the failed operation in the transaction- Returns:
- reference to this, for fluency
-
-