Class Value

  • All Implemented Interfaces:
    Measurable, java.io.Serializable

    public final class Value
    extends java.lang.Object
    implements java.io.Serializable, Measurable
    Represents a value in the key-value store (including its timestamp). Values are stored in Cells.
    See Also:
    Cell, Serialized Form
    • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object