@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Metered
\@Metered(name = "fancyName", eventType = "namings", rateUnit = TimeUnit.SECONDS)
public String fancyName(String name) {
return "Sir Captain " + name;
}
A meter for the defining class with the name fancyName
will be created and each time the
#fancyName(String)
method is invoked, the meter will be marked.Modifier and Type | Optional Element and Description |
---|---|
String |
eventType
The name of the type of events the meter is measuring.
|
String |
group
The group of the timer.
|
String |
name
The name of the meter.
|
TimeUnit |
rateUnit
The time unit of the meter's rate.
|
String |
type
The type of the timer.
|
public abstract String group
public abstract String type
public abstract String name
public abstract String eventType
public abstract TimeUnit rateUnit
Copyright © 2014. All Rights Reserved.