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.tokenThreshold- The number of tokens above which compaction will be triggered. If null, no token limit will be enforced. It will trigger compaction within the invocation.eventRetentionSize- The maximum number of events to retain and preserve from compaction. If null, no event retention limit will be enforced.
-
嵌套类概述
Nested ClassesModifier and TypeClassDescriptionstatic class“Builder for”是一个用于描述某种构建工具或框架的术语。它通常表示该工具/框架用于帮助开发者或系统管理员快速、高效地创建或构建特定类型的应用程序、系统或组件。例如:“Builder for Web Applications”(用于构建Web应用程序的工具)或“Builder for Cloud Services”(用于构建云服务的工具)。EventsCompactionConfig. -
构造函数概述
ConstructorsConstructorDescriptionEventsCompactionConfig(int compactionInterval, int overlapSize) EventsCompactionConfig(int compactionInterval, int overlapSize, @Nullable BaseEventSummarizer summarizer) EventsCompactionConfig(@Nullable Integer compactionInterval, @Nullable Integer overlapSize, @Nullable BaseEventSummarizer summarizer, @Nullable Integer tokenThreshold, @Nullable Integer eventRetentionSize) 创建一个……的实例。EventsCompactionConfig记录类(Record Class)。 -
方法概述
Modifier and TypeMethodDescriptionbuilder()@Nullable Integer返回该值的值。compactionInterval“record component”(记录组件)。final boolean用于表示另一个对象是否“等于”当前这个对象。@Nullable Integer返回该值的值。eventRetentionSize“record component”(记录组件)。final inthashCode()返回该对象的哈希码值。boolean@Nullable Integer返回该值的值。overlapSize“record component”(记录组件)。@Nullable BaseEventSummarizer返回该值的值。summarizer“record component”(记录组件)。@Nullable Integer返回该值的值。tokenThreshold“record component”(记录组件)。final StringtoString()返回该记录类的字符串表示形式。
-
构造函数详细信息
-
EventsCompactionConfig
public EventsCompactionConfig(int compactionInterval, int overlapSize) -
EventsCompactionConfig
public EventsCompactionConfig(int compactionInterval, int overlapSize, @Nullable BaseEventSummarizer summarizer) -
EventsCompactionConfig
public EventsCompactionConfig(@Nullable Integer compactionInterval, @Nullable Integer overlapSize, @Nullable BaseEventSummarizer summarizer, @Nullable Integer tokenThreshold, @Nullable Integer eventRetentionSize) 创建一个……的实例。EventsCompactionConfig记录类(Record Class)。- Parameters:
compactionInterval- the value for thecompactionIntervalrecord componentoverlapSize- the value for theoverlapSizerecord componentsummarizer- the value for thesummarizerrecord componenttokenThreshold- the value for thetokenThresholdrecord componenteventRetentionSize- the value for theeventRetentionSizerecord component
-
-
方法详细信息(Method Details)
-
builder
-
toBuilder
-
hasSlidingWindowCompactionConfig
public boolean hasSlidingWindowCompactionConfig() -
toString
-
hashCode
-
equals
用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。该记录类中的所有组件都会被逐一进行比较。Objects::equals(Object,Object). -
compactionInterval
返回该值的值。compactionInterval“record component”(记录组件)。- Returns:
- the value of the
compactionIntervalrecord component
-
overlapSize
返回该值的值。overlapSize“record component”(记录组件)。- Returns:
- the value of the
overlapSizerecord component
-
summarizer
返回该值的值。summarizer“record component”(记录组件)。- Returns:
- the value of the
summarizerrecord component
-
tokenThreshold
返回该值的值。tokenThreshold“record component”(记录组件)。- Returns:
- the value of the
tokenThresholdrecord component
-
eventRetentionSize
返回该值的值。eventRetentionSize“record component”(记录组件)。- Returns:
- the value of the
eventRetentionSizerecord component
-