@Retention(value=RUNTIME) @Target(value=METHOD) public @interface TimedResource
@TimedResource(name = "fancyName", rateUnit = TimeUnit.SECONDS, durationUnit = TimeUnit.MICROSECONDS)
public String getStuff() {
return "Sir Captain " + name;
}
One timer for each response code for the defining class with the name getStuff-[responseCode]
will be created and each time the #getStuff() method is invoked, the
method's execution will be timed.| Modifier and Type | Optional Element and Description |
|---|---|
int |
defaultStatusCode
The default status code of the method.
|
String |
name
The name of the timer.
|
public abstract String name
public abstract int defaultStatusCode
Copyright © 2010-2014. All Rights Reserved.