|
Oracle NoSQL Database version 11gR2.2.0.26 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.kv.Version
public class Version
A Version refers to a specific version of a key-value pair.
When a key-value pair is initially inserted in the KV Store, and each time
it is updated, it is assigned a unique version token. The version is always
returned by the put method, for example, put
, and is
also returned by get methods, for example, get
. The
version is important for two reasons:
putIfVersion
or deleteIfVersion
method. If the version specified does not match the
current version of the value in the KV Store, these methods will not
perform the update or delete operation and will return an indication of
failure. Optionally, they will also return the current version and/or
value so the client can retry the operation or take a different action.
Consistency
parameter to the read operation, for example, get
. See Consistency.Version
for more information.
It is important to be aware that the system may infrequently assign a new
Version to a key-value pair, for example, when migrating data for better
resource usage. Therefore, when using the putIfVersion
or deleteIfVersion
methods,
one cannot assume that the Version will remain constant until it is changed
by the application.
Method Summary | |
---|---|
boolean |
equals(Object other)
|
static Version |
fromByteArray(byte[] keyBytes)
Deserializes the given bytes that were returned earlier by toByteArray() and returns the resulting Version. |
long |
getVersion()
For an implied Key associated with this Version, returns a unique identifier for this Version. |
int |
hashCode()
|
byte[] |
toByteArray()
Returns this Version as a serialized byte array, such that fromByteArray(byte[]) may be used to reconstitute the Version. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.kv.impl.util.FastExternalizable |
---|
writeFastExternal |
Method Detail |
---|
public byte[] toByteArray()
fromByteArray(byte[])
may be used to reconstitute the Version.
public static Version fromByteArray(byte[] keyBytes)
toByteArray()
and returns the resulting Version.
public long getVersion()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Oracle NoSQL Database version 11gR2.2.0.26 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |