Constructor and Description |
---|
SnapshotImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkpointAvailable(java.lang.String key)
Weater a checkpoint available for a kye
|
SnapshotImpl |
copy() |
boolean |
equals(java.lang.Object o) |
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
|
int |
hashCode() |
byte[] |
pack() |
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
|
void |
setVersion(long version) |
void |
unpack(byte[] bytes) |
public void setPacker(java.lang.String key, DataPacker dataPacker)
Snapshot
Object
and serialized with ObjectPacker
public void setValue(java.lang.String key, java.lang.Object value)
Snapshot
public long getVersion()
Snapshot
getVersion
in interface Snapshot
public boolean checkpointAvailable(java.lang.String key)
Snapshot
checkpointAvailable
in interface Snapshot
key
- keypublic void setVersion(long version)
public java.lang.Object getOrDefault(java.lang.String key, java.lang.Object defaultValue)
Snapshot
getOrDefault
in interface Snapshot
key
- keydefaultValue
- default valuepublic java.lang.Object get(java.lang.String key)
Snapshot
public byte[] pack()
public void unpack(byte[] bytes)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public SnapshotImpl copy()