V - value typepublic class MapValue<V> extends Object implements Comparable<MapValue<V>>
| Modifier and Type | Class and Description |
|---|---|
static class |
MapValue.Digest
Digest or summary of a MapValue for use during Anti-Entropy exchanges.
|
| Constructor and Description |
|---|
MapValue(V value,
org.onosproject.store.Timestamp timestamp)
Constructor automatically to create the system time of construction.
|
MapValue(V value,
org.onosproject.store.Timestamp timestamp,
long creationTime)
Creates a map value using value, timestamp, and creation time.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MapValue<V> o) |
MapValue<V> |
copy()
Creates a copy of MapValue.
|
long |
creationTime()
Returns the creation time of this value.
|
MapValue.Digest |
digest()
Returns summary of a MapValue for use during Anti-Entropy exchanges.
|
boolean |
equals(Object other) |
V |
get()
Returns this value.
|
int |
hashCode() |
boolean |
isAlive()
Tests if this value is alive.
|
boolean |
isNewerThan(MapValue<V> other)
Tests if this value is newer than the specified MapValue.
|
boolean |
isNewerThan(org.onosproject.store.Timestamp timestamp)
Tests if this timestamp is newer than the specified timestamp.
|
boolean |
isTombstone()
Tests if this value is tombstone value with the specified timestamp.
|
org.onosproject.store.Timestamp |
timestamp()
Returns the timestamp of this value.
|
static <U> MapValue<U> |
tombstone(org.onosproject.store.Timestamp timestamp)
Creates a tombstone value with the specified timestamp.
|
String |
toString() |
public MapValue(V value, org.onosproject.store.Timestamp timestamp)
value - valuetimestamp - value timestamppublic MapValue(V value, org.onosproject.store.Timestamp timestamp, long creationTime)
value - valuetimestamp - value timestamp.creationTime - the system time (on local instance) of constructionpublic static <U> MapValue<U> tombstone(org.onosproject.store.Timestamp timestamp)
U - value typetimestamp - timestamp for tombstonepublic MapValue<V> copy()
The copy will have an updated creation time corresponding to when the copy was constructed.
public boolean isTombstone()
public boolean isAlive()
public org.onosproject.store.Timestamp timestamp()
public V get()
public long creationTime()
public boolean isNewerThan(MapValue<V> other)
other - the value to be comparedpublic boolean isNewerThan(org.onosproject.store.Timestamp timestamp)
timestamp - timestamp to be comparedpublic MapValue.Digest digest()
public int compareTo(MapValue<V> o)
compareTo in interface Comparable<MapValue<V>>Copyright © 2016. All rights reserved.