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 aJKleppmannTreePersistentData
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
clock()
Returns the value of theclock
record component.Collect outgoing references to other objects.final boolean
Indicates whether some other object is "equal to" this one.boolean
frozen()
Returns the value of thefrozen
record component.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.org.pcollections.PSortedMap
<CombinedTimestamp<Long, PeerId>, LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> log()
Returns the value of thelog
record component.Returns the value of thepeerTimestampLog
record component.org.pcollections.PMap
<PeerId, org.pcollections.PSortedMap<CombinedTimestamp<Long, PeerId>, OpMove<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>>> queues()
Returns the value of thequeues
record component.org.pcollections.PCollection
<JDataRef> refsFrom()
Returns the value of therefsFrom
record component.final String
toString()
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, wait
Methods 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 aJKleppmannTreePersistentData
record class.- Parameters:
key
- the value for thekey
record componentrefsFrom
- the value for therefsFrom
record componentfrozen
- the value for thefrozen
record componentclock
- the value for theclock
record componentqueues
- the value for thequeues
record componentpeerTimestampLog
- the value for thepeerTimestampLog
record componentlog
- the value for thelog
record component
-
-
Method Details
-
withRefsFrom
Description copied from interface:JDataRefcounted
Create a copy of this object with the given list of incoming references.- Specified by:
withRefsFrom
in interfaceJDataRefcounted
- Parameters:
refs
- list of incoming references- Returns:
- copy of this object with the given list of incoming references
-
withFrozen
Description copied from interface:JDataRefcounted
Create a copy of this object with the given frozen state.- Specified by:
withFrozen
in 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:JDataRefcounted
Collect outgoing references to other objects.- Specified by:
collectRefsTo
in 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 thekey
record component. -
refsFrom
Returns the value of therefsFrom
record component.- Specified by:
refsFrom
in interfaceJDataRefcounted
- Returns:
- the value of the
refsFrom
record component
-
frozen
public boolean frozen()Returns the value of thefrozen
record component.- Specified by:
frozen
in interfaceJDataRefcounted
- Returns:
- the value of the
frozen
record component
-
clock
public long clock()Returns the value of theclock
record component.- Returns:
- the value of the
clock
record component
-
queues
public org.pcollections.PMap<PeerId,org.pcollections.PSortedMap<CombinedTimestamp<Long, queues()PeerId>, OpMove<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>>> Returns the value of thequeues
record component.- Returns:
- the value of the
queues
record component
-
peerTimestampLog
Returns the value of thepeerTimestampLog
record component.- Returns:
- the value of the
peerTimestampLog
record component
-
log
public org.pcollections.PSortedMap<CombinedTimestamp<Long,PeerId>, log()LogRecord<Long, PeerId, JKleppmannTreeNodeMeta, JObjectKey>> Returns the value of thelog
record component.- Returns:
- the value of the
log
record component
-