ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/LongAdder.java
(Generate patch)

Comparing jsr166/src/jsr166e/LongAdder.java (file contents):
Revision 1.9 by jsr166, Sun Nov 18 03:07:22 2012 UTC vs.
Revision 1.12 by jsr166, Sun Jan 6 18:50:00 2013 UTC

# Line 19 | Line 19 | import java.io.ObjectOutputStream;
19   * #longValue}) returns the current total combined across the
20   * variables maintaining the sum.
21   *
22 < * <p> This class is usually preferable to {@link AtomicLong} when
22 > * <p>This class is usually preferable to {@link AtomicLong} when
23   * multiple threads update a common sum that is used for purposes such
24   * as collecting statistics, not for fine-grained synchronization
25   * control.  Under low update contention, the two classes have similar
# Line 28 | Line 28 | import java.io.ObjectOutputStream;
28   * consumption.
29   *
30   * <p>This class extends {@link Number}, but does <em>not</em> define
31 < * methods such as {@code hashCode} and {@code compareTo} because
32 < * instances are expected to be mutated, and so are not useful as
33 < * collection keys.
31 > * methods such as {@code equals}, {@code hashCode} and {@code
32 > * compareTo} because instances are expected to be mutated, and so are
33 > * not useful as collection keys.
34   *
35   * <p><em>jsr166e note: This class is targeted to be placed in
36   * java.util.concurrent.atomic.</em>
# Line 85 | Line 85 | public class LongAdder extends Striped64
85  
86      /**
87       * Returns the current sum.  The returned value is <em>NOT</em> an
88 <     * atomic snapshot: Invocation in the absence of concurrent
88 >     * atomic snapshot: invocation in the absence of concurrent
89       * updates returns an accurate result, but concurrent updates that
90       * occur while the sum is being calculated might not be
91       * incorporated.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines