HomeSort by relevance Sort by last modified time
    Searched defs:compareAndSet (Results 1 - 25 of 66) sorted by null

1 2 3

  /libcore/luni/src/main/java/java/util/concurrent/atomic/
AtomicReference.java 84 public final boolean compareAndSet(V expect, V update) {
94 * only rarely an appropriate alternative to {@code compareAndSet}.
113 if (compareAndSet(x, newValue))
AtomicBoolean.java 69 public final boolean compareAndSet(boolean expect, boolean update) {
81 * only rarely an appropriate alternative to {@code compareAndSet}.
122 if (compareAndSet(current, newValue))
AtomicMarkableReference.java 88 * only rarely an appropriate alternative to {@code compareAndSet}.
100 return compareAndSet(expectedReference, newReference,
116 public boolean compareAndSet(V expectedReference,
AtomicStampedReference.java 88 * only rarely an appropriate alternative to {@code compareAndSet}.
100 return compareAndSet(expectedReference, newReference,
116 public boolean compareAndSet(V expectedReference,
AtomicInteger.java 91 if (compareAndSet(current, newValue))
105 public final boolean compareAndSet(int expect, int update) {
115 * only rarely an appropriate alternative to {@code compareAndSet}.
134 if (compareAndSet(current, next))
148 if (compareAndSet(current, next))
163 if (compareAndSet(current, next))
177 if (compareAndSet(current, next))
191 if (compareAndSet(current, next))
206 if (compareAndSet(current, next))
AtomicIntegerArray.java 137 public final boolean compareAndSet(int i, int expect, int update) {
151 * only rarely an appropriate alternative to {@code compareAndSet}.
159 return compareAndSet(i, expect, update);
AtomicIntegerFieldUpdater.java 21 * <p>Note that the guarantees of the {@code compareAndSet}
26 * {@code compareAndSet} and {@code set} on the same updater.
62 * other calls to {@code compareAndSet} and {@code set}, but not
72 public abstract boolean compareAndSet(T obj, int expect, int update);
78 * other calls to {@code compareAndSet} and {@code set}, but not
83 * only rarely an appropriate alternative to {@code compareAndSet}.
97 * store with respect to subsequent invocations of {@code compareAndSet}.
134 if (compareAndSet(obj, current, newValue))
150 if (compareAndSet(obj, current, next))
166 if (compareAndSet(obj, current, next)
    [all...]
AtomicLong.java 39 * Returns whether underlying JVM supports lockless CompareAndSet
105 if (compareAndSet(current, newValue))
119 public final boolean compareAndSet(long expect, long update) {
129 * only rarely an appropriate alternative to {@code compareAndSet}.
148 if (compareAndSet(current, next))
162 if (compareAndSet(current, next))
177 if (compareAndSet(current, next))
191 if (compareAndSet(current, next))
205 if (compareAndSet(current, next))
220 if (compareAndSet(current, next)
    [all...]
AtomicLongArray.java 136 public final boolean compareAndSet(int i, long expect, long update) {
150 * only rarely an appropriate alternative to {@code compareAndSet}.
158 return compareAndSet(i, expect, update);
AtomicReferenceArray.java 151 public final boolean compareAndSet(int i, E expect, E update) {
165 * only rarely an appropriate alternative to {@code compareAndSet}.
173 return compareAndSet(i, expect, update);
AtomicReferenceFieldUpdater.java 32 * return leftUpdater.compareAndSet(this, expect, update);
37 * <p>Note that the guarantees of the {@code compareAndSet}
42 * {@code compareAndSet} and {@code set} on the same updater.
82 * other calls to {@code compareAndSet} and {@code set}, but not
90 public abstract boolean compareAndSet(T obj, V expect, V update);
96 * other calls to {@code compareAndSet} and {@code set}, but not
101 * only rarely an appropriate alternative to {@code compareAndSet}.
113 * store with respect to subsequent invocations of {@code compareAndSet}.
150 if (compareAndSet(obj, current, newValue))
255 public boolean compareAndSet(T obj, V expect, V update)
    [all...]
AtomicLongFieldUpdater.java 21 * <p>Note that the guarantees of the {@code compareAndSet}
26 * {@code compareAndSet} and {@code set} on the same updater.
65 * other calls to {@code compareAndSet} and {@code set}, but not
75 public abstract boolean compareAndSet(T obj, long expect, long update);
81 * other calls to {@code compareAndSet} and {@code set}, but not
86 * only rarely an appropriate alternative to {@code compareAndSet}.
100 * store with respect to subsequent invocations of {@code compareAndSet}.
137 if (compareAndSet(obj, current, newValue))
153 if (compareAndSet(obj, current, next))
169 if (compareAndSet(obj, current, next)
    [all...]
  /external/guava/guava-gwt/src-super/java/util/super/java/util/concurrent/atomic/
AtomicInteger.java 54 public final boolean compareAndSet(int expect, int update) {
AtomicLong.java 54 public final boolean compareAndSet(long expect, long update) {
  /libcore/jsr166-tests/src/test/java/jsr166/
AtomicStampedReferenceTest.java 64 * compareAndSet succeeds in changing values if equal to expected reference
74 assertTrue(ai.compareAndSet(one, two, 0, 0));
78 assertTrue(ai.compareAndSet(two, m3, 0, 1));
82 assertFalse(ai.compareAndSet(two, m3, 1, 1));
88 * compareAndSet in one thread enables another waiting for reference value
95 while (!ai.compareAndSet(two, three, 0, 0))
100 assertTrue(ai.compareAndSet(one, two, 0, 0));
108 * compareAndSet in one thread enables another waiting for stamp value
115 while (!ai.compareAndSet(one, one, 1, 2))
120 assertTrue(ai.compareAndSet(one, one, 0, 1))
    [all...]
AtomicBooleanTest.java 57 * compareAndSet succeeds in changing value if equal to expected else fails
61 assertTrue(ai.compareAndSet(true, false));
63 assertTrue(ai.compareAndSet(false, false));
65 assertFalse(ai.compareAndSet(true, false));
67 assertTrue(ai.compareAndSet(false, true));
72 * compareAndSet in one thread enables another waiting for value
79 while (!ai.compareAndSet(false, true)) Thread.yield();
83 assertTrue(ai.compareAndSet(true, false));
AtomicIntegerFieldUpdaterTest.java 85 * compareAndSet succeeds in changing value if equal to expected else fails
91 assertTrue(a.compareAndSet(this, 1, 2));
92 assertTrue(a.compareAndSet(this, 2, -4));
94 assertFalse(a.compareAndSet(this, -5, 7));
96 assertTrue(a.compareAndSet(this, -4, 7));
101 * compareAndSet in one thread enables another waiting for value
111 while (!a.compareAndSet(AtomicIntegerFieldUpdaterTest.this, 2, 3))
116 assertTrue(a.compareAndSet(this, 1, 2));
AtomicLongFieldUpdaterTest.java 85 * compareAndSet succeeds in changing value if equal to expected else fails
91 assertTrue(a.compareAndSet(this, 1, 2));
92 assertTrue(a.compareAndSet(this, 2, -4));
94 assertFalse(a.compareAndSet(this, -5, 7));
96 assertTrue(a.compareAndSet(this, -4, 7));
101 * compareAndSet in one thread enables another waiting for value
111 while (!a.compareAndSet(AtomicLongFieldUpdaterTest.this, 2, 3))
116 assertTrue(a.compareAndSet(this, 1, 2));
AtomicMarkableReferenceTest.java 64 * compareAndSet succeeds in changing values if equal to expected reference
74 assertTrue(ai.compareAndSet(one, two, false, false));
78 assertTrue(ai.compareAndSet(two, m3, false, true));
82 assertFalse(ai.compareAndSet(two, m3, true, true));
88 * compareAndSet in one thread enables another waiting for reference value
95 while (!ai.compareAndSet(two, three, false, false))
100 assertTrue(ai.compareAndSet(one, two, false, false));
108 * compareAndSet in one thread enables another waiting for mark value
115 while (!ai.compareAndSet(one, one, true, false))
120 assertTrue(ai.compareAndSet(one, one, false, true))
    [all...]
AtomicReferenceFieldUpdaterTest.java 96 * compareAndSet succeeds in changing value if equal to expected else fails
102 assertTrue(a.compareAndSet(this, one, two));
103 assertTrue(a.compareAndSet(this, two, m4));
105 assertFalse(a.compareAndSet(this, m5, seven));
107 assertTrue(a.compareAndSet(this, m4, seven));
112 * compareAndSet in one thread enables another waiting for value
122 while (!a.compareAndSet(AtomicReferenceFieldUpdaterTest.this, two, three))
127 assertTrue(a.compareAndSet(this, one, two));
AtomicReferenceTest.java 57 * compareAndSet succeeds in changing value if equal to expected else fails
61 assertTrue(ai.compareAndSet(one, two));
62 assertTrue(ai.compareAndSet(two, m4));
64 assertFalse(ai.compareAndSet(m5, seven));
66 assertTrue(ai.compareAndSet(m4, seven));
71 * compareAndSet in one thread enables another waiting for value
78 while (!ai.compareAndSet(two, three))
83 assertTrue(ai.compareAndSet(one, two));
AtomicReferenceArrayTest.java 83 aa.compareAndSet(index, null, null);
124 * compareAndSet succeeds in changing value if equal to expected else fails
130 assertTrue(aa.compareAndSet(i, one, two));
131 assertTrue(aa.compareAndSet(i, two, m4));
133 assertFalse(aa.compareAndSet(i, m5, seven));
135 assertTrue(aa.compareAndSet(i, m4, seven));
141 * compareAndSet in one thread enables another waiting for value
149 while (!a.compareAndSet(0, two, three))
154 assertTrue(a.compareAndSet(0, one, two));
  /external/guava/guava/src/com/google/common/util/concurrent/
AtomicDouble.java 33 * values in methods such as {@link #compareAndSet} by comparing their
133 public final boolean compareAndSet(double expect, double update) {
134 return updater.compareAndSet(this,
148 * appropriate alternative to {@code compareAndSet}.
172 if (updater.compareAndSet(this, current, next)) {
190 if (updater.compareAndSet(this, current, next)) {
AtomicDoubleArray.java 28 * values in methods such as {@link #compareAndSet} by comparing their
145 public final boolean compareAndSet(int i, double expect, double update) {
146 return longs.compareAndSet(i,
161 * appropriate alternative to {@code compareAndSet}.
187 if (longs.compareAndSet(i, current, next)) {
206 if (longs.compareAndSet(i, current, next)) {
  /external/guava/guava-tests/test/com/google/common/util/concurrent/
AtomicDoubleTest.java 97 * compareAndSet succeeds in changing value if equal to expected else fails
105 assertFalse(at.compareAndSet(unused, x));
107 assertTrue(at.compareAndSet(prev, x));
114 * compareAndSet in one thread enables another waiting for value
122 while (!at.compareAndSet(2.0, 3.0)) {
127 assertTrue(at.compareAndSet(1.0, 2.0));
271 * compareAndSet treats +0.0 and -0.0 as distinct values
275 assertFalse(at.compareAndSet(-0.0, 7.0));
278 assertTrue(at.compareAndSet(+0.0, -0.0));
280 assertFalse(at.compareAndSet(+0.0, 7.0))
    [all...]

Completed in 275 milliseconds

1 2 3