Class Value
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.Value
-
- All Implemented Interfaces:
java.io.Serializable
public final class Value extends java.lang.Object implements java.io.Serializable
Represents a value in the key-value store (including its timestamp). Values are stored inCell
s.- See Also:
Cell
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.base.Function<Value,java.lang.Long>
GET_TIMESTAMP
static com.google.common.base.Function<Value,byte[]>
GET_VALUE
static long
INVALID_VALUE_TIMESTAMP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Value
create(byte[] contents, long timestamp)
static Value
createWithCopyOfData(byte[] contents, long timestamp)
boolean
equals(java.lang.Object obj)
byte[]
getContents()
The contents of the value.long
getTimestamp()
The timestamp of the value.int
hashCode()
boolean
isEmpty()
static boolean
isTombstone(byte[] value)
java.lang.String
toString()
-
-
-
Field Detail
-
INVALID_VALUE_TIMESTAMP
public static final long INVALID_VALUE_TIMESTAMP
- See Also:
- Constant Field Values
-
GET_TIMESTAMP
public static final com.google.common.base.Function<Value,java.lang.Long> GET_TIMESTAMP
-
GET_VALUE
public static final com.google.common.base.Function<Value,byte[]> GET_VALUE
-
-
Method Detail
-
create
public static Value create(byte[] contents, long timestamp)
-
createWithCopyOfData
public static Value createWithCopyOfData(byte[] contents, long timestamp)
-
getContents
@Nonnull public byte[] getContents()
The contents of the value.
-
isEmpty
public boolean isEmpty()
-
isTombstone
public static boolean isTombstone(byte[] value)
-
getTimestamp
public long getTimestamp()
The timestamp of the value.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-