public final class BucketConfig
extends java.lang.Object
BucketTimer
For example:
BucketConfig cfg = new BucketConfig.Builder().withBuckets(new long[]{10L, 20L}).build());
will create a configuration that will report buckets for <= 10ms, (10ms, 20ms], and higher
than 20ms. The default timeUnit is milliseconds but can be changed using the
BucketConfig.Builder.withTimeUnit(TimeUnit) method.
The user must specify buckets otherwise a NullPointerException will be generated.
BucketTimer for more details.| Modifier and Type | Class and Description |
|---|---|
static class |
BucketConfig.Builder
Helper class for constructing BucketConfigs.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
long[] |
getBuckets()
Get a copy of the array that holds the bucket values.
|
java.util.concurrent.TimeUnit |
getTimeUnit()
Get the TimeUnit of the buckets.
|
java.lang.String |
getTimeUnitAbbreviation()
Returns an abbreviation for the Bucket's TimeUnit.
|
int |
hashCode() |
java.lang.String |
toString() |
public java.util.concurrent.TimeUnit getTimeUnit()
public java.lang.String getTimeUnitAbbreviation()
public long[] getBuckets()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object