public interface Ticker extends AutoCloseable
mark the end of the
code block. Ticker extends AutoCloseable to allow for try-with-resources style usage:
try (Ticker ignored = Timers.start("my-timer")) {
// monitored code block here
}
or
try (Ticker ignored = Metrics.start("my-metric")) {
// monitored code block here
}
| Modifier and Type | Field and Description |
|---|---|
static Ticker |
NO_OP
Simple no-op
Ticker implementation |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static final Ticker NO_OP
Ticker implementationvoid close()
close in interface AutoCloseableCopyright © 2019 Atlassian. All rights reserved.