DurationTrackerFactorypublic final class StubDurationTrackerFactory extends java.lang.Object implements DurationTrackerFactory
| Modifier and Type | Field | Description |
|---|---|---|
static StubDurationTrackerFactory |
STUB_DURATION_TRACKER_FACTORY |
Single instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
DurationTracker |
trackDuration(java.lang.String key,
long count) |
Initiate a duration tracking operation by creating/returning
an object whose
close() call will
update the statistics. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittrackDurationpublic static final StubDurationTrackerFactory STUB_DURATION_TRACKER_FACTORY
public DurationTracker trackDuration(java.lang.String key, long count)
DurationTrackerFactoryclose() call will
update the statistics.
The statistics counter with the key name will be incremented
by the given count.
The expected use is within a try-with-resources clause.
The default implementation returns a stub duration tracker.trackDuration in interface DurationTrackerFactorykey - statistic key prefixcount - #of times to increment the matching counter in this
operation.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.