Record Class Tt

java.lang.Object
java.lang.Record
com.twicedb.shared.Tt

public record Tt(long tt) extends Record
The transaction time.

Tt is assigned to writes by the TwiceDB server; users have no control over the assigned Tt. Users may read at any Tt up to and including the current Lsqt.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Tt
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tt(long tt)
    Creates an instance of a Tt record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    boolean
     
    static Tt
     
    static Tt
     
    static Tt
     
    static Tt
    of(Date d)
     
    final String
    Returns a string representation of this record class.
    long
    tt()
    Returns the value of the tt record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • INF

      public static final Tt INF
  • Constructor Details

    • Tt

      public Tt(long tt)
      Creates an instance of a Tt record class.
      Parameters:
      tt - the value for the tt record component
  • Method Details

    • isGreater

      public boolean isGreater(Tt o)
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(Tt o)
    • of

      public static Tt of(Date d)
    • of

      public static Tt of(Instant i)
    • of

      public static Tt of(LocalDate ld)
    • of

      public static Tt of(ZonedDateTime zdt)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tt

      public long tt()
      Returns the value of the tt record component.
      Returns:
      the value of the tt record component