Record Class JKleppmannTreePersistentData

java.lang.Object
java.lang.Record
com.usatiuk.dhfs.jkleppmanntree.structs.JKleppmannTreePersistentData
All Implemented Interfaces:
JDataRefcounted, JData, Serializable

public record JKleppmannTreePersistentData(JObjectKey key, org.pcollections.PCollection<JDataRef> refsFrom, boolean frozen, long clock, org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>>> queues, org.pcollections.PMap<PeerId,Long> peerTimestampLog, org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,LogRecord<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>> log) extends Record implements JDataRefcounted
Various persistent data for JKleppmannTree
See Also:
  • Constructor Details

    • JKleppmannTreePersistentData

      public JKleppmannTreePersistentData(JObjectKey key, org.pcollections.PCollection<JDataRef> refsFrom, boolean frozen, long clock, org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>>> queues, org.pcollections.PMap<PeerId,Long> peerTimestampLog, org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,LogRecord<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>> log)
      Creates an instance of a JKleppmannTreePersistentData record class.
      Parameters:
      key - the value for the key record component
      refsFrom - the value for the refsFrom record component
      frozen - the value for the frozen record component
      clock - the value for the clock record component
      queues - the value for the queues record component
      peerTimestampLog - the value for the peerTimestampLog record component
      log - the value for the log record component
  • Method Details

    • withRefsFrom

      public JKleppmannTreePersistentData withRefsFrom(org.pcollections.PCollection<JDataRef> refs)
      Description copied from interface: JDataRefcounted
      Create a copy of this object with the given list of incoming references.
      Specified by:
      withRefsFrom in interface JDataRefcounted
      Parameters:
      refs - list of incoming references
      Returns:
      copy of this object with the given list of incoming references
    • withFrozen

      public JKleppmannTreePersistentData withFrozen(boolean frozen)
      Description copied from interface: JDataRefcounted
      Create a copy of this object with the given frozen state.
      Specified by:
      withFrozen in interface JDataRefcounted
      Parameters:
      frozen - true if this object should be frozen, false otherwise
      Returns:
      copy of this object with the given frozen state
    • withClock

      public JKleppmannTreePersistentData withClock(long clock)
    • withQueues

      public JKleppmannTreePersistentData withQueues(org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>>> queues)
    • withPeerTimestampLog

      public JKleppmannTreePersistentData withPeerTimestampLog(org.pcollections.PMap<PeerId,Long> peerTimestampLog)
    • withLog

    • collectRefsTo

      public Collection<JObjectKey> collectRefsTo()
      Description copied from interface: JDataRefcounted
      Collect outgoing references to other objects.
      Specified by:
      collectRefsTo in interface JDataRefcounted
      Returns:
      list of outgoing references
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • key

      public JObjectKey key()
      Returns the value of the key record component.
      Specified by:
      key in interface JData
      Returns:
      the value of the key record component
    • refsFrom

      public org.pcollections.PCollection<JDataRef> refsFrom()
      Returns the value of the refsFrom record component.
      Specified by:
      refsFrom in interface JDataRefcounted
      Returns:
      the value of the refsFrom record component
    • frozen

      public boolean frozen()
      Returns the value of the frozen record component.
      Specified by:
      frozen in interface JDataRefcounted
      Returns:
      the value of the frozen record component
    • clock

      public long clock()
      Returns the value of the clock record component.
      Returns:
      the value of the clock record component
    • queues

      public org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,OpMove<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>>> queues()
      Returns the value of the queues record component.
      Returns:
      the value of the queues record component
    • peerTimestampLog

      public org.pcollections.PMap<PeerId,Long> peerTimestampLog()
      Returns the value of the peerTimestampLog record component.
      Returns:
      the value of the peerTimestampLog record component
    • log

      public org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>,LogRecord<Long,PeerId,JKleppmannTreeNodeMeta,JObjectKey>> log()
      Returns the value of the log record component.
      Returns:
      the value of the log record component