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 Summary
ConstructorsConstructorDescriptionJKleppmannTreePersistentData(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 aJKleppmannTreePersistentDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongclock()Returns the value of theclockrecord component.Collect outgoing references to other objects.final booleanIndicates whether some other object is "equal to" this one.booleanfrozen()Returns the value of thefrozenrecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> log()Returns the value of thelogrecord component.Returns the value of thepeerTimestampLogrecord component.org.pcollections.PMap<PeerId, org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, OpMove<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>>> queues()Returns the value of thequeuesrecord component.org.pcollections.PCollection<JDataRef> refsFrom()Returns the value of therefsFromrecord component.final StringtoString()Returns a string representation of this record class.withClock(long clock) withFrozen(boolean frozen) Create a copy of this object with the given frozen state.withLog(org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> log) withPeerTimestampLog(org.pcollections.PMap<PeerId, Long> peerTimestampLog) withQueues(org.pcollections.PMap<PeerId, org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, OpMove<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>>> queues) withRefsFrom(org.pcollections.PCollection<JDataRef> refs) Create a copy of this object with the given list of incoming references.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.usatiuk.objects.JData
estimateSize
-
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 aJKleppmannTreePersistentDatarecord class.- Parameters:
key- the value for thekeyrecord componentrefsFrom- the value for therefsFromrecord componentfrozen- the value for thefrozenrecord componentclock- the value for theclockrecord componentqueues- the value for thequeuesrecord componentpeerTimestampLog- the value for thepeerTimestampLogrecord componentlog- the value for thelogrecord component
-
-
Method Details
-
withRefsFrom
Description copied from interface:JDataRefcountedCreate a copy of this object with the given list of incoming references.- Specified by:
withRefsFromin interfaceJDataRefcounted- Parameters:
refs- list of incoming references- Returns:
- copy of this object with the given list of incoming references
-
withFrozen
Description copied from interface:JDataRefcountedCreate a copy of this object with the given frozen state.- Specified by:
withFrozenin interfaceJDataRefcounted- Parameters:
frozen- true if this object should be frozen, false otherwise- Returns:
- copy of this object with the given frozen state
-
withClock
-
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
public JKleppmannTreePersistentData withLog(org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> log) -
collectRefsTo
Description copied from interface:JDataRefcountedCollect outgoing references to other objects.- Specified by:
collectRefsToin interfaceJDataRefcounted- Returns:
- list of outgoing references
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
Returns the value of thekeyrecord component. -
refsFrom
Returns the value of therefsFromrecord component.- Specified by:
refsFromin interfaceJDataRefcounted- Returns:
- the value of the
refsFromrecord component
-
frozen
public boolean frozen()Returns the value of thefrozenrecord component.- Specified by:
frozenin interfaceJDataRefcounted- Returns:
- the value of the
frozenrecord component
-
clock
public long clock()Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-
queues
public org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long, queues()PeerId>, OpMove<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>>> Returns the value of thequeuesrecord component.- Returns:
- the value of the
queuesrecord component
-
peerTimestampLog
Returns the value of thepeerTimestampLogrecord component.- Returns:
- the value of the
peerTimestampLogrecord component
-
log
public org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>, log()LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> Returns the value of thelogrecord component.- Returns:
- the value of the
logrecord component
-