Adds a nl.grons.sentries.support.SentriesRegistryListener to a collection of listeners that will be notified on sentry creation.
Adds a nl.grons.sentries.support.SentriesRegistryListener to a collection of listeners that will be notified on sentry creation. Listeners will be notified in the order in which they are added.
N.B.: The listener will be notified of all existing sentries when it first registers.
the listener that will be notified
Override to customize how com.yammer.metrics.core.MetricNames are created.
Override to customize how com.yammer.metrics.core.MetricNames are created.
the class which owns the sentry
the name of the sentry
the sentry's sentryType
the sentry's full name
Gets any existing sentry with the given name or, if none exists, adds the given sentry.
Gets any existing sentry with the given name or, if none exists, adds the given sentry.
type of the sentry
the sentry to add
the class that owns the sentry
name of the sentry
sentryType type of sentry
either the existing sentry or sentry
Returns a new concurrent map implementation.
Returns a new concurrent map implementation. Subclass this to do weird things with your own nl.grons.sentries.support.SentriesRegistry implementation.
a new scala.collection.concurrent.Map
Removes a nl.grons.sentries.support.SentriesRegistryListener from this registry's collection of listeners.
Removes a nl.grons.sentries.support.SentriesRegistryListener from this registry's collection of listeners.
the listener that will be removed
Removes the sentry with the given name.
Removes the sentry with the given name.
the name of the sentry
Removes the sentry for the given class with the given name (and sentryType).
Removes the sentry for the given class with the given name (and sentryType).
the class that owns the sentry
the name of the sentry
the sentryType of the sentry
Reset all known sentries to their initial state by calling [Sentry#reset] on each sentry.
Reset all known sentries to their initial state by calling [Sentry#reset] on each sentry.
See README.md section 'Sentries in tests' for alternatives during testing.
A registry of sentry instances.