Class TxnError
java.lang.Object
io.vertx.ext.consul.TxnError
Holds information describing which operations failed if the transaction was rolled back.
- Author:
- Ruslan Sennov
-
Constructor Summary
ConstructorsConstructorDescriptionTxnError()Default constructorTxnError(JsonObject json) Constructor from JSON -
Method Summary
Modifier and TypeMethodDescriptionintGet the index of the failed operation in the transactiongetWhat()Get error message about why that operation failed.setOpIndex(int opIndex) Set the index of the failed operation in the transactionSet error message about why that operation failed.toJson()Convert to JSON
-
Constructor Details
-
TxnError
public TxnError()Default constructor -
TxnError
-
-
Method Details
-
toJson
-
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
Get error message about why that operation failed.- Returns:
- error message about why that operation failed.
-
setOpIndex
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
-
setWhat
-