Package akka.javasdk.agent
Record Class SessionHistoryResult.Truncated
- All Implemented Interfaces:
SessionHistoryResult
- Enclosing interface:
SessionHistoryResult
public static record SessionHistoryResult.Truncated(long fromSequenceNr, long toSequenceNr)
extends Record
implements SessionHistoryResult
The entity could not deliver the full history within its in-memory size limit. Stream the
journal for this session in
[fromSequenceNr, toSequenceNr] (both inclusive) to
reconstruct the rest.
fromSequenceNr is the last compaction point: events before it have been superseded
by the compaction summary now sitting in the entity, so re-reading them would duplicate
content. When no compaction has happened yet, fromSequenceNr is 0.
toSequenceNr is the entity's sequence number at the time of the reply — i.e. the
high-water mark of the in-memory state the caller is reconstructing. Bounding the journal read
upward prevents events persisted after the reply (e.g. a concurrent compaction that lands
between the entity reply and the journal stream) from leaking into the reconstructed history.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.SessionHistoryResult
SessionHistoryResult.Loaded, SessionHistoryResult.Truncated -
Constructor Summary
ConstructorsConstructorDescriptionTruncated(long fromSequenceNr, long toSequenceNr) Creates an instance of aTruncatedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefromSequenceNrrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thetoSequenceNrrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Truncated
public Truncated(long fromSequenceNr, long toSequenceNr) Creates an instance of aTruncatedrecord class.- Parameters:
fromSequenceNr- the value for thefromSequenceNrrecord componenttoSequenceNr- the value for thetoSequenceNrrecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
fromSequenceNr
public long fromSequenceNr()Returns the value of thefromSequenceNrrecord component.- Returns:
- the value of the
fromSequenceNrrecord component
-
toSequenceNr
public long toSequenceNr()Returns the value of thetoSequenceNrrecord component.- Returns:
- the value of the
toSequenceNrrecord component
-