java.lang.AutoCloseableStatisticDurationTracker, StubDurationTrackerpublic interface DurationTracker
extends java.lang.AutoCloseable
throws Exception aspect of the signature
so it doesn't force code to add extra handling for any failures.
If a duration is declared as "failed()" then the failure counters
will be updated.| Modifier and Type | Method | Description |
|---|---|---|
default java.time.Duration |
asDuration() |
Get the duration of an operation as a java Duration
instance.
|
void |
close() |
Finish tracking: update the statistics with the timings.
|
void |
failed() |
The operation failed.
|
void failed()
void close()
close in interface java.lang.AutoCloseabledefault java.time.Duration asDuration()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.