Package org.actioncontroller
Interface TimerRegistry
-
public interface TimerRegistryAn extension point for measuring the execution of actions. E.g. use with DropWizard metrics to create a timer histogram for each action namedWhateverController/whateverAction:MetricRegistry metricRegistry = new MetricRegistry() TimerRegistry counterRegistry = action -> { String name = ApiServlet.class.getSimpleName() + "/" + action.getMethodName(); Timer histogram = metricRegistry.timer(name); return histogram::update; }; apiServlet.setTimerRegistry(counterRegistry);
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTimerRegistry.Timer
-
Field Summary
Fields Modifier and Type Field Description static TimerRegistryNULL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TimerRegistry.TimergetTimer(ApiControllerAction action)
-
-
-
Field Detail
-
NULL
static final TimerRegistry NULL
-
-
Method Detail
-
getTimer
TimerRegistry.Timer getTimer(ApiControllerAction action)
-
-