- 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOpIndex()Get the index of the failed operation in the transactionStringgetWhat()Get error message about why that operation failed.TxnErrorsetOpIndex(int opIndex)Set the index of the failed operation in the transactionTxnErrorsetWhat(String what)Set error message about why that operation failed.io.vertx.core.json.JsonObjecttoJson()Convert to JSON
-
-
-
Method Detail
-
toJson
public io.vertx.core.json.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
-
-