Class StubGuard
java.lang.Object
com.botwithus.bot.api.diag.StubGuard
Warns once per method-name when a producer-side stub is invoked.
Producer-backed API surface (entity queries that depend on producer-side
iteration the C++ side hasn't shipped yet) typically returns an empty list
without telling the caller. StubGuard closes that gap: the first
time warnOnce(String) is called for a given method name the
configured sink fires; subsequent calls for the same name are suppressed.
The warned set is an instance field (per-StubGuard
rather than process-global) — callers that want independent throttling
just hold independent instances.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StubGuard
public StubGuard()Default sink — logs at WARN to theStubGuardlogger. Useful for production wiring where the warning should appear in normal log output. -
StubGuard
-
-
Method Details
-
warnOnce
Fires the sink the first timemethodNameis observed; suppresses subsequent calls for the same name. Thread-safe.
-