public interface DurationTrackerFactory
Modifier and Type | Method and Description |
---|---|
default DurationTracker |
trackDuration(String key)
Initiate a duration tracking operation by creating/returning
an object whose
close() call will
update the statistics. |
default DurationTracker |
trackDuration(String key,
long count)
Initiate a duration tracking operation by creating/returning
an object whose
close() call will
update the statistics. |
default DurationTracker trackDuration(String key, long count)
close()
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.key
- statistic key prefixcount
- #of times to increment the matching counter in this
operation.default DurationTracker trackDuration(String key)
close()
call will
update the statistics.
The expected use is within a try-with-resources clause.key
- statistic keyCopyright © 2008–2021 Apache Software Foundation. All rights reserved.