/** * Equivalent to {@code add(-1)}. */ public void decrement() { add(-1L); }
/** * Equivalent to {@code add(1)}. */ public void increment() { add(1L); }
/** * Add to the counter in the current bucket for the given {@link HystrixRollingNumberEvent} type. * <p> * The {@link HystrixRollingNumberEvent} must be a "counter" type <code>HystrixRollingNumberEvent.isCounter() == true</code>. * * @param type * HystrixRollingNumberEvent defining which counter to add to * @param value * long value to be added to the current bucket */ public void add(HystrixRollingNumberEvent type, long value) { getCurrentBucket().getAdder(type).add(value); }
public void addBucket(Bucket lastBucket) { for (HystrixRollingNumberEvent type : HystrixRollingNumberEvent.values()) { if (type.isCounter()) { getAdder(type).add(lastBucket.getAdder(type).sum()); } if (type.isMaxUpdater()) { getMaxUpdater(type).update(lastBucket.getMaxUpdater(type).max()); } } }
/** * Equivalent to {@code add(1)}. */ public void increment() { add(1L); }
/** * Equivalent to {@code add(-1)}. */ public void decrement() { add(-1L); }
/** * Add to the counter in the current bucket for the given {@link HystrixRollingNumberEvent} type. * <p> * The {@link HystrixRollingNumberEvent} must be a "counter" type <code>HystrixRollingNumberEvent.isCounter() == true</code>. * * @param type * HystrixRollingNumberEvent defining which counter to add to * @param value * long value to be added to the current bucket */ public void add(HystrixRollingNumberEvent type, long value) { getCurrentBucket().getAdder(type).add(value); }
public void addBucket(Bucket lastBucket) { for (HystrixRollingNumberEvent type : HystrixRollingNumberEvent.values()) { if (type.isCounter()) { getAdder(type).add(lastBucket.getAdder(type).sum()); } if (type.isMaxUpdater()) { getMaxUpdater(type).update(lastBucket.getMaxUpdater(type).max()); } } }