Class LoomQueryCacheConfig
java.lang.Object
com.loomcache.client.query.LoomQueryCacheConfig
Declarative configuration for a
LoomQueryCache (continuous query cache): the
continuous-query-cache knobs that a migrating workload depends on. These control how
listener events are delivered; the cache view itself is always updated immediately,
so get/keySet reflect live state regardless of these settings.
populate— whentrue(default), the cache is pre-populated by an initial scan of the source map on creation; whenfalse, it starts empty and fills only from live events.batchSize— deliver listener events in batches of up to this many;1(default) delivers each event immediately.delaySeconds— maximum time a partially filled batch waits before being flushed;0(default) means no delay (combined withbatchSize == 1this is fully immediate delivery).coalesce— whentrue, multiple buffered events for the same key collapse to the latest before delivery, reducing listener churn for hot keys.bufferSize— hard cap on buffered (not-yet-delivered) events; reaching it forces an immediate flush regardless ofbatchSize/delaySeconds(backpressure safety).
Defaults give immediate, per-event delivery — behaviourally identical to a cache with no batching.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final booleanstatic final intstatic final boolean -
Method Summary
Modifier and TypeMethodDescriptionbooleanTrue when listener events should be buffered rather than delivered one at a time.intintstatic LoomQueryCacheConfig.Builderbuilder()booleancoalesce()static LoomQueryCacheConfigdefaults()intbooleanpopulate()toString()
-
Field Details
-
DEFAULT_POPULATE
public static final boolean DEFAULT_POPULATE- See Also:
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
DEFAULT_DELAY_SECONDS
public static final int DEFAULT_DELAY_SECONDS- See Also:
-
DEFAULT_COALESCE
public static final boolean DEFAULT_COALESCE- See Also:
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
-
Method Details
-
defaults
-
builder
-
populate
public boolean populate() -
batchSize
public int batchSize() -
delaySeconds
public int delaySeconds() -
coalesce
public boolean coalesce() -
bufferSize
public int bufferSize() -
batchingEnabled
public boolean batchingEnabled()True when listener events should be buffered rather than delivered one at a time. -
toString
-