Example usage for com.google.common.util.concurrent AtomicDouble AtomicDouble

List of usage examples for com.google.common.util.concurrent AtomicDouble AtomicDouble

Introduction

In this page you can find the example usage for com.google.common.util.concurrent AtomicDouble AtomicDouble.

Prototype

public AtomicDouble(double initialValue) 

Source Link

Document

Creates a new AtomicDouble with the given initial value.

Usage

From source file:jurls.core.reinforcementlearning.RLParameters.java

public RLParameters(double alpha, double gamma, double lambda, double epsilon) {
    this.alpha = new AtomicDouble(alpha);
    this.gamma = new AtomicDouble(gamma);
    this.lambda = new AtomicDouble(lambda);
    this.epsilon = new AtomicDouble(epsilon);
}

From source file:com.netflix.servo.monitor.DoubleGauge.java

/**
 * Create a new instance with the specified configuration.
 *
 * @param config   configuration for this gauge
 *//*from ww  w.j  av  a  2 s.  c o  m*/
public DoubleGauge(MonitorConfig config) {
    super(config, new AtomicDouble(0.0));
    number = (AtomicDouble) getValue();
}

From source file:com.alibaba.jstorm.common.metric.operator.updater.DoubleAddUpdater.java

@Override
public AtomicDouble update(Number object, AtomicDouble cache, Object... others) {
    // TODO Auto-generated method stub
    if (cache == null) {
        cache = new AtomicDouble(0.0);
    }//from  ww  w  .  jav  a  2 s  .  c  om
    if (object != null) {
        cache.addAndGet(object.doubleValue());
    }
    return cache;
}

From source file:org.apache.eagle.metric.CountingMetric.java

public CountingMetric(long timestamp, Map<String, String> dimensions, String metricName) {
    this(timestamp, dimensions, metricName, new AtomicDouble(0.0));
}

From source file:org.apache.reef.wake.contrib.grouper.impl.concurrency.SharedAggregate.java

public SharedAggregate(int localUpdatesThreshold) {
    this.localUpdatesThreshold = localUpdatesThreshold;
    this.localData = new ThreadLocal<LocalEntry>() {
        @Override/*from  w ww  . j  av  a2  s.c om*/
        public LocalEntry initialValue() {
            return new LocalEntry();
        }
    };
    this.sharedDelta = new AtomicDouble(0);
}

From source file:org.apache.eagle.metric.Metric.java

public Metric(long timestamp, Map<String, String> dimensions, String metricName) {
    this(timestamp, dimensions, metricName, new AtomicDouble(0.0));
}

From source file:org.apache.eagle.metric.reportor.EagleMetric.java

public EagleMetric(EagleMetric metric) {
    this.latestUserTimeClock = metric.latestUserTimeClock;
    this.name = metric.name;
    this.value = new AtomicDouble(metric.value.doubleValue());
    this.granularity = metric.granularity;
}

From source file:nars.failchamber.util.NSlider.java

public NSlider(float initialValue, float min, float max) {
    this(new AtomicDouble(initialValue), min, max);
}

From source file:com.srotya.tau.nucleus.metrics.MetricsSink.java

public void publishFloatMetric(String metricName, double value) {
    AtomicDouble val = floatMetrics.get(metricName);
    if (val == null) {
        val = new AtomicDouble(0);
        floatMetrics.put(metricName, val);
    }// w w w . j  a  va2  s. co  m
    val.set(value);
}

From source file:automenta.vivisect.swing.NSliderSwing.java

public NSliderSwing(float initialValue, float min, float max) {
    this(new AtomicDouble(initialValue), min, max);
}