public class KeyValue extends Object implements TxnResult
| Constructor and Description | 
|---|
KeyValue()
Default constructor 
 | 
KeyValue(JsonObject json)
Constructor from JSON 
 | 
KeyValue(KeyValue other)
Copy constructor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
long | 
getCreateIndex()
Get the internal index value that represents when the entry was created. 
 | 
long | 
getFlags()
Get the flags attached to this entry. 
 | 
String | 
getKey()
Get the key 
 | 
long | 
getLockIndex()
Get the number of times this key has successfully been acquired in a lock. 
 | 
long | 
getModifyIndex()
Get the last index that modified this key. 
 | 
TxnOperationType | 
getOperationType()  | 
String | 
getSession()
Get the session that owns the lock 
 | 
String | 
getValue()
Get the value. 
 | 
int | 
hashCode()  | 
boolean | 
isPresent()
Return  
true if there is a key/value pair present, otherwise false. | 
KeyValue | 
setCreateIndex(long createIndex)
Set the internal index value that represents when the entry was created. 
 | 
KeyValue | 
setFlags(long flags)
Set the flags attached to this entry. 
 | 
KeyValue | 
setKey(String key)
Set the key 
 | 
KeyValue | 
setLockIndex(long lockIndex)
Set the number of times this key has successfully been acquired in a lock. 
 | 
KeyValue | 
setModifyIndex(long modifyIndex)
Set the last index that modified this key. 
 | 
KeyValue | 
setSession(String session)
Set the session that owns the lock 
 | 
KeyValue | 
setValue(String value)
Set the value 
 | 
JsonObject | 
toJson()
Convert to JSON 
 | 
public KeyValue()
public KeyValue(KeyValue other)
other - the one to copypublic KeyValue(JsonObject json)
json - the JSONpublic JsonObject toJson()
public boolean isPresent()
true if there is a key/value pair present, otherwise false.true if there is a key/value pair present, otherwise falsepublic String getKey()
public KeyValue setKey(String key)
key - the keypublic String getValue()
public KeyValue setValue(String value)
value - the valuepublic String getSession()
public KeyValue setSession(String session)
session - the session that owns the lockpublic long getFlags()
public KeyValue setFlags(long flags)
flags - the flags attached to this entry. Clients can choose to use this however makes sense for their application.public long getCreateIndex()
public KeyValue setCreateIndex(long createIndex)
createIndex - the internal index value that represents when the entry was created.public long getModifyIndex()
public KeyValue setModifyIndex(long modifyIndex)
modifyIndex - the last index that modified this key.public long getLockIndex()
public KeyValue setLockIndex(long lockIndex)
lockIndex - the number of times this key has successfully been acquired in a lock.public TxnOperationType getOperationType()
getOperationType in interface TxnResultCopyright © 2023 Eclipse. All rights reserved.