Liking cljdoc? Tell your friends :D

jdk.util.concurrent.atomic.AtomicBoolean

A boolean value that may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables. An AtomicBoolean is used in applications such as atomically updated flags, and cannot be used as a replacement for a Boolean.

A boolean value that may be updated atomically. See the
java.util.concurrent.atomic package specification for
description of the properties of atomic variables. An
AtomicBoolean is used in applications such as atomically
updated flags, and cannot be used as a replacement for a
Boolean.
raw docstring

jdk.util.concurrent.atomic.AtomicInteger

An int value that may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables. An AtomicInteger is used in applications such as atomically incremented counters, and cannot be used as a replacement for an Integer. However, this class does extend Number to allow uniform access by tools and utilities that deal with numerically-based classes.

An int value that may be updated atomically.  See the
java.util.concurrent.atomic package specification for
description of the properties of atomic variables. An
AtomicInteger is used in applications such as atomically
incremented counters, and cannot be used as a replacement for an
Integer. However, this class does extend
Number to allow uniform access by tools and utilities that
deal with numerically-based classes.
raw docstring

jdk.util.concurrent.atomic.AtomicIntegerArray

An int array in which elements may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.

An int array in which elements may be updated atomically.
See the java.util.concurrent.atomic package
specification for description of the properties of atomic
variables.
raw docstring

jdk.util.concurrent.atomic.AtomicIntegerFieldUpdater

A reflection-based utility that enables atomic updates to designated volatile int fields of designated classes. This class is designed for use in atomic data structures in which several fields of the same node are independently subject to atomic updates.

Note that the guarantees of the compareAndSet method in this class are weaker than in other atomic classes. Because this class cannot ensure that all uses of the field are appropriate for purposes of atomic access, it can guarantee atomicity only with respect to other invocations of compareAndSet and set on the same updater.

A reflection-based utility that enables atomic updates to
designated volatile int fields of designated classes.
This class is designed for use in atomic data structures in which
several fields of the same node are independently subject to atomic
updates.

Note that the guarantees of the compareAndSet
method in this class are weaker than in other atomic classes.
Because this class cannot ensure that all uses of the field
are appropriate for purposes of atomic access, it can
guarantee atomicity only with respect to other invocations of
compareAndSet and set on the same updater.
raw docstring

jdk.util.concurrent.atomic.AtomicLong

A long value that may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables. An AtomicLong is used in applications such as atomically incremented sequence numbers, and cannot be used as a replacement for a Long. However, this class does extend Number to allow uniform access by tools and utilities that deal with numerically-based classes.

A long value that may be updated atomically.  See the
java.util.concurrent.atomic package specification for
description of the properties of atomic variables. An
AtomicLong is used in applications such as atomically
incremented sequence numbers, and cannot be used as a replacement
for a Long. However, this class does extend
Number to allow uniform access by tools and utilities that
deal with numerically-based classes.
raw docstring

jdk.util.concurrent.atomic.AtomicLongArray

A long array in which elements may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.

A long array in which elements may be updated atomically.
See the java.util.concurrent.atomic package specification
for description of the properties of atomic variables.
raw docstring

jdk.util.concurrent.atomic.AtomicLongFieldUpdater

A reflection-based utility that enables atomic updates to designated volatile long fields of designated classes. This class is designed for use in atomic data structures in which several fields of the same node are independently subject to atomic updates.

Note that the guarantees of the compareAndSet method in this class are weaker than in other atomic classes. Because this class cannot ensure that all uses of the field are appropriate for purposes of atomic access, it can guarantee atomicity only with respect to other invocations of compareAndSet and set on the same updater.

A reflection-based utility that enables atomic updates to
designated volatile long fields of designated classes.
This class is designed for use in atomic data structures in which
several fields of the same node are independently subject to atomic
updates.

Note that the guarantees of the compareAndSet
method in this class are weaker than in other atomic classes.
Because this class cannot ensure that all uses of the field
are appropriate for purposes of atomic access, it can
guarantee atomicity only with respect to other invocations of
compareAndSet and set on the same updater.
raw docstring

jdk.util.concurrent.atomic.AtomicMarkableReference

An AtomicMarkableReference maintains an object reference along with a mark bit, that can be updated atomically.

Implementation note: This implementation maintains markable references by creating internal objects representing "boxed" [reference, boolean] pairs.

An AtomicMarkableReference maintains an object reference
along with a mark bit, that can be updated atomically.

Implementation note: This implementation maintains markable
references by creating internal objects representing "boxed"
[reference, boolean] pairs.
raw docstring

jdk.util.concurrent.atomic.AtomicReference

An object reference that may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.

An object reference that may be updated atomically. See the java.util.concurrent.atomic package specification for description
of the properties of atomic variables.
raw docstring

jdk.util.concurrent.atomic.AtomicReferenceArray

An array of object references in which elements may be updated atomically. See the java.util.concurrent.atomic package specification for description of the properties of atomic variables.

An array of object references in which elements may be updated
atomically.  See the java.util.concurrent.atomic package
specification for description of the properties of atomic
variables.
raw docstring

