Performance: remove volatile from hot code

Fixes #7935

Fixes #7942
This commit is contained in:
Jake Landis 2017-08-08 10:48:56 -05:00
parent 07f9411345
commit 8c10355ecd
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ public class LongCounter extends AbstractMetric<Long> implements CounterMetric<L
private static final IllegalArgumentException NEGATIVE_COUNT_EXCEPTION = new IllegalArgumentException("Counters can not be incremented by negative values");
private LongAdder longAdder;
private volatile boolean dirty;
private boolean dirty;
/**
* Constructor

View file

@ -8,7 +8,7 @@ import org.logstash.instrument.metrics.AbstractMetric;
*/
public abstract class AbstractGaugeMetric<T> extends AbstractMetric<T> implements GaugeMetric<T,T>{
private volatile boolean dirty;
private boolean dirty;
private volatile T value;