public class OccupiableBucketLeapArray extends LeapArray<MetricBucket>
array, intervalInMs, sampleCount, windowLengthInMs| Constructor and Description |
|---|
OccupiableBucketLeapArray(int sampleCount,
int intervalInMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWaiting(long time,
int acquireCount) |
long |
currentWaiting() |
void |
debug(long time) |
MetricBucket |
newEmptyBucket(long time)
Create a new statistic value for bucket.
|
protected WindowWrap<MetricBucket> |
resetWindowTo(WindowWrap<MetricBucket> w,
long time)
Reset given bucket to provided start time and reset the value.
|
calculateWindowStart, currentWindow, currentWindow, getIntervalInMs, getIntervalInSecond, getPreviousWindow, getPreviousWindow, getSampleCount, getValidHead, getWindowValue, isWindowDeprecated, isWindowDeprecated, list, list, listAll, values, valuespublic OccupiableBucketLeapArray(int sampleCount,
int intervalInMs)
public MetricBucket newEmptyBucket(long time)
LeapArraynewEmptyBucket in class LeapArray<MetricBucket>time - current time in millisecondsprotected WindowWrap<MetricBucket> resetWindowTo(WindowWrap<MetricBucket> w, long time)
LeapArrayresetWindowTo in class LeapArray<MetricBucket>w - current buckettime - the start time of the bucket in millisecondspublic long currentWaiting()
currentWaiting in class LeapArray<MetricBucket>public void addWaiting(long time,
int acquireCount)
addWaiting in class LeapArray<MetricBucket>public void debug(long time)
debug in class LeapArray<MetricBucket>Copyright © 2019 Alibaba Group. All rights reserved.