org.HdrHistogram.Histogram.subtract()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.HdrHistogram.Histogram.subtract()方法的一些代码示例,展示了Histogram.subtract()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.subtract()方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:subtract

Histogram.subtract介绍

暂无

代码示例

代码示例来源:origin: HdrHistogram/HdrHistogram

@Override
public void subtract(final AbstractHistogram otherHistogram)
    throws ArrayIndexOutOfBoundsException, IllegalArgumentException {
  // Synchronize subtract(). Avoid deadlocks by synchronizing in order of construction identity count.
  if (identity < otherHistogram.identity) {
    synchronized (this) {
      synchronized (otherHistogram) {
        super.subtract(otherHistogram);
      }
    }
  } else {
    synchronized (otherHistogram) {
      synchronized (this) {
        super.subtract(otherHistogram);
      }
    }
  }
}

代码示例来源:origin: HdrHistogram/HdrHistogram

((Histogram) movingWindowSumHistogram).subtract((Histogram) prevHist);

代码示例来源:origin: org.hdrhistogram/HdrHistogram

@Override
public void subtract(final AbstractHistogram otherHistogram)
    throws ArrayIndexOutOfBoundsException, IllegalArgumentException {
  // Synchronize subtract(). Avoid deadlocks by synchronizing in order of construction identity count.
  if (identity < otherHistogram.identity) {
    synchronized (this) {
      synchronized (otherHistogram) {
        super.subtract(otherHistogram);
      }
    }
  } else {
    synchronized (otherHistogram) {
      synchronized (this) {
        super.subtract(otherHistogram);
      }
    }
  }
}

代码示例来源:origin: HotelsDotCom/styx

public void reset() {
  if (this.state == IntervalState.AGGREGATED) {
    aggregateHistogram.subtract(this.intervalHistogram);
  }
  this.intervalHistogram.reset();
  this.state = IntervalState.EMPTY;
}

代码示例来源:origin: com.hotels.styx/styx-api

public void reset() {
  if (this.state == IntervalState.AGGREGATED) {
    aggregateHistogram.subtract(this.intervalHistogram);
  }
  this.intervalHistogram.reset();
  this.state = IntervalState.EMPTY;
}

代码示例来源:origin: org.hdrhistogram/HdrHistogram

((Histogram) movingWindowSumHistogram).subtract((Histogram) prevHist);

相关文章