public class ActionCounter extends Object
Instances are created via builder(io.micrometer.core.instrument.MeterRegistry, java.lang.String).
The tags match those used by io.micrometer.core.aop.CountedAspect.
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionCounter.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ActionCounter.Builder |
builder(io.micrometer.core.instrument.MeterRegistry registry,
String name) |
<T> T |
call(Callable<T> task) |
void |
failure(String exception) |
void |
failure(Throwable reason)
Increments the "failure" count.
|
void |
run(Runnable task) |
void |
success()
Increments the "success" count.
|
<V,F extends io.netty.util.concurrent.Future<V>> |
track(F future) |
<V,F extends io.netty.util.concurrent.Future<V>> |
track(F future,
Function<V,String> errorExtractor) |
<T> Callable<T> |
wrap(Callable<T> c) |
Runnable |
wrap(Runnable r) |
public static ActionCounter.Builder builder(io.micrometer.core.instrument.MeterRegistry registry, String name)
public <V,F extends io.netty.util.concurrent.Future<V>> F track(F future)
public <V,F extends io.netty.util.concurrent.Future<V>> F track(F future,
Function<V,String> errorExtractor)
public void success()
public void failure(Throwable reason)
reason - (nullable) cause of the failure, or null if unknownpublic void failure(String exception)
public void run(Runnable task)
Copyright © 2021 Couchbase, Inc.. All rights reserved.