Lines Matching defs:ai
31 AtomicStampedReference ai = new AtomicStampedReference(one, 0);
32 assertSame(one, ai.getReference());
33 assertEquals(0, ai.getStamp());
44 AtomicStampedReference ai = new AtomicStampedReference(one, 0);
45 assertSame(one, ai.getReference());
46 assertEquals(0, ai.getStamp());
47 assertSame(one, ai.get(mark));
49 ai.set(two, 0);
50 assertSame(two, ai.getReference());
51 assertEquals(0, ai.getStamp());
52 assertSame(two, ai.get(mark));
54 ai.set(one, 1);
55 assertSame(one, ai.getReference());
56 assertEquals(1, ai.getStamp());
57 assertSame(one, ai.get(mark));
66 AtomicStampedReference ai = new AtomicStampedReference(one, 0);
67 assertEquals(0, ai.getStamp());
68 assertTrue(ai.attemptStamp(one, 1));
69 assertEquals(1, ai.getStamp());
70 assertSame(one, ai.get(mark));
80 AtomicStampedReference ai = new AtomicStampedReference(one, 0);
81 assertSame(one, ai.get(mark));
82 assertEquals(0, ai.getStamp());
85 assertTrue(ai.compareAndSet(one, two, 0, 0));
86 assertSame(two, ai.get(mark));
89 assertTrue(ai.compareAndSet(two, m3, 0, 1));
90 assertSame(m3, ai.get(mark));
93 assertFalse(ai.compareAndSet(two, m3, 1, 1));
94 assertSame(m3, ai.get(mark));
103 final AtomicStampedReference ai = new AtomicStampedReference(one, 0);
106 while (!ai.compareAndSet(two, three, 0, 0))
111 assertTrue(ai.compareAndSet(one, two, 0, 0));
114 assertSame(three, ai.getReference());
115 assertEquals(0, ai.getStamp());
123 final AtomicStampedReference ai = new AtomicStampedReference(one, 0);
126 while (!ai.compareAndSet(one, one, 1, 2))
131 assertTrue(ai.compareAndSet(one, one, 0, 1));
134 assertSame(one, ai.getReference());
135 assertEquals(2, ai.getStamp());
144 AtomicStampedReference ai = new AtomicStampedReference(one, 0);
145 assertSame(one, ai.get(mark));
146 assertEquals(0, ai.getStamp());
149 do {} while (!ai.weakCompareAndSet(one, two, 0, 0));
150 assertSame(two, ai.get(mark));
153 do {} while (!ai.weakCompareAndSet(two, m3, 0, 1));
154 assertSame(m3, ai.get(mark));