public static interface Map.Entry extends Rollbackable
Map
,
Map.entrySet()
Modifier and Type | Method and Description |
---|---|
void |
$COMMIT(long timestamp)
Commit changes up to the given timestamp, but not including changes
made at timestamp and afterward.
|
Checkpoint |
$GET$CHECKPOINT()
Get the checkpoint object that monitors this rollbackable object.
|
void |
$RESTORE(long timestamp,
boolean trim)
Restore a previous state to all the private fields of this rollbackable
object.
|
java.lang.Object |
$SET$CHECKPOINT(Checkpoint checkpoint)
Set the checkpoint object of this rollbackable object.
|
boolean |
equals(java.lang.Object o)
Compares the specified object with this entry.
|
java.lang.Object |
getKey()
Get the key corresponding to this entry.
|
java.lang.Object |
getValue()
Get the value corresponding to this entry.
|
int |
hashCode()
Returns the hash code of the entry.
|
java.lang.Object |
setValue(java.lang.Object value)
Replaces the value with the specified object (optional operation).
|
java.lang.Object getKey()
java.lang.Object getValue()
java.lang.Object setValue(java.lang.Object value)
value
- the new value to storejava.lang.UnsupportedOperationException
- if the operation is not supportedjava.lang.ClassCastException
- if the value is of the wrong typejava.lang.IllegalArgumentException
- if something about the value
prevents it from existing in this mapjava.lang.NullPointerException
- if the map forbids null valuesint hashCode()
null
). In other words, this must be:
(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())
hashCode
in class java.lang.Object
boolean equals(java.lang.Object o)
(o instanceof Map.Entry) && (getKey() == null ? ((Map.Entry) o).getKey() == null : getKey().equals(((Map.Entry) o).getKey())) && (getValue() == null ? ((Map.Entry) o).getValue() == null : getValue().equals(((Map.Entry) o).getValue()))
equals
in class java.lang.Object
o
- the object to comparetrue
if it is equalvoid $COMMIT(long timestamp)
Rollbackable
$COMMIT
in interface Rollbackable
timestamp
- The timestamp.void $RESTORE(long timestamp, boolean trim)
Rollbackable
$RESTORE
in interface Rollbackable
timestamp
- The timestamp taken at the time when the previous
state was recorded.trim
- Whether to delete the records used for the rollback.Checkpoint.rollback(long, boolean)
Checkpoint $GET$CHECKPOINT()
Rollbackable
$GET$CHECKPOINT
in interface Rollbackable
java.lang.Object $SET$CHECKPOINT(Checkpoint checkpoint)
Rollbackable
$SET$CHECKPOINT
in interface Rollbackable
checkpoint
- The new checkpoint object.Checkpoint.setCheckpoint(Checkpoint)