Record Class EventsCompactionConfig
java.lang.Object
java.lang.Record
com.google.adk.summarizer.EventsCompactionConfig
- Record Components:
compactionInterval- The number of new user-initiated invocations that, once fully represented in the session's events, will trigger a compaction.overlapSize- The number of preceding invocations to include from the end of the last compacted range. This creates an overlap between consecutive compacted summaries, maintaining context.summarizer- An event summarizer to use for compaction.
public record EventsCompactionConfig(int compactionInterval, int overlapSize, BaseEventSummarizer summarizer)
extends Record
Configuration for event compaction.
-
Constructor Summary
ConstructorsConstructorDescriptionEventsCompactionConfig(int compactionInterval, int overlapSize, BaseEventSummarizer summarizer) Creates an instance of aEventsCompactionConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecompactionIntervalrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theoverlapSizerecord component.Returns the value of thesummarizerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EventsCompactionConfig
public EventsCompactionConfig(int compactionInterval, int overlapSize, BaseEventSummarizer summarizer) Creates an instance of aEventsCompactionConfigrecord class.- Parameters:
compactionInterval- the value for thecompactionIntervalrecord componentoverlapSize- the value for theoverlapSizerecord componentsummarizer- the value for thesummarizerrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
compactionInterval
public int compactionInterval()Returns the value of thecompactionIntervalrecord component.- Returns:
- the value of the
compactionIntervalrecord component
-
overlapSize
public int overlapSize()Returns the value of theoverlapSizerecord component.- Returns:
- the value of the
overlapSizerecord component
-
summarizer
Returns the value of thesummarizerrecord component.- Returns:
- the value of the
summarizerrecord component
-