/libcore/luni/src/main/java/java/util/concurrent/ |
D | CompletionStage.java | 141 public <U> CompletionStage<U> thenApply(Function<? super T,? extends U> fn); in thenApply() 157 public <U> CompletionStage<U> thenApplyAsync in thenApplyAsync() 158 (Function<? super T,? extends U> fn); in thenApplyAsync() 174 public <U> CompletionStage<U> thenApplyAsync in thenApplyAsync() 175 (Function<? super T,? extends U> fn, in thenApplyAsync() 279 public <U,V> CompletionStage<V> thenCombine in thenCombine() 280 (CompletionStage<? extends U> other, in thenCombine() 281 BiFunction<? super T,? super U,? extends V> fn); in thenCombine() argument 299 public <U,V> CompletionStage<V> thenCombineAsync in thenCombineAsync() 300 (CompletionStage<? extends U> other, in thenCombineAsync() [all …]
|
D | Exchanger.java | 334 Node q = (Node)U.getObjectVolatile(a, j = (i << ASHIFT) + ABASE); in arenaExchange() 335 if (q != null && U.compareAndSwapObject(a, j, q, null)) { in arenaExchange() 340 U.unpark(w); in arenaExchange() 345 if (U.compareAndSwapObject(a, j, null, p)) { in arenaExchange() 351 U.putOrderedObject(p, MATCH, null); in arenaExchange() 364 else if (U.getObjectVolatile(a, j) != p) in arenaExchange() 369 U.putObject(t, BLOCKER, this); // emulate LockSupport in arenaExchange() 371 if (U.getObjectVolatile(a, j) == p) in arenaExchange() 372 U.park(false, ns); in arenaExchange() 374 U.putObject(t, BLOCKER, null); in arenaExchange() [all …]
|
D | CompletableFuture.java | 195 return U.compareAndSwapObject(this, RESULT, null, r); in internalComplete() 199 return U.compareAndSwapObject(this, STACK, cmp, val); in casStack() 206 return U.compareAndSwapObject(this, STACK, h, c); in tryPushStack() 226 return U.compareAndSwapObject(this, RESULT, null, in completeNull() 237 return U.compareAndSwapObject(this, RESULT, null, in completeValue() 252 return U.compareAndSwapObject(this, RESULT, null, in completeThrowable() 280 return U.compareAndSwapObject(this, RESULT, null, in completeThrowable() 310 return U.compareAndSwapObject(this, RESULT, null, in completeRelay() 428 U.putOrderedObject(c, NEXT, next); in lazySetNext() 1011 abstract static class BiCompletion<T,U,V> extends UniCompletion<T,V> { [all …]
|
D | FutureTask.java | 138 U.compareAndSwapInt(this, STATE, NEW, in cancel() 148 U.putOrderedInt(this, STATE, INTERRUPTED); in cancel() 202 if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { in set() 204 U.putOrderedInt(this, STATE, NORMAL); // final state in set() 220 if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) { in setException() 222 U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state in setException() 229 !U.compareAndSwapObject(this, RUNNER, null, Thread.currentThread())) in run() 270 !U.compareAndSwapObject(this, RUNNER, null, Thread.currentThread())) in runAndReset() 337 if (U.compareAndSwapObject(this, WAITERS, q, null)) { in finishCompletion() 399 queued = U.compareAndSwapObject(this, WAITERS, in awaitDone() [all …]
|
D | ForkJoinWorkerThread.java | 66 U.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, acc); in ForkJoinWorkerThread() 148 U.putObject(this, THREADLOCALS, null); in eraseThreadLocals() 149 U.putObject(this, INHERITABLETHREADLOCALS, null); in eraseThreadLocals() 159 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in ForkJoinWorkerThread 165 THREADLOCALS = U.objectFieldOffset 167 INHERITABLETHREADLOCALS = U.objectFieldOffset 169 INHERITEDACCESSCONTROLCONTEXT = U.objectFieldOffset
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | StreamTestScenario.java | 46 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE() 47 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_FOR_EACH_WITH_CLOSE() 48 Stream<U> s = m.apply(data.stream()); in STREAM_FOR_EACH_WITH_CLOSE() 59 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_COLLECT() 60 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_COLLECT() 61 for (U t : m.apply(data.stream()).collect(Collectors.toList())) { in STREAM_COLLECT() 69 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY() 70 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_TO_ARRAY() 72 b.accept((U) t); in STREAM_TO_ARRAY() 79 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR() [all …]
|
D | OpTestCase.java | 97 <T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 98 void run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, S_OUT> m); in run() 101 protected <T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 102 Collection<U> exerciseOps(TestData<T, S_IN> data, Function<S_IN, S_OUT> m) { in exerciseOps() 109 protected final<T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 110 Collection<U> exerciseOpsMulti(TestData<T, S_IN> data, in exerciseOpsMulti() 112 Collection<U> result = null; in exerciseOpsMulti() 117 Collection<U> r2 = withData(data).stream(m).exercise(); in exerciseOpsMulti() 144 protected final<T, U, R, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 185 protected <T, U, S_OUT extends BaseStream<U, S_OUT>> [all …]
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | StreamTestScenario.java | 49 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_FOR_EACH_WITH_CLOSE() 50 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_FOR_EACH_WITH_CLOSE() 51 Stream<U> s = m.apply(data.stream()); in STREAM_FOR_EACH_WITH_CLOSE() 62 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_COLLECT() 63 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_COLLECT() 64 for (U t : m.apply(data.stream()).collect(Collectors.toList())) { in STREAM_COLLECT() 72 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_TO_ARRAY() 73 void _run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, Stream<U>> m) { in STREAM_TO_ARRAY() 75 b.accept((U) t); in STREAM_TO_ARRAY() 82 <T, U, S_IN extends BaseStream<T, S_IN>> in STREAM_ITERATOR() [all …]
|
D | OpTestCase.java | 98 <T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 99 void run(TestData<T, S_IN> data, Consumer<U> b, Function<S_IN, S_OUT> m); in run() 102 protected <T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 103 Collection<U> exerciseOps(TestData<T, S_IN> data, Function<S_IN, S_OUT> m) { in exerciseOps() 110 protected final<T, U, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 111 Collection<U> exerciseOpsMulti(TestData<T, S_IN> data, in exerciseOpsMulti() 113 Collection<U> result = null; in exerciseOpsMulti() 118 Collection<U> r2 = withData(data).stream(m).exercise(); in exerciseOpsMulti() 145 protected final<T, U, R, S_IN extends BaseStream<T, S_IN>, S_OUT extends BaseStream<U, S_OUT>> 186 protected <T, U, S_OUT extends BaseStream<U, S_OUT>> [all …]
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | BiPredicate.java | 43 public interface BiPredicate<T, U> { 53 boolean test(T t, U u); in test() 71 default BiPredicate<T, U> and(BiPredicate<? super T, ? super U> other) { in and() 73 return (T t, U u) -> test(t, u) && other.test(t, u); in and() 83 default BiPredicate<T, U> negate() { in negate() 84 return (T t, U u) -> !test(t, u); in negate() 103 default BiPredicate<T, U> or(BiPredicate<? super T, ? super U> other) { in or() 105 return (T t, U u) -> test(t, u) || other.test(t, u); in or()
|
D | BiConsumer.java | 45 public interface BiConsumer<T, U> { 53 void accept(T t, U u); in accept() 67 default BiConsumer<T, U> andThen(BiConsumer<? super T, ? super U> after) { in andThen()
|
D | BiFunction.java | 44 public interface BiFunction<T, U, R> { 53 R apply(T t, U u); in apply() 68 default <V> BiFunction<T, U, V> andThen(Function<? super R, ? extends V> after) { in andThen() 70 return (T t, U u) -> after.apply(apply(t, u)); in andThen()
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | LockSupport.java | 111 U.putObject(t, PARKBLOCKER, arg); in setBlocker() 127 U.unpark(thread); in unpark() 161 U.park(false, 0L); in park() 201 U.park(false, nanos); in parkNanos() 242 U.park(true, deadline); in parkUntil() 261 return U.getObjectVolatile(t, PARKBLOCKER); in getBlocker() 290 U.park(false, 0L); in park() 324 U.park(false, nanos); in parkNanos() 358 U.park(true, deadline); in parkUntil() 368 if ((r = U.getInt(t, SECONDARY)) != 0) { in nextSecondarySeed() [all …]
|
D | StampedLock.java | 320 U.compareAndSwapLong(this, STATE, s, next = s + WBIT)) ? in writeLock() 333 U.compareAndSwapLong(this, STATE, s, next = s + WBIT)) ? in tryWriteLock() 394 U.compareAndSwapLong(this, STATE, s, next = s + RUNIT)) ? in readLock() 410 if (U.compareAndSwapLong(this, STATE, s, next = s + RUNIT)) in tryReadLock() 438 if (U.compareAndSwapLong(this, STATE, s, next = s + RUNIT)) in tryReadLock() 496 U.loadFence(); in validate() 512 U.putLongVolatile(this, STATE, (stamp += WBIT) == 0L ? ORIGIN : stamp); in unlockWrite() 532 if (U.compareAndSwapLong(this, STATE, s, s - RUNIT)) { in unlockRead() 559 U.putLongVolatile(this, STATE, (s += WBIT) == 0L ? ORIGIN : s); in unlock() 567 if (U.compareAndSwapLong(this, STATE, s, s - RUNIT)) { in unlock() [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
D | AtomicLong.java | 28 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicLong 47 VALUE = U.objectFieldOffset 88 U.putLongVolatile(this, VALUE, newValue); in set() 98 U.putOrderedLong(this, VALUE, newValue); in lazySet() 108 return U.getAndSetLong(this, VALUE, newValue); in getAndSet() 121 return U.compareAndSwapLong(this, VALUE, expect, update); in compareAndSet() 137 return U.compareAndSwapLong(this, VALUE, expect, update); in weakCompareAndSet() 146 return U.getAndAddLong(this, VALUE, 1L); in getAndIncrement() 155 return U.getAndAddLong(this, VALUE, -1L); in getAndDecrement() 165 return U.getAndAddLong(this, VALUE, delta); in getAndAdd() [all …]
|
D | AtomicInteger.java | 28 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicInteger 33 VALUE = U.objectFieldOffset 82 U.putOrderedInt(this, VALUE, newValue); in lazySet() 92 return U.getAndSetInt(this, VALUE, newValue); in getAndSet() 105 return U.compareAndSwapInt(this, VALUE, expect, update); in compareAndSet() 121 return U.compareAndSwapInt(this, VALUE, expect, update); in weakCompareAndSet() 130 return U.getAndAddInt(this, VALUE, 1); in getAndIncrement() 139 return U.getAndAddInt(this, VALUE, -1); in getAndDecrement() 149 return U.getAndAddInt(this, VALUE, delta); in getAndAdd() 158 return U.getAndAddInt(this, VALUE, 1) + 1; in incrementAndGet() [all …]
|
D | AtomicLongFieldUpdater.java | 56 public static <U> AtomicLongFieldUpdater<U> newUpdater(Class<U> tclass, in newUpdater() 60 return new CASUpdater<U>(tclass, fieldName, caller); in newUpdater() 62 return new LockedUpdater<U>(tclass, fieldName, caller); in newUpdater() 341 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicLongFieldUpdater.CASUpdater 384 this.offset = U.objectFieldOffset(field); in CASUpdater() 416 return U.compareAndSwapLong(obj, offset, expect, update); in compareAndSet() 421 return U.compareAndSwapLong(obj, offset, expect, update); in weakCompareAndSet() 426 U.putLongVolatile(obj, offset, newValue); in set() 431 U.putOrderedLong(obj, offset, newValue); in lazySet() 436 return U.getLongVolatile(obj, offset); in get() [all …]
|
D | AtomicBoolean.java | 23 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicBoolean 28 VALUE = U.objectFieldOffset 71 return U.compareAndSwapInt(this, VALUE, in compareAndSet() 89 return U.compareAndSwapInt(this, VALUE, in weakCompareAndSet() 110 U.putOrderedInt(this, VALUE, (newValue ? 1 : 0)); in lazySet()
|
D | Striped64.java | 98 return U.compareAndSwapLong(this, VALUE, cmp, val); in cas() 101 U.putLongVolatile(this, VALUE, 0L); in reset() 104 U.putLongVolatile(this, VALUE, identity); in reset() 108 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in Striped64.Cell 112 VALUE = U.objectFieldOffset 149 return U.compareAndSwapLong(this, BASE, cmp, val); in casBase() 156 return U.compareAndSwapInt(this, CELLSBUSY, 0, 1); in casCellsBusy() 164 return U.getInt(Thread.currentThread(), PROBE); in getProbe() 176 U.putInt(Thread.currentThread(), PROBE, probe); in advanceProbe() 347 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in Striped64 [all …]
|
D | AtomicReferenceFieldUpdater.java | 77 public static <U,W> AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass, in newUpdater() 80 return new AtomicReferenceFieldUpdaterImpl<U,W> in newUpdater() 259 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicReferenceFieldUpdater.AtomicReferenceFieldUpdaterImpl 323 this.offset = U.objectFieldOffset(field); in AtomicReferenceFieldUpdaterImpl() 383 return U.compareAndSwapObject(obj, offset, expect, update); in compareAndSet() 390 return U.compareAndSwapObject(obj, offset, expect, update); in weakCompareAndSet() 396 U.putObjectVolatile(obj, offset, newValue); in set() 402 U.putOrderedObject(obj, offset, newValue); in lazySet() 408 return (V)U.getObjectVolatile(obj, offset); in get() 415 return (V)U.getAndSetObject(obj, offset, newValue); in getAndSet()
|
D | AtomicIntegerArray.java | 23 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicIntegerArray 29 ABASE = U.arrayBaseOffset(int[].class); 30 int scale = U.arrayIndexScale(int[].class); 89 return U.getIntVolatile(array, offset); in getRaw() 99 U.putIntVolatile(array, checkedByteOffset(i), newValue); in set() 110 U.putOrderedInt(array, checkedByteOffset(i), newValue); in lazySet() 122 return U.getAndSetInt(array, checkedByteOffset(i), newValue); in getAndSet() 140 return U.compareAndSwapInt(array, offset, expect, update); in compareAndSetRaw() 188 return U.getAndAddInt(array, checkedByteOffset(i), delta); in getAndAdd()
|
D | AtomicLongArray.java | 22 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicLongArray 28 ABASE = U.arrayBaseOffset(long[].class); 29 int scale = U.arrayIndexScale(long[].class); 88 return U.getLongVolatile(array, offset); in getRaw() 98 U.putLongVolatile(array, checkedByteOffset(i), newValue); in set() 109 U.putOrderedLong(array, checkedByteOffset(i), newValue); in lazySet() 121 return U.getAndSetLong(array, checkedByteOffset(i), newValue); in getAndSet() 139 return U.compareAndSwapLong(array, offset, expect, update); in compareAndSetRaw() 187 return U.getAndAddLong(array, checkedByteOffset(i), delta); in getAndAdd()
|
D | AtomicReferenceArray.java | 26 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicReferenceArray 34 ARRAY = U.objectFieldOffset 36 ABASE = U.arrayBaseOffset(Object[].class); 37 int scale = U.arrayIndexScale(Object[].class); 100 return (E) U.getObjectVolatile(array, offset); in getRaw() 110 U.putObjectVolatile(array, checkedByteOffset(i), newValue); in set() 121 U.putOrderedObject(array, checkedByteOffset(i), newValue); in lazySet() 134 return (E)U.getAndSetObject(array, checkedByteOffset(i), newValue); in getAndSet() 152 return U.compareAndSwapObject(array, offset, expect, update); in compareAndSetRaw() 300 U.putObjectVolatile(this, ARRAY, a); in readObject()
|
D | AtomicIntegerFieldUpdater.java | 56 public static <U> AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass, in newUpdater() 58 return new AtomicIntegerFieldUpdaterImpl<U> in newUpdater() 342 private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); field in AtomicIntegerFieldUpdater.AtomicIntegerFieldUpdaterImpl 391 this.offset = U.objectFieldOffset(field); in AtomicIntegerFieldUpdaterImpl() 441 return U.compareAndSwapInt(obj, offset, expect, update); in compareAndSet() 446 return U.compareAndSwapInt(obj, offset, expect, update); in weakCompareAndSet() 451 U.putIntVolatile(obj, offset, newValue); in set() 456 U.putOrderedInt(obj, offset, newValue); in lazySet() 461 return U.getIntVolatile(obj, offset); in get() 466 return U.getAndSetInt(obj, offset, newValue); in getAndSet() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Comparator.java | 238 default <U> Comparator<T> thenComparing( in thenComparing() 239 Function<? super T, ? extends U> keyExtractor, in thenComparing() 240 Comparator<? super U> keyComparator) in thenComparing() 262 default <U extends Comparable<? super U>> Comparator<T> thenComparing( in thenComparing() 263 Function<? super T, ? extends U> keyExtractor) in thenComparing() 429 public static <T, U> Comparator<T> comparing( in comparing() 430 Function<? super T, ? extends U> keyExtractor, in comparing() 431 Comparator<? super U> keyComparator) in comparing() 464 public static <T, U extends Comparable<? super U>> Comparator<T> comparing( in comparing() 465 Function<? super T, ? extends U> keyExtractor) in comparing()
|