package unsafe
- Alphabetic
- By Inheritance
- unsafe
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class AtomicDouble extends Number with Serializable
A
double
value that may be updated atomically.A
double
value that may be updated atomically. See thejava.util.concurrent.atomic
package specification for description of the properties of atomic variables. AnAtomicDouble
is used in applications such as atomic accumulation, and cannot be used as a replacement for aDouble
. However, this class does extendNumber
to allow uniform access by tools and utilities that deal with numerically-based classes.This class compares primitive
double
values in methods such as#compareAndSet
by comparing their bitwise representation usingDouble#doubleToRawLongBits
, which differs from both the primitive double==
operator and fromDouble#equals
, as if implemented by:static boolean bitEquals(double x, double y) { long xBits = Double.doubleToRawLongBits(x); long yBits = Double.doubleToRawLongBits(y); return xBits == yBits;
}It is possible to write a more scalable updater, at the cost of giving up strict atomicity. See for example <a href="http://gee.cs.oswego.edu/dl/jsr166/dist/docs/java.base/java/util/concurrent/atomic/DoubleAdder.html"> DoubleAdder.
- trait LabelledMetric[R, E, M] extends AnyRef
Helper to create strongly typed Micrometer labelled metrics.
Helper to create strongly typed Micrometer labelled metrics.
Metrics are defined with a list of labels whose length is statically known. Operations on the metric (increment a counter for instance), require to pass a list of label values with the same length.
- type Registry = Service
Value Members
- def meterRegistry: RIO[Registry, MeterRegistry]
- def updateRegistry[A](f: (MeterRegistry) => Task[A]): RIO[Registry, A]
- def zipLabelsAsTags(labelNames: Seq[String], labelValues: Seq[String]): Seq[Tag]
- object Counter extends LabelledMetric[Registry, Throwable, Counter]
- object DistributionSummary extends LabelledMetric[Registry, Throwable, DistributionSummary]
- object Gauge extends LabelledMetric[Registry, Throwable, Gauge]
- object Registry
- object TimeGauge extends LabelledMetric[Registry, Throwable, TimeGauge]
- object Timer extends LabelledMetric[Registry, Throwable, Timer]