Class TxnKVOperation
java.lang.Object
io.vertx.ext.consul.TxnKVOperation
- All Implemented Interfaces:
TxnOperation
Holds operation to apply to the key/value store inside a transaction
- Author:
- Ruslan Sennov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetFlags()Get the flags attached to this entry.longgetIndex()Get the index used for locking, unlocking, and check-and-set operations.getKey()Get the keyReturns the type of operation in a transactionGet the session used for locking, unlocking, and check-and-set operations.getType()Get the type of operation to performgetValue()Get the valuesetFlags(long flags) Set the flags attached to this entry.setIndex(long index) Set the index used for locking, unlocking, and check-and-set operations.Set the keysetSession(String session) Set the session used for locking, unlocking, and check-and-set operations.Set the type of operation to performSet the valuetoJson()Convert to JSON
-
Constructor Details
-
TxnKVOperation
public TxnKVOperation()Default constructor -
TxnKVOperation
-
-
Method Details
-
toJson
-
getType
Get the type of operation to perform- Returns:
- the type of operation to perform
-
getKey
-
getValue
-
getFlags
public long getFlags()Get the flags attached to this entry. Clients can choose to use this however makes sense for their application.- Returns:
- the flags attached to this entry
-
getIndex
public long getIndex()Get the index used for locking, unlocking, and check-and-set operations.- Returns:
- the index
- See Also:
-
getSession
Get the session used for locking, unlocking, and check-and-set operations.- Returns:
- the session
- See Also:
-
setType
Set the type of operation to perform- Parameters:
type- the type of operation to perform- Returns:
- reference to this, for fluency
-
setKey
Set the key- Parameters:
key- the key- Returns:
- reference to this, for fluency
-
setValue
Set the value- Parameters:
value- the value- Returns:
- reference to this, for fluency
-
setFlags
Set the flags attached to this entry. Clients can choose to use this however makes sense for their application.- Parameters:
flags- the flags attached to this entry. Clients can choose to use this however makes sense for their application.- Returns:
- reference to this, for fluency
-
setIndex
Set the index used for locking, unlocking, and check-and-set operations.- Parameters:
index- the index- Returns:
- reference to this, for fluency
- See Also:
-
setSession
Set the session used for locking, unlocking, and check-and-set operations.- Parameters:
session- the session- Returns:
- reference to this, for fluency
- See Also:
-
getOperationType
Description copied from interface:TxnOperationReturns the type of operation in a transaction- Specified by:
getOperationTypein interfaceTxnOperation- Returns:
- the type of operation in a transaction
-