Class LoomQueryCacheConfig

java.lang.Object
com.loomcache.client.query.LoomQueryCacheConfig

public final class LoomQueryCacheConfig extends Object
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 — when true (default), the cache is pre-populated by an initial scan of the source map on creation; when false, 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 with batchSize == 1 this is fully immediate delivery).
  • coalesce — when true, 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 of batchSize/delaySeconds (backpressure safety).

Defaults give immediate, per-event delivery — behaviourally identical to a cache with no batching.

  • Field Details

  • Method Details

    • defaults

      public static LoomQueryCacheConfig defaults()
    • builder

      public static LoomQueryCacheConfig.Builder 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

      public String toString()
      Overrides:
      toString in class Object