jdk.util.concurrent.atomic.AtomicReferenceFieldUpdater

A reflection-based utility that enables atomic updates to designated volatile reference fields of designated classes. This class is designed for use in atomic data structures in which several reference fields of the same node are independently subject to atomic updates. For example, a tree node might be declared as

class Node { private volatile Node left, right;

private static final AtomicReferenceFieldUpdater<Node, Node> leftUpdater = AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "left"); private static AtomicReferenceFieldUpdater<Node, Node> rightUpdater = AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "right");

Node getLeft() { return left; } boolean compareAndSetLeft(Node expect, Node update) { return leftUpdater.compareAndSet(this, expect, update); } // ... and so on }

Note that the guarantees of the compareAndSet method in this class are weaker than in other atomic classes. Because this class cannot ensure that all uses of the field are appropriate for purposes of atomic access, it can guarantee atomicity only with respect to other invocations of compareAndSet and set on the same updater.

A reflection-based utility that enables atomic updates to
designated volatile reference fields of designated
classes.  This class is designed for use in atomic data structures
in which several reference fields of the same node are
independently subject to atomic updates. For example, a tree node
might be declared as



class Node {
  private volatile Node left, right;

  private static final AtomicReferenceFieldUpdater<Node, Node> leftUpdater =
    AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "left");
  private static AtomicReferenceFieldUpdater<Node, Node> rightUpdater =
    AtomicReferenceFieldUpdater.newUpdater(Node.class, Node.class, "right");

  Node getLeft() { return left; }
  boolean compareAndSetLeft(Node expect, Node update) {
    return leftUpdater.compareAndSet(this, expect, update);
  }
  // ... and so on
}

Note that the guarantees of the compareAndSet
method in this class are weaker than in other atomic classes.
Because this class cannot ensure that all uses of the field
are appropriate for purposes of atomic access, it can
guarantee atomicity only with respect to other invocations of
compareAndSet and set on the same updater.
raw docstring

jdk.util.concurrent.atomic.AtomicStampedReference

An AtomicStampedReference maintains an object reference along with an integer "stamp", that can be updated atomically.

Implementation note: This implementation maintains stamped references by creating internal objects representing "boxed" [reference, integer] pairs.

An AtomicStampedReference maintains an object reference
along with an integer "stamp", that can be updated atomically.

Implementation note: This implementation maintains stamped
references by creating internal objects representing "boxed"
[reference, integer] pairs.
raw docstring

jdk.util.concurrent.atomic.core

No vars found in this namespace.

jdk.util.concurrent.atomic.DoubleAccumulator

One or more variables that together maintain a running double value updated using a supplied function. When updates (method accumulate(double)) are contended across threads, the set of variables may grow dynamically to reduce contention. Method get() (or, equivalently, doubleValue()) returns the current value across the variables maintaining updates.

This class is usually preferable to alternatives when multiple threads update a common value that is used for purposes such as summary statistics that are frequently updated but less frequently read.

The supplied accumulator function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value as its first argument, and the given update as the second argument. For example, to maintain a running maximum value, you could supply Double::max along with Double.NEGATIVE_INFINITY as the identity. The order of accumulation within or across threads is not guaranteed. Thus, this class may not be applicable if numerical stability is required, especially when combining values of substantially different orders of magnitude.

Class DoubleAdder provides analogs of the functionality of this class for the common special case of maintaining sums. The call new DoubleAdder() is equivalent to new DoubleAccumulator((x, y) -> x y, 0.0).

This class extends Number, but does not define methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are not useful as collection keys.

One or more variables that together maintain a running double
value updated using a supplied function.  When updates (method
accumulate(double)) are contended across threads, the set of variables
may grow dynamically to reduce contention.  Method get()
(or, equivalently, doubleValue()) returns the current value
across the variables maintaining updates.

This class is usually preferable to alternatives when multiple
threads update a common value that is used for purposes such as
summary statistics that are frequently updated but less frequently
read.

The supplied accumulator function should be side-effect-free,
since it may be re-applied when attempted updates fail due to
contention among threads. The function is applied with the current
value as its first argument, and the given update as the second
argument.  For example, to maintain a running maximum value, you
could supply Double::max along with Double.NEGATIVE_INFINITY as the identity. The order of
accumulation within or across threads is not guaranteed. Thus, this
class may not be applicable if numerical stability is required,
especially when combining values of substantially different orders
of magnitude.

Class DoubleAdder provides analogs of the functionality
of this class for the common special case of maintaining sums.  The
call new DoubleAdder() is equivalent to new
DoubleAccumulator((x, y) -> x  y, 0.0).

This class extends Number, but does not define
methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are
not useful as collection keys.
raw docstring

jdk.util.concurrent.atomic.DoubleAdder

One or more variables that together maintain an initially zero double sum. When updates (method add(double)) are contended across threads, the set of variables may grow dynamically to reduce contention. Method sum() (or, equivalently doubleValue()) returns the current total combined across the variables maintaining the sum. The order of accumulation within or across threads is not guaranteed. Thus, this class may not be applicable if numerical stability is required, especially when combining values of substantially different orders of magnitude.

