public interface DurationTracker extends 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 and Description |
|---|---|
default 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 AutoCloseabledefault Duration asDuration()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.