
public class CumulativeCommandEventCounterStream extends BucketedCumulativeCounterStream<HystrixCommandCompletion,long[],long[]>
RollingCommandEventCounterStream,
so bucket rolls correspond to new data in this stream, though data never goes out of window in this stream.
Therefore, a new set of counters is produced every t2 (=t1/b) milliseconds
t1 = HystrixCommandProperties.metricsRollingStatisticalWindowInMilliseconds()
b = HystrixCommandProperties.metricsRollingStatisticalWindowBuckets()
These values are stable - there's no peeking into a bucket until it is emitted
These values get produced and cached in this class. This value (the latest observed value) may be queried using CumulativeCommandEventCounterStream.getLatest(HystrixEventType).bucketedStream, numBuckets, subscription| Modifier and Type | Method and Description |
|---|---|
static CumulativeCommandEventCounterStream |
getInstance(HystrixCommandKey commandKey,
HystrixCommandProperties properties) |
static CumulativeCommandEventCounterStream |
getInstance(HystrixCommandKey commandKey,
int numBuckets,
int bucketSizeInMs) |
long |
getLatest(HystrixEventType eventType) |
static void |
reset() |
observegetLatest, startCachingStreamValuesIfUnstarted, unsubscribepublic static CumulativeCommandEventCounterStream getInstance(HystrixCommandKey commandKey, HystrixCommandProperties properties)
public static CumulativeCommandEventCounterStream getInstance(HystrixCommandKey commandKey, int numBuckets, int bucketSizeInMs)
public static void reset()
public long getLatest(HystrixEventType eventType)