This class is usually preferable to alternatives when multiple threads update a common value that is used for purposes such as summary statistics that are frequently updated but less frequently read.

This class extends Number, but does not define methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are not useful as collection keys.

One or more variables that together maintain an initially zero
double sum.  When updates (method add(double)) are
contended across threads, the set of variables may grow dynamically
to reduce contention.  Method sum() (or, equivalently doubleValue()) returns the current total combined across the
variables maintaining the sum. The order of accumulation within or
across threads is not guaranteed. Thus, this class may not be
applicable if numerical stability is required, especially when
combining values of substantially different orders of magnitude.

This class is usually preferable to alternatives when multiple
threads update a common value that is used for purposes such as
summary statistics that are frequently updated but less frequently
read.

This class extends Number, but does not define
methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are
not useful as collection keys.
raw docstring

jdk.util.concurrent.atomic.LongAccumulator

One or more variables that together maintain a running long value updated using a supplied function. When updates (method accumulate(long)) are contended across threads, the set of variables may grow dynamically to reduce contention. Method get() (or, equivalently, longValue()) returns the current value across the variables maintaining updates.

This class is usually preferable to AtomicLong when multiple threads update a common value that is used for purposes such as collecting statistics, not for fine-grained synchronization control. Under low update contention, the two classes have similar characteristics. But under high contention, expected throughput of this class is significantly higher, at the expense of higher space consumption.

The order of accumulation within or across threads is not guaranteed and cannot be depended upon, so this class is only applicable to functions for which the order of accumulation does not matter. The supplied accumulator function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. The function is applied with the current value as its first argument, and the given update as the second argument. For example, to maintain a running maximum value, you could supply Long::max along with Long.MIN_VALUE as the identity.

Class LongAdder provides analogs of the functionality of this class for the common special case of maintaining counts and sums. The call new LongAdder() is equivalent to new LongAccumulator((x, y) -> x y, 0L.

This class extends Number, but does not define methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are not useful as collection keys.

One or more variables that together maintain a running long
value updated using a supplied function.  When updates (method
accumulate(long)) are contended across threads, the set of variables
may grow dynamically to reduce contention.  Method get()
(or, equivalently, longValue()) returns the current value
across the variables maintaining updates.

This class is usually preferable to AtomicLong when
multiple threads update a common value that is used for purposes such
as collecting statistics, not for fine-grained synchronization
control.  Under low update contention, the two classes have similar
characteristics. But under high contention, expected throughput of
this class is significantly higher, at the expense of higher space
consumption.

The order of accumulation within or across threads is not
guaranteed and cannot be depended upon, so this class is only
applicable to functions for which the order of accumulation does
not matter. The supplied accumulator function should be
side-effect-free, since it may be re-applied when attempted updates
fail due to contention among threads. The function is applied with
the current value as its first argument, and the given update as
the second argument.  For example, to maintain a running maximum
value, you could supply Long::max along with Long.MIN_VALUE as the identity.

Class LongAdder provides analogs of the functionality of
this class for the common special case of maintaining counts and
sums.  The call new LongAdder() is equivalent to new
LongAccumulator((x, y) -> x  y, 0L.

This class extends Number, but does not define
methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are
not useful as collection keys.
raw docstring

jdk.util.concurrent.atomic.LongAdder

One or more variables that together maintain an initially zero long sum. When updates (method add(long)) are contended across threads, the set of variables may grow dynamically to reduce contention. Method sum() (or, equivalently, longValue()) returns the current total combined across the variables maintaining the sum.

This class is usually preferable to AtomicLong when multiple threads update a common sum that is used for purposes such as collecting statistics, not for fine-grained synchronization control. Under low update contention, the two classes have similar characteristics. But under high contention, expected throughput of this class is significantly higher, at the expense of higher space consumption.

LongAdders can be used with a ConcurrentHashMap to maintain a scalable frequency map (a form of histogram or multiset). For example, to add a count to a ConcurrentHashMap<String,LongAdder> freqs, initializing if not already present, you can use freqs.computeIfAbsent(k -> new LongAdder()).increment();

This class extends Number, but does not define methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are not useful as collection keys.

One or more variables that together maintain an initially zero
long sum.  When updates (method add(long)) are contended
across threads, the set of variables may grow dynamically to reduce
contention. Method sum() (or, equivalently, longValue()) returns the current total combined across the
variables maintaining the sum.

This class is usually preferable to AtomicLong when
multiple threads update a common sum that is used for purposes such
as collecting statistics, not for fine-grained synchronization
control.  Under low update contention, the two classes have similar
characteristics. But under high contention, expected throughput of
this class is significantly higher, at the expense of higher space
consumption.

LongAdders can be used with a ConcurrentHashMap to maintain a scalable
frequency map (a form of histogram or multiset). For example, to
add a count to a ConcurrentHashMap<String,LongAdder> freqs,
initializing if not already present, you can use freqs.computeIfAbsent(k -> new LongAdder()).increment();

This class extends Number, but does not define
methods such as equals, hashCode and compareTo because instances are expected to be mutated, and so are
not useful as collection keys.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close