public interface Snapshot
Modifier and Type | Method and Description |
---|---|
boolean |
checkpointAvailable(java.lang.String key)
Weater a checkpoint available for a kye
|
java.lang.Object |
get(java.lang.String key)
Get the value for a key
|
java.lang.Object |
getOrDefault(java.lang.String key,
java.lang.Object defaultValue)
Get the value for key or the default
|
long |
getVersion()
Returns the current version of the snapshot
|
void |
setPacker(java.lang.String key,
DataPacker dataPacker)
This method can be used to define packers.
|
void |
setValue(java.lang.String key,
java.lang.Object value)
This method can be used to set/update values into the snapshot
|
default void |
setValue(java.lang.String key,
java.lang.Object value,
DataPacker packer)
Set a value along with the packer to use for serializing the value
|
void setPacker(java.lang.String key, DataPacker dataPacker)
Object
and serialized with ObjectPacker
key
- keydataPacker
- the data packer to use for the keyvoid setValue(java.lang.String key, java.lang.Object value)
key
- keyvalue
- value to adddefault void setValue(java.lang.String key, java.lang.Object value, DataPacker packer)
key
- keyvalue
- valuepacker
- packerjava.lang.Object getOrDefault(java.lang.String key, java.lang.Object defaultValue)
key
- keydefaultValue
- default valuejava.lang.Object get(java.lang.String key)
key
- keylong getVersion()
boolean checkpointAvailable(java.lang.String key)
key
- key