Package app.l2nx.gs.adapter.core.events
Class EventsConfig
java.lang.Object
app.l2nx.gs.adapter.core.events.EventsConfig
Operator-tunable knobs for the built-in events publisher. Resolved by
ConfigResolver.resolveEventsConfig() via the file-first source
chain (l2nx.properties → JVM system property → built-in default).
Drop policy default is EventsPublisher.DropPolicy.NEWEST.
EventsPublisher.DropPolicy.OLDEST is still supported but exhibits
eviction contention under multi-threaded producers — head-poll and newcomer-
offer are not atomic, so a hot path can over-count droppedTotal when
threads race on a full queue. NEWEST drops the incoming envelope atomically
via queue.offer() returning false, no eviction race.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventsPublisher.DropPolicystatic final intstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionEventsConfig(int queueCapacity, EventsPublisher.DropPolicy dropPolicy, long shutdownDrainMs) -
Method Summary
-
Field Details
-
DEFAULT_QUEUE_CAPACITY
public static final int DEFAULT_QUEUE_CAPACITY- See Also:
-
DEFAULT_DROP_POLICY
-
DEFAULT_SHUTDOWN_DRAIN_MS
public static final long DEFAULT_SHUTDOWN_DRAIN_MS- See Also:
-
-
Constructor Details
-
EventsConfig
-
-
Method Details
-
defaults
-
getQueueCapacity
public int getQueueCapacity() -
getDropPolicy
-
getShutdownDrainMs
public long getShutdownDrainMs()
-