/** * Instantiates a new operation impl. * * @param source the source * @param targets the targets * @param averageNanos the average nanos * @param executor the executor * @param historySize the history size * @param historyNanos the history nanos */ public OperationImpl(OperationStatistic<T> source, Set<T> targets, long averageNanos, ScheduledExecutorService executor, int historySize, long historyNanos) { this.source = source; this.count = new SemiExpiringStatistic<Long>(source.statistic(targets), executor, historySize, historyNanos); this.latency = new LatencyImpl(source, targets, averageNanos, executor, historySize, historyNanos); this.rate = new RateImpl(source, targets, averageNanos, executor, historySize, historyNanos); }
/** * Expire. * * @param expiryTime the expiry time * @return true, if successful */ boolean expire(long expiryTime) { return (count.expire(expiryTime) & rate.expire(expiryTime) & latency.expire(expiryTime)); }
/** * Sets the history. * * @param historySize the history size * @param historyNanos the history nanos */ void setHistory(int historySize, long historyNanos) { count.setHistory(historySize, historyNanos); rate.setHistory(historySize, historyNanos); latency.setHistory(historySize, historyNanos); } }
/** * Sets the window. * * @param averageNanos the new window */ void setWindow(long averageNanos) { rate.setWindow(averageNanos); latency.setWindow(averageNanos); }
/** * Start. */ void start() { count.start(); rate.start(); latency.start(); }
/** * Sets the window. * * @param averageNanos the new window */ void setWindow(long averageNanos) { rate.setWindow(averageNanos); latency.setWindow(averageNanos); }
/** * Start. */ void start() { count.start(); rate.start(); latency.start(); }
/** * Sets the history. * * @param historySize the history size * @param historyNanos the history nanos */ void setHistory(int historySize, long historyNanos) { count.setHistory(historySize, historyNanos); rate.setHistory(historySize, historyNanos); latency.setHistory(historySize, historyNanos); } }
/** * Expire. * * @param expiryTime the expiry time * @return true, if successful */ boolean expire(long expiryTime) { return (count.expire(expiryTime) & rate.expire(expiryTime) & latency.expire(expiryTime)); }
/** * Sets the window. * * @param averageNanos the new window */ void setWindow(long averageNanos) { rate.setWindow(averageNanos); latency.setWindow(averageNanos); }
/** * Start. */ void start() { count.start(); rate.start(); latency.start(); }
/** * Instantiates a new operation impl. * * @param source the source * @param targets the targets * @param averageNanos the average nanos * @param executor the executor * @param historySize the history size * @param historyNanos the history nanos */ public OperationImpl(OperationStatistic<T> source, Set<T> targets, long averageNanos, ScheduledExecutorService executor, int historySize, long historyNanos) { this.source = source; this.count = new SemiExpiringStatistic<Long>(source.statistic(targets), executor, historySize, historyNanos); this.latency = new LatencyImpl(source, targets, averageNanos, executor, historySize, historyNanos); this.rate = new RateImpl(source, targets, averageNanos, executor, historySize, historyNanos); }
/** * Sets the history. * * @param historySize the history size * @param historyNanos the history nanos */ void setHistory(int historySize, long historyNanos) { count.setHistory(historySize, historyNanos); rate.setHistory(historySize, historyNanos); latency.setHistory(historySize, historyNanos); } }
/** * Expire. * * @param expiryTime the expiry time * @return true, if successful */ boolean expire(long expiryTime) { return (count.expire(expiryTime) & rate.expire(expiryTime) & latency.expire(expiryTime)); }
/** * Instantiates a new operation impl. * * @param source the source * @param targets the targets * @param averageNanos the average nanos * @param executor the executor * @param historySize the history size * @param historyNanos the history nanos */ public OperationImpl(OperationStatistic<T> source, Set<T> targets, long averageNanos, ScheduledExecutorService executor, int historySize, long historyNanos) { this.source = source; this.count = new SemiExpiringStatistic<Long>(source.statistic(targets), executor, historySize, historyNanos); this.latency = new LatencyImpl(source, targets, averageNanos, executor, historySize, historyNanos); this.rate = new RateImpl(source, targets, averageNanos, executor, historySize, historyNanos); }