Class KeyValueOptions
java.lang.Object
io.vertx.ext.consul.KeyValueOptions
Options used to put key/value pair to Consul.
- Author:
- Ruslan Sennov
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorKeyValueOptions(JsonObject options) Constructor from JSONKeyValueOptions(KeyValueOptions options) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionGet session ID for lock acquisition operation.longGet the Check-And-Set index.longgetFlags()Get the flags.Get session ID for lock release operation.setAcquireSession(String acquireSession) Set session ID for lock acquisition operation.setCasIndex(long index) Set the Check-And-Set index.setFlags(long flags) Set the flags.setReleaseSession(String releaseSession) Set session ID for lock release operation.toJson()Convert to JSON
-
Constructor Details
-
KeyValueOptions
public KeyValueOptions()Default constructor -
KeyValueOptions
Copy constructor- Parameters:
options- the one to copy
-
KeyValueOptions
-
-
Method Details
-
toJson
-
getAcquireSession
Get session ID for lock acquisition operation.- Returns:
- the ID of session
-
setAcquireSession
Set session ID for lock acquisition operation.- Parameters:
acquireSession- the ID of session- Returns:
- reference to this, for fluency
-
getReleaseSession
Get session ID for lock release operation.- Returns:
- the ID of session
-
setReleaseSession
Set session ID for lock release operation.- Parameters:
releaseSession- the ID of session- Returns:
- reference to this, for fluency
-
getFlags
public long getFlags()Get the flags. Flags is an value between0and 264-1 that can be attached to each entry. Clients can choose to use this however makes sense for their application.- Returns:
- the flags
-
setFlags
Set the flags. Flags is an value between0and 264-1 that can be attached to each entry. Clients can choose to use this however makes sense for their application.- Parameters:
flags- the flags- Returns:
- reference to this, for fluency
-
getCasIndex
public long getCasIndex()Get the Check-And-Set index. If the index is0, Consul will only put the key if it does not already exist. If the index is non-zero, the key is only set if the index matches the ModifyIndex of that key.- Returns:
- the Check-And-Set index
- See Also:
-
setCasIndex
Set the Check-And-Set index. If the index is0, Consul will only put the key if it does not already exist. If the index is non-zero, the key is only set if the index matches the ModifyIndex of that key.- Parameters:
index- the Check-And-Set index- Returns:
- reference to this, for fluency
- See Also:
-