Class AgentConcurrencyUtilHooks
java.util.concurrent coordination primitives.
Why these need the agent
A Semaphore whose permits leak, a CountDownLatch counted down the wrong number
of times, a BlockingQueue whose offer silently returned false: each is a
bug the library has had a detector for throughout, and each detector could only see it if the
test author called a record method by hand. These are not types a test author thinks to
instrument - they are plumbing, used deep inside the class under test.
Why sharing is not the question here
Unlike the shared-instance family, sharing is the whole point of these objects: a latch nobody
shares does nothing. What the detectors report is misuse of the protocol, so the hooks record the
operation and its outcome rather than the instance alone. That is also why the return values
matter: the boolean an offer discards is the entire finding.
Ordering
Acquisition and release follow the rule AgentLockHooks sets - record after acquiring
and before releasing, so the recorded interval is contained by the real one. A call that throws
records nothing, because nothing happened.
The same rule feeds HappensBefore: a release and a countDown release
the primitive before the call, an acquire that took a permit and an await that reached
zero acquire it after, which are the edges the java.util.concurrent memory consistency
effects name. The queue hand-offs reach the model through the ownership events. The
CompletableFuture, Future, ExecutorService and Exchanger hooks
exist for the model alone (#741), and follow the same rule: release before the call, withdraw
a release the call refused, acquire after a call that returned.
- Since:
- 1.10.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ABAProblemDetector.AgentSlotReturns the calling thread'sABAProblemDetectorview ofatomic, ornullwhen no test with that detector runs on this thread.static @Nullable ABAProblemDetector.AgentSlotReturns the calling thread'sABAProblemDetectorview of elementindexofarray, ornullwhen no test with that detector runs on this thread.static @Nullable ABAProblemDetector.AgentSlotReturns the calling thread'sABAProblemDetectorview of the reference fieldselectorreaches insideholder, ornullwhen no test with that detector runs on this thread.static CompletableFuture<Void> acceptEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletableFuture.acceptEither(CompletionStage, Consumer): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> acceptEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletionStage.acceptEither(CompletionStage, Consumer): on aCompletableFuture, asacceptEither(CompletableFuture, CompletionStage, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> acceptEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletableFuture.acceptEitherAsync(CompletionStage, Consumer), asacceptEither(CompletableFuture, CompletionStage, Consumer).static CompletableFuture<Void> acceptEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action, Executor executor) WeavesCompletableFuture.acceptEitherAsync(CompletionStage, Consumer, Executor), asacceptEither(CompletableFuture, CompletionStage, Consumer).static CompletionStage<Void> acceptEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletionStage.acceptEitherAsync(CompletionStage, Consumer): on aCompletableFuture, asacceptEitherAsync(CompletableFuture, CompletionStage, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> acceptEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action, Executor executor) WeavesCompletionStage.acceptEitherAsync(CompletionStage, Consumer, Executor): on aCompletableFuture, asacceptEitherAsync(CompletableFuture, CompletionStage, Consumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static voidWeavesSemaphore.acquire().static voidWeavesSemaphore.acquire(int).static CompletableFuture<Void> allOf(CompletableFuture<?>[] children) WeavesCompletableFuture.allOf: a join on what it returns observes every child (seeAgentHandOffHooks.HandedAll).static CompletableFuture<Object> anyOf(CompletableFuture<?>[] children) WeavesCompletableFuture.anyOf: a join on what it returns observes the children that have completed by then, the one that completed it among them (seeAgentHandOffHooks.HandedAll).static CompletableFuture<Object> applyToEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletableFuture.applyToEither(CompletionStage, Function): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> applyToEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletionStage.applyToEither(CompletionStage, Function): on aCompletableFuture, asapplyToEither(CompletableFuture, CompletionStage, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> applyToEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletableFuture.applyToEitherAsync(CompletionStage, Function), asapplyToEither(CompletableFuture, CompletionStage, Function).static CompletableFuture<Object> applyToEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.applyToEitherAsync(CompletionStage, Function, Executor), asapplyToEither(CompletableFuture, CompletionStage, Function).static CompletionStage<Object> applyToEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletionStage.applyToEitherAsync(CompletionStage, Function): on aCompletableFuture, asapplyToEitherAsync(CompletableFuture, CompletionStage, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> applyToEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function, Executor executor) WeavesCompletionStage.applyToEitherAsync(CompletionStage, Function, Executor): on aCompletableFuture, asapplyToEitherAsync(CompletableFuture, CompletionStage, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static voidarraysParallelSetAll(double[] array, IntToDoubleFunction generator) WeavesArrays.parallelSetAll(double[], IntToDoubleFunction), as theObject[]form.static voidarraysParallelSetAll(int[] array, IntUnaryOperator generator) WeavesArrays.parallelSetAll(int[], IntUnaryOperator), as theObject[]form.static voidarraysParallelSetAll(long[] array, IntToLongFunction generator) WeavesArrays.parallelSetAll(long[], IntToLongFunction), as theObject[]form.static voidarraysParallelSetAll(Object[] array, IntFunction<Object> generator) WeavesArrays.parallelSetAll(Object[], IntFunction): the common pool's workers call the generator, so each call runs as an element of aAgentConcurrencyUtilHooks.ParallelForEach.static intWeavesPhaser.arrive(): a release into the phase it arrives in, as inarriveAndAwaitAdvance(java.util.concurrent.Phaser), with nothing to acquire, since it does not wait (#1265).static intarriveAndAwaitAdvance(Phaser receiver) WeavesPhaser.arriveAndAwaitAdvance()(#1265).static intarriveAndDeregister(Phaser receiver) WeavesPhaser.arriveAndDeregister(): the same release asarrive(java.util.concurrent.Phaser); the party's last arrival still counts toward the phase it arrives in (#1265).static voidasyncResultDiscarded(CompletableFuture<?> future) Stands in for thePOPafter a wovensupplyAsyncorrunAsyncwhose future the caller never kept.static voidatomicIncremented(Object atomic) A woven arithmetic update of one of those atomics, the act half of a check-then-act when this thread read the atomic just before (#1249).static voidatomicRead(Object atomic) A woven read of anAtomicIntegerorAtomicLong(#1157).static voidatomicReferenceStored(Object reference, @Nullable Object stored) A woven store to anAtomicReference(#1174).static voidatomicStored(Object atomic) A woven plain store to one of those atomics (#1157).static voidatomicSwapped(Object atomic) A woven atomic update of one of those atomics, which needs no read before it (#1157).static voidawait(CountDownLatch receiver) WeavesCountDownLatch.await().static booleanawait(CountDownLatch receiver, long timeout, TimeUnit unit) WeavesCountDownLatch.await(long, TimeUnit).static intawait(CyclicBarrier receiver) WeavesCyclicBarrier.await()(#1246).static intawait(CyclicBarrier receiver, long timeout, TimeUnit unit) WeavesCyclicBarrier.await(long, TimeUnit), the same edge asawait(CyclicBarrier).static intawaitAdvance(Phaser receiver, int phase) WeavesPhaser.awaitAdvance(int)(#1265): once the phaser is pastphase, every arrival in it happened, so the caller acquires it.static intawaitAdvanceInterruptibly(Phaser receiver, int phase) WeavesPhaser.awaitAdvanceInterruptibly(int), the same edge asawaitAdvance(Phaser, int)on a normal return.static intawaitAdvanceInterruptibly(Phaser receiver, int phase, long timeout, TimeUnit unit) WeavesPhaser.awaitAdvanceInterruptibly(int, long, TimeUnit), the same edge asawaitAdvance(Phaser, int)on a normal return.static booleanawaitTermination(ExecutorService receiver, long timeout, TimeUnit unit) WeavesExecutorService.awaitTermination(long, TimeUnit)(#1266): atruereturn means every task the pool ran has ended, so the caller is ordered after what each task a woven submit or execute wrapped did; each released into the pool as it ended.static voidcloseExecutor(ExecutorService receiver) WeavesExecutorService.close()(#1266), the end of a try-with-resources block over an executor: it returns once every task has ended, so the caller is ordered after them as afterawaitTermination(java.util.concurrent.ExecutorService, long, java.util.concurrent.TimeUnit).static booleancomplete(CompletableFuture<Object> receiver, @Nullable Object value) WeavesCompletableFuture.complete(Object): the completing thread's accesses are published to whoever observes the completion (#741).static booleancompleteExceptionally(CompletableFuture<Object> receiver, Throwable failure) WeavesCompletableFuture.completeExceptionally(Throwable), a completion likecomplete(java.util.concurrent.CompletableFuture<java.lang.Object>, java.lang.Object): a join that throws with the failure observed it too (#741).static voidconcurrentMapForEach(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, BiConsumer<Object, Object> action) WeavesConcurrentHashMap.forEach(long, BiConsumer): the common pool's workers run the action once the map holds at leastparallelismThresholdmappings, so each runs as an element of aAgentConcurrencyUtilHooks.ParallelForEach.static voidconcurrentMapForEach(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, BiFunction<Object, Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEach(long, BiFunction, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>): the transformer and the action each run as an element.static voidconcurrentMapForEachEntry(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Map.Entry<Object, Object>> action) WeavesConcurrentHashMap.forEachEntry(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static voidconcurrentMapForEachEntry(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Map.Entry<Object, Object>, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachEntry(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static voidconcurrentMapForEachKey(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Object> action) WeavesConcurrentHashMap.forEachKey(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static voidconcurrentMapForEachKey(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachKey(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static voidconcurrentMapForEachValue(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Object> action) WeavesConcurrentHashMap.forEachValue(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static voidconcurrentMapForEachValue(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachValue(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).static CompletableFuture<Object> copy(CompletableFuture<Object> receiver) WeavesCompletableFuture.copy(): the copy completes when the receiver does, so a join on it observes the receiver and the work behind it.static voidcountDown(CountDownLatch receiver) WeavesCountDownLatch.countDown().static booleandoubleStreamAllMatch(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.allMatch: the predicate runs as an element.static booleandoubleStreamAnyMatch(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.anyMatch: the predicate runs as an element.static OptionalDoubledoubleStreamAverage(DoubleStream receiver) WeavesDoubleStream.average(), asdoubleStreamSum(java.util.stream.DoubleStream).doubleStreamBoxed(DoubleStream receiver) WeavesDoubleStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.static ObjectdoubleStreamCollect(DoubleStream receiver, Supplier<Object> supplier, ObjDoubleConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesDoubleStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.static longdoubleStreamCount(DoubleStream receiver) WeavesDoubleStream.count(), asdoubleStreamSum(java.util.stream.DoubleStream).static DoubleStreamdoubleStreamDistinct(DoubleStream receiver) WeavesDoubleStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static DoubleStreamdoubleStreamDropWhile(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.dropWhile: the predicate runs as an element.static DoubleStreamdoubleStreamFilter(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.filter, asintStreamFilter(java.util.stream.IntStream, java.util.function.IntPredicate).static OptionalDoubledoubleStreamFindAny(DoubleStream receiver) WeavesDoubleStream.findAny(), asdoubleStreamSum(java.util.stream.DoubleStream).static OptionalDoubledoubleStreamFindFirst(DoubleStream receiver) WeavesDoubleStream.findFirst(), asdoubleStreamSum(java.util.stream.DoubleStream).static DoubleStreamdoubleStreamFlatMap(DoubleStream receiver, DoubleFunction<DoubleStream> mapper) WeavesDoubleStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.static voiddoubleStreamForEach(DoubleStream receiver, DoubleConsumer action) WeavesDoubleStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).static voiddoubleStreamForEachOrdered(DoubleStream receiver, DoubleConsumer action) WeavesDoubleStream.forEachOrdered, asintStreamForEachOrdered(java.util.stream.IntStream, java.util.function.IntConsumer).static PrimitiveIterator.OfDoubledoubleStreamIterator(DoubleStream receiver) WeavesDoubleStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).static DoubleStreamdoubleStreamLimit(DoubleStream receiver, long maxSize) WeavesDoubleStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static DoubleStreamdoubleStreamMap(DoubleStream receiver, DoubleUnaryOperator mapper) WeavesDoubleStream.map, asintStreamMap(java.util.stream.IntStream, java.util.function.IntUnaryOperator): the operator waits in a slot the terminal operation lends the run to.static DoubleStreamdoubleStreamMapMulti(DoubleStream receiver, DoubleStream.DoubleMapMultiConsumer mapper) static IntStreamdoubleStreamMapToInt(DoubleStream receiver, DoubleToIntFunction mapper) WeavesDoubleStream.mapToInt: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedIntStreamends.static LongStreamdoubleStreamMapToLong(DoubleStream receiver, DoubleToLongFunction mapper) WeavesDoubleStream.mapToLong: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedLongStreamends.doubleStreamMapToObj(DoubleStream receiver, DoubleFunction<Object> mapper) WeavesDoubleStream.mapToObj, asintStreamMapToObj(java.util.stream.IntStream, java.util.function.IntFunction<java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.static OptionalDoubledoubleStreamMax(DoubleStream receiver) WeavesDoubleStream.max(), asdoubleStreamSum(java.util.stream.DoubleStream).static OptionalDoubledoubleStreamMin(DoubleStream receiver) WeavesDoubleStream.min(), asdoubleStreamSum(java.util.stream.DoubleStream).static booleandoubleStreamNoneMatch(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.noneMatch: the predicate runs as an element.static BaseStream<?, ?> doubleStreamOnClose(DoubleStream receiver, Runnable closeHandler) WeavesDoubleStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).static DoubleStreamdoubleStreamParallel(DoubleStream receiver) WeavesDoubleStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static DoubleStreamdoubleStreamPeek(DoubleStream receiver, DoubleConsumer action) WeavesDoubleStream.peek, asintStreamPeek(java.util.stream.IntStream, java.util.function.IntConsumer).static doubledoubleStreamReduce(DoubleStream receiver, double identity, DoubleBinaryOperator operator) WeavesDoubleStream.reduce(double, DoubleBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).static OptionalDoubledoubleStreamReduce(DoubleStream receiver, DoubleBinaryOperator operator) WeavesDoubleStream.reduce(DoubleBinaryOperator), as the reduce with an identity.static DoubleStreamdoubleStreamSequential(DoubleStream receiver) WeavesDoubleStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static DoubleStreamdoubleStreamSkip(DoubleStream receiver, long n) WeavesDoubleStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static DoubleStreamdoubleStreamSorted(DoubleStream receiver) WeavesDoubleStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static doubledoubleStreamSum(DoubleStream receiver) WeavesDoubleStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.static DoubleSummaryStatisticsdoubleStreamSummaryStatistics(DoubleStream receiver) WeavesDoubleStream.summaryStatistics(), asdoubleStreamSum(java.util.stream.DoubleStream).static DoubleStreamdoubleStreamTakeWhile(DoubleStream receiver, DoublePredicate predicate) WeavesDoubleStream.takeWhile: the predicate runs as an element.static double[]doubleStreamToArray(DoubleStream receiver) WeavesDoubleStream.toArray(), asdoubleStreamSum(java.util.stream.DoubleStream).static BaseStream<?, ?> doubleStreamUnordered(DoubleStream receiver) WeavesDoubleStream.unordered, asintStreamUnordered(java.util.stream.IntStream).static intdrainTo(BlockingQueue<Object> receiver, Collection<Object> target) WeavesBlockingQueue.drainTo(Collection).static intdrainTo(BlockingQueue<Object> receiver, Collection<Object> target, int maxElements) WeavesBlockingQueue.drainTo(Collection, int), reported likedrainTo(BlockingQueue, Collection).static CompletableFuture<Object> exceptionally(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionally(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> exceptionally(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionally(Function): on aCompletableFuture, asexceptionally(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> exceptionallyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyAsync(Function), asexceptionally(CompletableFuture, Function).static CompletableFuture<Object> exceptionallyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.exceptionallyAsync(Function, Executor), asexceptionally(CompletableFuture, Function).static CompletionStage<Object> exceptionallyAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyAsync(Function): on aCompletableFuture, asexceptionallyAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> exceptionallyAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.exceptionallyAsync(Function, Executor): on aCompletableFuture, asexceptionallyAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> exceptionallyCompose(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyCompose(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> exceptionallyCompose(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyCompose(Function): on aCompletableFuture, asexceptionallyCompose(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> exceptionallyComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyComposeAsync(Function), asexceptionallyCompose(CompletableFuture, Function).static CompletableFuture<Object> exceptionallyComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.exceptionallyComposeAsync(Function, Executor), asexceptionallyCompose(CompletableFuture, Function).static CompletionStage<Object> exceptionallyComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyComposeAsync(Function): on aCompletableFuture, asexceptionallyComposeAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> exceptionallyComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.exceptionallyComposeAsync(Function, Executor): on aCompletableFuture, asexceptionallyComposeAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static @Nullable ObjectWeavesExchanger.exchange(Object): this thread's accesses are published through the object it hands over, and it receives what its partner published through the one it got back (#741).static @Nullable ObjectWeavesExchanger.exchange(Object, long, TimeUnit), asexchange(Exchanger, Object); one that timed out handed nothing over.static voidWeavesExecutor.execute(Runnable)(#741, #834): on an executor that never hands the task back, the task runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call, and the thread running it is attributed to the run while it does.static voidfutureTaskRun(FutureTask<Object> receiver) WeavesFutureTask.run()called by the code under test, the Memoizer idiom, where no executor wraps the task: when the run ends, what the callable did is released to the task, and a woven get that observed the completion acquires it (#1307).static @Nullable ObjectWeavesFuture.get(): a get that returned, or threw the task's exception, observed the completion and is ordered after it (#741).static @Nullable ObjectWeavesFuture.get(long, TimeUnit), asget(Future); a get that timed out observed nothing.static CompletableFuture<Object> handle(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.handle(BiFunction): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> handle(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletionStage.handle(BiFunction): on aCompletableFuture, ashandle(CompletableFuture, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> handleAsync(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.handleAsync(BiFunction), ashandle(CompletableFuture, BiFunction).static CompletableFuture<Object> handleAsync(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletableFuture.handleAsync(BiFunction, Executor), ashandle(CompletableFuture, BiFunction).static CompletionStage<Object> handleAsync(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletionStage.handleAsync(BiFunction): on aCompletableFuture, ashandleAsync(CompletableFuture, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> handleAsync(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletionStage.handleAsync(BiFunction, Executor): on aCompletableFuture, ashandleAsync(CompletableFuture, BiFunction, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static booleanintStreamAllMatch(IntStream receiver, IntPredicate predicate) WeavesIntStream.allMatch: the predicate runs as an element.static booleanintStreamAnyMatch(IntStream receiver, IntPredicate predicate) WeavesIntStream.anyMatch: the predicate runs as an element.static DoubleStreamintStreamAsDoubleStream(IntStream receiver) WeavesIntStream.asDoubleStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamintStreamAsLongStream(IntStream receiver) WeavesIntStream.asLongStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static OptionalDoubleintStreamAverage(IntStream receiver) WeavesIntStream.average(), asintStreamSum(java.util.stream.IntStream).intStreamBoxed(IntStream receiver) WeavesIntStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.static ObjectintStreamCollect(IntStream receiver, Supplier<Object> supplier, ObjIntConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesIntStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.static longintStreamCount(IntStream receiver) WeavesIntStream.count(), asintStreamSum(java.util.stream.IntStream).static IntStreamintStreamDistinct(IntStream receiver) WeavesIntStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static IntStreamintStreamDropWhile(IntStream receiver, IntPredicate predicate) WeavesIntStream.dropWhile: the predicate runs as an element.static IntStreamintStreamFilter(IntStream receiver, IntPredicate predicate) WeavesIntStream.filter, asstreamFilter(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).static OptionalIntintStreamFindAny(IntStream receiver) WeavesIntStream.findAny(), asintStreamSum(java.util.stream.IntStream).static OptionalIntintStreamFindFirst(IntStream receiver) WeavesIntStream.findFirst(), asintStreamSum(java.util.stream.IntStream).static IntStreamintStreamFlatMap(IntStream receiver, IntFunction<IntStream> mapper) WeavesIntStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.static voidintStreamForEach(IntStream receiver, IntConsumer action) WeavesIntStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).static voidintStreamForEachOrdered(IntStream receiver, IntConsumer action) WeavesIntStream.forEachOrdered, asstreamForEachOrdered(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).static PrimitiveIterator.OfIntintStreamIterator(IntStream receiver) WeavesIntStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).static IntStreamintStreamLimit(IntStream receiver, long maxSize) WeavesIntStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static IntStreamintStreamMap(IntStream receiver, IntUnaryOperator mapper) WeavesIntStream.map, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>): the operator waits in a slot the terminal operation lends the run to.static IntStreamintStreamMapMulti(IntStream receiver, IntStream.IntMapMultiConsumer mapper) static DoubleStreamintStreamMapToDouble(IntStream receiver, IntToDoubleFunction mapper) WeavesIntStream.mapToDouble: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedDoubleStreamends.static LongStreamintStreamMapToLong(IntStream receiver, IntToLongFunction mapper) WeavesIntStream.mapToLong: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedLongStreamends.intStreamMapToObj(IntStream receiver, IntFunction<Object> mapper) WeavesIntStream.mapToObj, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.static OptionalIntintStreamMax(IntStream receiver) WeavesIntStream.max(), asintStreamSum(java.util.stream.IntStream).static OptionalIntintStreamMin(IntStream receiver) WeavesIntStream.min(), asintStreamSum(java.util.stream.IntStream).static booleanintStreamNoneMatch(IntStream receiver, IntPredicate predicate) WeavesIntStream.noneMatch: the predicate runs as an element.static BaseStream<?, ?> intStreamOnClose(IntStream receiver, Runnable closeHandler) WeavesIntStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).static IntStreamintStreamParallel(IntStream receiver) WeavesIntStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static IntStreamintStreamPeek(IntStream receiver, IntConsumer action) WeavesIntStream.peek, asstreamPeek(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).static intintStreamReduce(IntStream receiver, int identity, IntBinaryOperator operator) WeavesIntStream.reduce(int, IntBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).static OptionalIntintStreamReduce(IntStream receiver, IntBinaryOperator operator) WeavesIntStream.reduce(IntBinaryOperator), as the reduce with an identity.static IntStreamintStreamSequential(IntStream receiver) WeavesIntStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static IntStreamintStreamSkip(IntStream receiver, long n) WeavesIntStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static IntStreamintStreamSorted(IntStream receiver) WeavesIntStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static intintStreamSum(IntStream receiver) WeavesIntStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.static IntSummaryStatisticsintStreamSummaryStatistics(IntStream receiver) WeavesIntStream.summaryStatistics(), asintStreamSum(java.util.stream.IntStream).static IntStreamintStreamTakeWhile(IntStream receiver, IntPredicate predicate) WeavesIntStream.takeWhile: the predicate runs as an element.static int[]intStreamToArray(IntStream receiver) WeavesIntStream.toArray(), asintStreamSum(java.util.stream.IntStream).static BaseStream<?, ?> intStreamUnordered(IntStream receiver) WeavesIntStream.unordered, whichIntStreaminherits fromBaseStream: it runs no lambda of its own and carries the woven stages behind it (#1172).invokeAll(ExecutorService receiver, Collection<? extends Callable<Object>> tasks) WeavesExecutorService.invokeAll(Collection).invokeAll(ExecutorService receiver, Collection<? extends Callable<Object>> tasks, long timeout, TimeUnit unit) WeavesExecutorService.invokeAll(Collection, long, TimeUnit), asinvokeAll(ExecutorService, Collection).static @Nullable ObjectinvokeAny(ExecutorService receiver, Collection<? extends Callable<Object>> tasks) WeavesExecutorService.invokeAny(Collection), asinvokeAll(ExecutorService, Collection).static @Nullable ObjectinvokeAny(ExecutorService receiver, Collection<? extends Callable<Object>> tasks, long timeout, TimeUnit unit) WeavesExecutorService.invokeAny(Collection, long, TimeUnit), asinvokeAll(ExecutorService, Collection).static booleanWeavesFuture.isDone(): atrueanswer read the completion, the read a get would have made, so the caller is ordered after the task as after a returned get.static @Nullable Objectjoin(CompletableFuture<Object> receiver) WeavesCompletableFuture.join(): a join that returned, or threw the exception the future completed with, observed the completion and is ordered after it (#741).static ObjectkotlinMutexLock(Object mutex, Object owner, Object continuation) Weaveskotlinx.coroutines.sync.Mutex.lock(owner, continuation), the callmutex.withLock(owner) { }andmutex.lock(owner)compile to (#1007).static ObjectkotlinMutexLockDefault(Object mutex, Object owner, Object continuation, int mask, Object marker) WeavesMutex.lock$default, the call a baremutex.lock()compiles to, askotlinMutexLock(java.lang.Object, java.lang.Object, java.lang.Object).static booleankotlinMutexTryLock(Object mutex, Object owner) WeavesMutex.tryLock(owner)for an agent older thankotlinMutexTryLockIn(java.lang.Object, java.lang.Object, java.lang.Object), which passes no continuation: a schedule point, and the call is made unchanged.static booleankotlinMutexTryLockDefault(Object mutex, Object owner, int mask, Object marker) WeavesMutex.tryLock$default, askotlinMutexTryLock(java.lang.Object, java.lang.Object).static booleankotlinMutexTryLockDefaultIn(Object mutex, Object owner, int mask, Object marker, @Nullable Object continuation) WeavesMutex.tryLock$default, the call a baremutex.tryLock()compiles to, askotlinMutexTryLockIn(java.lang.Object, java.lang.Object, java.lang.Object).static booleankotlinMutexTryLockIn(Object mutex, Object owner, @Nullable Object continuation) WeavesMutex.tryLock(owner)where the agent could name the calling coroutine (#1220):continuationis the one of the suspend function or lambda the call is made in, which the agent passes becausetryLockitself takes none, ornullwhere it found none.static voidkotlinMutexUnlock(Object mutex, Object owner) WeavesMutex.unlock(owner), a schedule point; the unlock is made unchanged.static voidkotlinMutexUnlockDefault(Object mutex, Object owner, int mask, Object marker) WeavesMutex.unlock$default, askotlinMutexUnlock(java.lang.Object, java.lang.Object).static voidkotlinSelectInvokeIn(Object builder, Object clause, Object block, @Nullable Object continuation) WeavesSelectBuilder.invoke(clause, block), the registration an inlinedselect { mutex.onLock { } }compiles to (#1220).static voidkotlinSelectInvokeOwnerIn(Object builder, Object clause, Object owner, Object block, @Nullable Object continuation) WeavesSelectBuilder.invoke(clause, owner, block), the registration an inlinedselect { mutex.onLock(owner) { } }compiles to, askotlinSelectInvokeIn(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object); an owner the caller passed is kept, and the mutex is asked about that one (#1220).static booleanlongStreamAllMatch(LongStream receiver, LongPredicate predicate) WeavesLongStream.allMatch: the predicate runs as an element.static booleanlongStreamAnyMatch(LongStream receiver, LongPredicate predicate) WeavesLongStream.anyMatch: the predicate runs as an element.static DoubleStreamlongStreamAsDoubleStream(LongStream receiver) WeavesLongStream.asDoubleStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static OptionalDoublelongStreamAverage(LongStream receiver) WeavesLongStream.average(), aslongStreamSum(java.util.stream.LongStream).longStreamBoxed(LongStream receiver) WeavesLongStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.static ObjectlongStreamCollect(LongStream receiver, Supplier<Object> supplier, ObjLongConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesLongStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.static longlongStreamCount(LongStream receiver) WeavesLongStream.count(), aslongStreamSum(java.util.stream.LongStream).static LongStreamlongStreamDistinct(LongStream receiver) WeavesLongStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamlongStreamDropWhile(LongStream receiver, LongPredicate predicate) WeavesLongStream.dropWhile: the predicate runs as an element.static LongStreamlongStreamFilter(LongStream receiver, LongPredicate predicate) WeavesLongStream.filter, asintStreamFilter(java.util.stream.IntStream, java.util.function.IntPredicate).static OptionalLonglongStreamFindAny(LongStream receiver) WeavesLongStream.findAny(), aslongStreamSum(java.util.stream.LongStream).static OptionalLonglongStreamFindFirst(LongStream receiver) WeavesLongStream.findFirst(), aslongStreamSum(java.util.stream.LongStream).static LongStreamlongStreamFlatMap(LongStream receiver, LongFunction<LongStream> mapper) WeavesLongStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.static voidlongStreamForEach(LongStream receiver, LongConsumer action) WeavesLongStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).static voidlongStreamForEachOrdered(LongStream receiver, LongConsumer action) WeavesLongStream.forEachOrdered, asintStreamForEachOrdered(java.util.stream.IntStream, java.util.function.IntConsumer).static PrimitiveIterator.OfLonglongStreamIterator(LongStream receiver) WeavesLongStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).static LongStreamlongStreamLimit(LongStream receiver, long maxSize) WeavesLongStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamlongStreamMap(LongStream receiver, LongUnaryOperator mapper) WeavesLongStream.map, asintStreamMap(java.util.stream.IntStream, java.util.function.IntUnaryOperator): the operator waits in a slot the terminal operation lends the run to.static LongStreamlongStreamMapMulti(LongStream receiver, LongStream.LongMapMultiConsumer mapper) static DoubleStreamlongStreamMapToDouble(LongStream receiver, LongToDoubleFunction mapper) WeavesLongStream.mapToDouble: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedDoubleStreamends.static IntStreamlongStreamMapToInt(LongStream receiver, LongToIntFunction mapper) WeavesLongStream.mapToInt: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedIntStreamends.longStreamMapToObj(LongStream receiver, LongFunction<Object> mapper) WeavesLongStream.mapToObj, asintStreamMapToObj(java.util.stream.IntStream, java.util.function.IntFunction<java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.static OptionalLonglongStreamMax(LongStream receiver) WeavesLongStream.max(), aslongStreamSum(java.util.stream.LongStream).static OptionalLonglongStreamMin(LongStream receiver) WeavesLongStream.min(), aslongStreamSum(java.util.stream.LongStream).static booleanlongStreamNoneMatch(LongStream receiver, LongPredicate predicate) WeavesLongStream.noneMatch: the predicate runs as an element.static BaseStream<?, ?> longStreamOnClose(LongStream receiver, Runnable closeHandler) WeavesLongStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).static LongStreamlongStreamParallel(LongStream receiver) WeavesLongStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamlongStreamPeek(LongStream receiver, LongConsumer action) WeavesLongStream.peek, asintStreamPeek(java.util.stream.IntStream, java.util.function.IntConsumer).static longlongStreamReduce(LongStream receiver, long identity, LongBinaryOperator operator) WeavesLongStream.reduce(long, LongBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).static OptionalLonglongStreamReduce(LongStream receiver, LongBinaryOperator operator) WeavesLongStream.reduce(LongBinaryOperator), as the reduce with an identity.static LongStreamlongStreamSequential(LongStream receiver) WeavesLongStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamlongStreamSkip(LongStream receiver, long n) WeavesLongStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static LongStreamlongStreamSorted(LongStream receiver) WeavesLongStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static longlongStreamSum(LongStream receiver) WeavesLongStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.static LongSummaryStatisticslongStreamSummaryStatistics(LongStream receiver) WeavesLongStream.summaryStatistics(), aslongStreamSum(java.util.stream.LongStream).static LongStreamlongStreamTakeWhile(LongStream receiver, LongPredicate predicate) WeavesLongStream.takeWhile: the predicate runs as an element.static long[]longStreamToArray(LongStream receiver) WeavesLongStream.toArray(), aslongStreamSum(java.util.stream.LongStream).static BaseStream<?, ?> longStreamUnordered(LongStream receiver) WeavesLongStream.unordered, asintStreamUnordered(java.util.stream.IntStream).static ExecutorServiceWeavesExecutors.newCachedThreadPool(), asnewFixedThreadPool(int).static ExecutorServicenewCachedThreadPool(ThreadFactory factory) WeavesExecutors.newCachedThreadPool(ThreadFactory), asnewFixedThreadPool(int).static ExecutorServicenewFixedThreadPool(int threads) WeavesExecutors.newFixedThreadPool(int): the pool is declared as the run's own.static ExecutorServicenewFixedThreadPool(int threads, ThreadFactory factory) WeavesExecutors.newFixedThreadPool(int, ThreadFactory), asnewFixedThreadPool(int).static ScheduledExecutorServicenewScheduledThreadPool(int coreThreads) WeavesExecutors.newScheduledThreadPool(int), asnewFixedThreadPool(int).static ScheduledExecutorServicenewScheduledThreadPool(int coreThreads, ThreadFactory factory) WeavesExecutors.newScheduledThreadPool(int, ThreadFactory), asnewFixedThreadPool(int).static ExecutorServiceWeavesExecutors.newSingleThreadExecutor(), asnewFixedThreadPool(int).static ExecutorServicenewSingleThreadExecutor(ThreadFactory factory) WeavesExecutors.newSingleThreadExecutor(ThreadFactory), asnewFixedThreadPool(int).static ScheduledExecutorServiceWeavesExecutors.newSingleThreadScheduledExecutor(), asnewFixedThreadPool(int).static ScheduledExecutorServiceWeavesExecutors.newSingleThreadScheduledExecutor(ThreadFactory), asnewFixedThreadPool(int).static ExecutorServicenewThreadPerTaskExecutor(ThreadFactory factory) WeavesExecutors.newThreadPerTaskExecutor(ThreadFactory), asnewFixedThreadPool(int).static ExecutorServiceWeavesExecutors.newVirtualThreadPerTaskExecutor(), asnewFixedThreadPool(int).static ExecutorServiceWeavesExecutors.newWorkStealingPool(), asnewFixedThreadPool(int).static ExecutorServicenewWorkStealingPool(int parallelism) WeavesExecutors.newWorkStealingPool(int), asnewFixedThreadPool(int).static voidobtrudeException(CompletableFuture<Object> receiver, Throwable failure) WeavesCompletableFuture.obtrudeException(Throwable), which completes the future exceptionally whatever it held (#741).static voidobtrudeValue(CompletableFuture<Object> receiver, @Nullable Object value) WeavesCompletableFuture.obtrudeValue(Object), which completes the future whatever it held (#741).static booleanoffer(BlockingQueue<Object> receiver, Object element) WeavesBlockingQueue.offer(Object).static booleanoffer(BlockingQueue<Object> receiver, Object element, long timeout, TimeUnit unit) WeavesBlockingQueue.offer(Object, long, TimeUnit), the timed form.static voidofferResultDiscarded(boolean added) Weaves thePOPthat follows aBlockingQueue.offerwhose result the caller never read.static intpipedRead(PipedInputStream receiver) WeavesPipedInputStream.read(): the read is recorded against the pipe (#994).static intpipedRead(PipedInputStream receiver, byte[] b) WeavesPipedInputStream.read(byte[]), aspipedRead(java.io.PipedInputStream).static intpipedRead(PipedInputStream receiver, byte[] b, int off, int len) WeavesPipedInputStream.read(byte[], int, int), aspipedRead(java.io.PipedInputStream).static voidpipedWrite(PipedOutputStream receiver, byte[] b) WeavesPipedOutputStream.write(byte[]), aspipedWrite(java.io.PipedOutputStream, int).static voidpipedWrite(PipedOutputStream receiver, byte[] b, int off, int len) WeavesPipedOutputStream.write(byte[], int, int), aspipedWrite(java.io.PipedOutputStream, int).static voidpipedWrite(PipedOutputStream receiver, int b) WeavesPipedOutputStream.write(int): the write is recorded against the pipe's reading end, so one thread on both ends of a pair is reported (#994).static Objectpoll(BlockingQueue<Object> receiver) WeavesBlockingQueue.poll().static Objectpoll(BlockingQueue<Object> receiver, long timeout, TimeUnit unit) WeavesBlockingQueue.poll(long, TimeUnit), the timed form.static BlockingQueue<Runnable> poolQueue(ThreadPoolExecutor pool) WeavesThreadPoolExecutor.getQueue()(#1173): where the pool queues wrappers around the tasksexecute(java.util.concurrent.Executor, java.lang.Runnable)was given, woven code reads the queue through a view that holds the caller's own tasks, removes them by those tasks, and tells the schedule a task taken out of it will never run.static RunnableReturns the task the caller gave, wheretaskis the wrapperexecute(java.util.concurrent.Executor, java.lang.Runnable)queued around it, ortaskitself.static voidpoolTaskOverrideWoven(String className) Records that the agent rewroteclassName'sbeforeExecute,afterExecuteorrejectedExecutionwithpoolTask(java.lang.Runnable)(#1173), soexecute(java.util.concurrent.Executor, java.lang.Runnable)may wrap a task for a pool that overrides them or uses that handler.static ProcessprocessBuilderStart(ProcessBuilder receiver) WeavesProcessBuilder.start(): the child is started, then recorded onPROCESS_STREAM_STARVATIONwith its builder, which alone tells a stderr merged into stdout from a pipe on Linux.processBuilderStartPipeline(List<ProcessBuilder> builders) WeavesProcessBuilder.startPipeline(List), asprocessBuilderStart(java.lang.ProcessBuilder)for each builder and the child it started.static BufferedReaderprocessErrorReader(Process receiver) WeavesProcess.errorReader(), asprocessErrorStream(java.lang.Process).static BufferedReaderprocessErrorReader(Process receiver, Charset charset) WeavesProcess.errorReader(Charset), asprocessErrorStream(java.lang.Process).static InputStreamprocessErrorStream(Process receiver) WeavesProcess.getErrorStream(), asprocessInputStream(java.lang.Process)for stderr.static BufferedReaderprocessInputReader(Process receiver) WeavesProcess.inputReader(), asprocessInputStream(java.lang.Process).static BufferedReaderprocessInputReader(Process receiver, Charset charset) WeavesProcess.inputReader(Charset), asprocessInputStream(java.lang.Process).static InputStreamprocessInputStream(Process receiver) WeavesProcess.getInputStream(): withPROCESS_STREAM_STARVATIONon, the caller gets the child's stdout pipe in a stream that notes who reads it and whether it reached its end, so a pipe taken before a wait but read only after it is told from one read first (#998).static intprocessWaitFor(Process receiver) WeavesProcess.waitFor(): the wait is recorded onPROCESS_STREAM_STARVATIONwith the output pipes no thread had taken yet, then made.static booleanprocessWaitFor(Process receiver, long timeout, TimeUnit unit) WeavesProcess.waitFor(long, TimeUnit), asprocessWaitFor(Process): a wait with a timeout still waits on a child that cannot finish.static booleanprocessWaitFor(Process receiver, Duration duration) WeavesProcess.waitFor(Duration), asprocessWaitFor(Process).static voidput(BlockingQueue<Object> receiver, Object element) WeavesBlockingQueue.put(Object).static voidWeavesSemaphore.release().static voidWeavesSemaphore.release(int).static booleanremoveFromPool(ThreadPoolExecutor pool, Runnable task) WeavesThreadPoolExecutor.remove(Runnable): the caller names the task it gave toexecute(java.util.concurrent.Executor, java.lang.Runnable), and the queue holds the wrapper around it (#1155).static CompletableFuture<Void> runAfterBoth(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterBoth(CompletionStage, Runnable): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> runAfterBoth(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterBoth(CompletionStage, Runnable): on aCompletableFuture, asrunAfterBoth(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> runAfterBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterBothAsync(CompletionStage, Runnable), asrunAfterBoth(CompletableFuture, CompletionStage, Runnable).static CompletableFuture<Void> runAfterBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletableFuture.runAfterBothAsync(CompletionStage, Runnable, Executor), asrunAfterBoth(CompletableFuture, CompletionStage, Runnable).static CompletionStage<Void> runAfterBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterBothAsync(CompletionStage, Runnable): on aCompletableFuture, asrunAfterBothAsync(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> runAfterBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletionStage.runAfterBothAsync(CompletionStage, Runnable, Executor): on aCompletableFuture, asrunAfterBothAsync(CompletableFuture, CompletionStage, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> runAfterEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterEither(CompletionStage, Runnable): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> runAfterEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterEither(CompletionStage, Runnable): on aCompletableFuture, asrunAfterEither(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> runAfterEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterEitherAsync(CompletionStage, Runnable), asrunAfterEither(CompletableFuture, CompletionStage, Runnable).static CompletableFuture<Void> runAfterEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletableFuture.runAfterEitherAsync(CompletionStage, Runnable, Executor), asrunAfterEither(CompletableFuture, CompletionStage, Runnable).static CompletionStage<Void> runAfterEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterEitherAsync(CompletionStage, Runnable): on aCompletableFuture, asrunAfterEitherAsync(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> runAfterEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletionStage.runAfterEitherAsync(CompletionStage, Runnable, Executor): on aCompletableFuture, asrunAfterEitherAsync(CompletableFuture, CompletionStage, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> WeavesCompletableFuture.runAsync(Runnable), assupplyAsync(Supplier).static CompletableFuture<Void> WeavesCompletableFuture.runAsync(Runnable, Executor), assupplyAsync(Supplier).static voidInserted by the agent'sRunBlockingWeaverbefore each call of a KotlinrunBlocking(#1007).static ScheduledFuture<?> schedule(ScheduledExecutorService receiver, Runnable task, long delay, TimeUnit unit) Weaves the one-shotScheduledExecutorService.schedule(Runnable, long, TimeUnit): the task is scheduled unchanged.static ScheduledFuture<Object> schedule(ScheduledExecutorService receiver, Callable<Object> task, long delay, TimeUnit unit) Weaves the one-shotScheduledExecutorService.schedule(Callable, long, TimeUnit), asschedule(ScheduledExecutorService, Runnable, long, TimeUnit)(#1281).static ScheduledFuture<?> scheduleAtFixedRate(ScheduledExecutorService receiver, Runnable task, long initialDelay, long period, TimeUnit unit) WeavesScheduledExecutorService.scheduleAtFixedRate: the task is scheduled as it was, and its future is handed to the ignored-future detector, which reports it at analysis if the task threw, since the executor then cancels every later run and nobody reads a periodic task's future (#1254).static voidscheduleResultDiscarded(ScheduledFuture<?> future) Stands in for thePOPafter a woven one-shotschedule: the caller discarded the future, so nothing can ever read the task's exception, and the ignored-future detector reports it at analysis if the task threw, as forsubmitResultDiscarded(java.util.concurrent.Future<?>)(#1281).static ScheduledFuture<?> scheduleWithFixedDelay(ScheduledExecutorService receiver, Runnable task, long initialDelay, long delay, TimeUnit unit) WeavesScheduledExecutorService.scheduleWithFixedDelay, asscheduleAtFixedRate(java.util.concurrent.ScheduledExecutorService, java.lang.Runnable, long, long, java.util.concurrent.TimeUnit).shutdownNow(ExecutorService receiver) WeavesExecutorService.shutdownNow(): what comes back is the tasksexecute(java.util.concurrent.Executor, java.lang.Runnable)was given, not the wrappers it queued (#1155), so code that re-queues or inspects them sees its own.static booleanstreamAllMatch(Stream<Object> receiver, Predicate<Object> predicate) WeavesStream.allMatch, asstreamAnyMatch(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).static booleanstreamAnyMatch(Stream<Object> receiver, Predicate<Object> predicate) WeavesStream.anyMatch: the predicate runs as an element.static ObjectstreamCollect(Stream<Object> receiver, Supplier<Object> supplier, BiConsumer<Object, Object> accumulator, BiConsumer<Object, Object> combiner) WeavesStream.collect(Supplier, BiConsumer, BiConsumer): supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.static ObjectstreamCollect(Stream<Object> receiver, Collector<? super Object, ?, ?> collector) WeavesStream.collect(Collector): the pipeline's woven stages run as its elements.static longstreamCount(Stream<Object> receiver) WeavesStream.count(), asstreamToList(java.util.stream.Stream<java.lang.Object>).streamDistinct(Stream<Object> receiver) WeavesStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.streamDropWhile(Stream<Object> receiver, Predicate<Object> predicate) WeavesStream.dropWhile: the predicate runs as an element.streamFilter(Stream<Object> receiver, Predicate<Object> predicate) streamFindAny(Stream<Object> receiver) WeavesStream.findAny(), asstreamToList(java.util.stream.Stream<java.lang.Object>).streamFindFirst(Stream<Object> receiver) WeavesStream.findFirst(), asstreamToList(java.util.stream.Stream<java.lang.Object>).WeavesStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.static voidstreamForEach(Stream<Object> receiver, Consumer<Object> action) WeavesStream.forEach: seeAgentConcurrencyUtilHooks.ParallelForEach.static voidstreamForEachOrdered(Stream<Object> receiver, Consumer<Object> action) WeavesStream.forEachOrdered, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>), with each action ordered after the one before it (AgentConcurrencyUtilHooks.ParallelForEach.ordered(java.lang.Runnable)).streamIterator(Stream<Object> receiver) WeavesStream.iterator(): seeAgentConcurrencyUtilHooks.LentPipeline.streamLimit(Stream<Object> receiver, long maxSize) WeavesStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.WeavesStream.map: seeAgentConcurrencyUtilHooks.StageSlot.streamMapMulti(Stream<Object> receiver, BiConsumer<Object, Consumer<Object>> mapper) WeavesStream.mapMulti: the mapper runs as an element, and the values it passes on go downstream inside it (#1172).static DoubleStreamstreamMapMultiToDouble(Stream<Object> receiver, BiConsumer<Object, DoubleConsumer> mapper) static IntStreamstreamMapMultiToInt(Stream<Object> receiver, BiConsumer<Object, IntConsumer> mapper) static LongStreamstreamMapMultiToLong(Stream<Object> receiver, BiConsumer<Object, LongConsumer> mapper) static DoubleStreamstreamMapToDouble(Stream<Object> receiver, ToDoubleFunction<Object> mapper) WeavesStream.mapToDouble, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedDoubleStreamends.static IntStreamstreamMapToInt(Stream<Object> receiver, ToIntFunction<Object> mapper) WeavesStream.mapToInt, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedIntStreamends.static LongStreamstreamMapToLong(Stream<Object> receiver, ToLongFunction<Object> mapper) WeavesStream.mapToLong, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedLongStreamends.streamMax(Stream<Object> receiver, Comparator<Object> comparator) WeavesStream.max(Comparator), asstreamMin(java.util.stream.Stream<java.lang.Object>, java.util.Comparator<java.lang.Object>).streamMin(Stream<Object> receiver, Comparator<Object> comparator) WeavesStream.min(Comparator): the comparator runs as a combine, since it compares elements other subtasks produced.static booleanstreamNoneMatch(Stream<Object> receiver, Predicate<Object> predicate) WeavesStream.noneMatch, asstreamAnyMatch(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).static BaseStream<?, ?> streamOnClose(Stream<Object> receiver, Runnable closeHandler) WeavesStream.onClose: the close handler runs atclose(), not in the pipeline, so it carries the woven stages behind it like a stage with no lambda (#1172).static BaseStream<?, ?> streamParallel(Stream<Object> receiver) WeavesStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.streamPeek(Stream<Object> receiver, Consumer<Object> action) static ObjectstreamReduce(Stream<Object> receiver, Object identity, BiFunction<Object, Object, Object> accumulator, BinaryOperator<Object> combiner) WeavesStream.reduce(Object, BiFunction, BinaryOperator): the accumulator runs as an element and the combiner as a combine.static ObjectstreamReduce(Stream<Object> receiver, Object identity, BinaryOperator<Object> accumulator) WeavesStream.reduce(Object, BinaryOperator), asstreamReduce(Stream, BinaryOperator).streamReduce(Stream<Object> receiver, BinaryOperator<Object> accumulator) WeavesStream.reduce(BinaryOperator): the accumulator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).static BaseStream<?, ?> streamSequential(Stream<Object> receiver) WeavesStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.streamSkip(Stream<Object> receiver, long n) WeavesStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.streamSorted(Stream<Object> receiver) WeavesStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.streamSorted(Stream<Object> receiver, Comparator<Object> comparator) WeavesStream.sorted: the comparator runs as a combine, since a parallel sort compares elements other subtasks produced.streamTakeWhile(Stream<Object> receiver, Predicate<Object> predicate) WeavesStream.takeWhile: the predicate runs as an element.static Object[]streamToArray(Stream<Object> receiver) WeavesStream.toArray(), asstreamToList(java.util.stream.Stream<java.lang.Object>).static Object[]streamToArray(Stream<Object> receiver, IntFunction<Object[]> generator) WeavesStream.toArray(IntFunction), asstreamToList(java.util.stream.Stream<java.lang.Object>); the generator is the array constructor nearly always and is left as it is.streamToList(Stream<Object> receiver) WeavesStream.toList(): the pipeline's woven stages run as its elements.static BaseStream<?, ?> streamUnordered(Stream<Object> receiver) WeavesStream.unordered: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.static Future<?> submit(ExecutorService receiver, Runnable task) WeavesExecutorService.submit(Runnable), assubmit(ExecutorService, Callable).submit(ExecutorService receiver, Runnable task, @Nullable Object result) WeavesExecutorService.submit(Runnable, Object), assubmit(ExecutorService, Callable).submit(ExecutorService receiver, Callable<Object> task) WeavesExecutorService.submit(Callable): submitted to ajava.util.concurrentexecutor, the task runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call and a get on this thread is ordered after it finished (#741).static voidsubmitResultDiscarded(Future<?> future) Stands in for thePOPafter a wovensubmitwhose future the caller never kept.static CompletableFuture<Object> supplyAsync(Supplier<Object> supplier) WeavesCompletableFuture.supplyAsync(Supplier): the supplier runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call and a join on this thread is ordered after it finished (#741).static CompletableFuture<Object> supplyAsync(Supplier<Object> supplier, Executor executor) WeavesCompletableFuture.supplyAsync(Supplier, Executor), assupplyAsync(Supplier).static Objecttake(BlockingQueue<Object> receiver) WeavesBlockingQueue.take().static CompletableFuture<Void> thenAccept(CompletableFuture<Object> receiver, Consumer<Object> action) WeavesCompletableFuture.thenAccept(Consumer): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> thenAccept(CompletionStage<Object> receiver, Consumer<Object> action) WeavesCompletionStage.thenAccept(Consumer): on aCompletableFuture, asthenAccept(CompletableFuture, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> thenAcceptAsync(CompletableFuture<Object> receiver, Consumer<Object> action) WeavesCompletableFuture.thenAcceptAsync(Consumer), asthenAccept(CompletableFuture, Consumer).static CompletableFuture<Void> thenAcceptAsync(CompletableFuture<Object> receiver, Consumer<Object> action, Executor executor) WeavesCompletableFuture.thenAcceptAsync(Consumer, Executor), asthenAccept(CompletableFuture, Consumer).static CompletionStage<Void> thenAcceptAsync(CompletionStage<Object> receiver, Consumer<Object> action) WeavesCompletionStage.thenAcceptAsync(Consumer): on aCompletableFuture, asthenAcceptAsync(CompletableFuture, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> thenAcceptAsync(CompletionStage<Object> receiver, Consumer<Object> action, Executor executor) WeavesCompletionStage.thenAcceptAsync(Consumer, Executor): on aCompletableFuture, asthenAcceptAsync(CompletableFuture, Consumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> thenAcceptBoth(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletableFuture.thenAcceptBoth(CompletionStage, BiConsumer): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> thenAcceptBoth(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletionStage.thenAcceptBoth(CompletionStage, BiConsumer): on aCompletableFuture, asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> thenAcceptBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletableFuture.thenAcceptBothAsync(CompletionStage, BiConsumer), asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer).static CompletableFuture<Void> thenAcceptBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action, Executor executor) WeavesCompletableFuture.thenAcceptBothAsync(CompletionStage, BiConsumer, Executor), asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer).static CompletionStage<Void> thenAcceptBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletionStage.thenAcceptBothAsync(CompletionStage, BiConsumer): on aCompletableFuture, asthenAcceptBothAsync(CompletableFuture, CompletionStage, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> thenAcceptBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action, Executor executor) WeavesCompletionStage.thenAcceptBothAsync(CompletionStage, BiConsumer, Executor): on aCompletableFuture, asthenAcceptBothAsync(CompletableFuture, CompletionStage, BiConsumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> WeavesCompletableFuture.thenApply(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> WeavesCompletionStage.thenApply(Function): on aCompletableFuture, asthenApply(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> thenApplyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenApplyAsync(Function), asthenApply(CompletableFuture, Function).static CompletableFuture<Object> thenApplyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.thenApplyAsync(Function, Executor), asthenApply(CompletableFuture, Function).static CompletionStage<Object> thenApplyAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenApplyAsync(Function): on aCompletableFuture, asthenApplyAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> thenApplyAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.thenApplyAsync(Function, Executor): on aCompletableFuture, asthenApplyAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> thenCombine(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.thenCombine(CompletionStage, BiFunction): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> thenCombine(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletionStage.thenCombine(CompletionStage, BiFunction): on aCompletableFuture, asthenCombine(CompletableFuture, CompletionStage, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> thenCombineAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.thenCombineAsync(CompletionStage, BiFunction), asthenCombine(CompletableFuture, CompletionStage, BiFunction).static CompletableFuture<Object> thenCombineAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletableFuture.thenCombineAsync(CompletionStage, BiFunction, Executor), asthenCombine(CompletableFuture, CompletionStage, BiFunction).static CompletionStage<Object> thenCombineAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletionStage.thenCombineAsync(CompletionStage, BiFunction): on aCompletableFuture, asthenCombineAsync(CompletableFuture, CompletionStage, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> thenCombineAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletionStage.thenCombineAsync(CompletionStage, BiFunction, Executor): on aCompletableFuture, asthenCombineAsync(CompletableFuture, CompletionStage, BiFunction, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> thenCompose(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenCompose(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> thenCompose(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenCompose(Function): on aCompletableFuture, asthenCompose(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> thenComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenComposeAsync(Function), asthenCompose(CompletableFuture, Function).static CompletableFuture<Object> thenComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.thenComposeAsync(Function, Executor), asthenCompose(CompletableFuture, Function).static CompletionStage<Object> thenComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenComposeAsync(Function): on aCompletableFuture, asthenComposeAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> thenComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.thenComposeAsync(Function, Executor): on aCompletableFuture, asthenComposeAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> thenRun(CompletableFuture<Object> receiver, Runnable action) WeavesCompletableFuture.thenRun(Runnable): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Void> thenRun(CompletionStage<Object> receiver, Runnable action) WeavesCompletionStage.thenRun(Runnable): on aCompletableFuture, asthenRun(CompletableFuture, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Void> thenRunAsync(CompletableFuture<Object> receiver, Runnable action) WeavesCompletableFuture.thenRunAsync(Runnable), asthenRun(CompletableFuture, Runnable).static CompletableFuture<Void> thenRunAsync(CompletableFuture<Object> receiver, Runnable action, Executor executor) WeavesCompletableFuture.thenRunAsync(Runnable, Executor), asthenRun(CompletableFuture, Runnable).static CompletionStage<Void> thenRunAsync(CompletionStage<Object> receiver, Runnable action) WeavesCompletionStage.thenRunAsync(Runnable): on aCompletableFuture, asthenRunAsync(CompletableFuture, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Void> thenRunAsync(CompletionStage<Object> receiver, Runnable action, Executor executor) WeavesCompletionStage.thenRunAsync(Runnable, Executor): on aCompletableFuture, asthenRunAsync(CompletableFuture, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static @Nullable ObjectthreadLocalGet(ThreadLocal<?> receiver) WeavesThreadLocal.get(): inside a pooled task the run handed over, the read is recorded onTHREAD_LOCAL_LEAKSwith the task, so a value an earlier task on the thread set and left behind is told from this task's own (#995).static voidthreadLocalRemove(ThreadLocal<?> receiver) WeavesThreadLocal.remove(): the next task on this thread starts clean (#995).static voidthreadLocalSet(ThreadLocal<?> receiver, @Nullable Object value) WeavesThreadLocal.set(Object), asthreadLocalGet(java.lang.ThreadLocal<?>): inside a pooled task the set is recorded with the task (#995).static booleantryAcquire(Semaphore receiver) WeavesSemaphore.tryAcquire().static booleantryAcquire(Semaphore receiver, int permits) WeavesSemaphore.tryAcquire(int).static booleantryAcquire(Semaphore receiver, int permits, long timeout, TimeUnit unit) WeavesSemaphore.tryAcquire(int, long, TimeUnit).static booleantryAcquire(Semaphore receiver, long timeout, TimeUnit unit) WeavesSemaphore.tryAcquire(long, TimeUnit), the timed form.static ExecutorServiceunconfigurableExecutorService(ExecutorService executor) WeavesExecutors.unconfigurableExecutorService(ExecutorService): remembers what the wrapper forwards to, so a wovenexecuteon it decides by the executor behind it (#1107). kotlinx'snewSingleThreadContextwraps aScheduledThreadPoolExecutorthis way, and without the look-through nothing its thread did reached a detector.static ScheduledExecutorServiceWeavesExecutors.unconfigurableScheduledExecutorService(ScheduledExecutorService), asunconfigurableExecutorService(java.util.concurrent.ExecutorService).static voidupdaterIncremented(Object receiver, @Nullable String field) A woven arithmetic update of a field through an updater,atomicIncremented(java.lang.Object)for a slot that is not an object of its own (#1275).static voidupdaterRead(Object receiver, @Nullable String field) A woven read of a field through an updater,atomicRead(java.lang.Object)for a slot that is not an object of its own (#1275): tracked by the field's key, so every updater and every call reaching the same field of the same object meet.static voidupdaterStored(Object receiver, @Nullable String field) A woven plain store to a field through an updater, asatomicStored(java.lang.Object)records one to an atomic (#1275).static voidupdaterSwapped(Object receiver, @Nullable String field) A woven atomic swap of a field through an updater, which ends a pending read, asatomicSwapped(java.lang.Object)does for an atomic (#1275).static CompletableFuture<Object> whenComplete(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletableFuture.whenComplete(BiConsumer): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).static CompletionStage<Object> whenComplete(CompletionStage<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletionStage.whenComplete(BiConsumer): on aCompletableFuture, aswhenComplete(CompletableFuture, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletableFuture<Object> whenCompleteAsync(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletableFuture.whenCompleteAsync(BiConsumer), aswhenComplete(CompletableFuture, BiConsumer).static CompletableFuture<Object> whenCompleteAsync(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action, Executor executor) WeavesCompletableFuture.whenCompleteAsync(BiConsumer, Executor), aswhenComplete(CompletableFuture, BiConsumer).static CompletionStage<Object> whenCompleteAsync(CompletionStage<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletionStage.whenCompleteAsync(BiConsumer): on aCompletableFuture, aswhenCompleteAsync(CompletableFuture, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).static CompletionStage<Object> whenCompleteAsync(CompletionStage<Object> receiver, BiConsumer<Object, Object> action, Executor executor) WeavesCompletionStage.whenCompleteAsync(BiConsumer, Executor): on aCompletableFuture, aswhenCompleteAsync(CompletableFuture, BiConsumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).
-
Method Details
-
abaSlot
Returns the calling thread'sABAProblemDetectorview ofatomic, ornullwhen no test with that detector runs on this thread. (#817)Not a substitution: the
AtomicReferencehooks inTelemetryRegistryask it before each woven operation, and run the operation through the answer when there is one.- Parameters:
atomic- the atomic a woven call site invoked- Returns:
- the calling thread's
ABAProblemDetectorview ofatomic, ornullwhen no test with that detector runs on this thread - Since:
- 1.12.3
-
abaSlot
Returns the calling thread'sABAProblemDetectorview of the reference fieldselectorreaches insideholder, ornullwhen no test with that detector runs on this thread. (#817)For the
AtomicReferenceFieldUpdaterandVarHandlehooks inTelemetryRegistry, which perform their operation under the view's monitor.- Parameters:
holder- the object whose field is the slotselector- the updater or handle the call site invoked- Returns:
- the calling thread's
ABAProblemDetectorview of the reference fieldselectorreaches insideholder, ornullwhen no test with that detector runs on this thread - Since:
- 1.12.4
-
abaSlot
Returns the calling thread'sABAProblemDetectorview of elementindexofarray, ornullwhen no test with that detector runs on this thread. (#817)- Parameters:
array- theAtomicReferenceArray, or the array aVarHandlereachesindex- the element's index- Returns:
- the calling thread's
ABAProblemDetectorview of elementindexofarray, ornullwhen no test with that detector runs on this thread - Since:
- 1.12.4
-
acquire
WeavesSemaphore.acquire().- Parameters:
receiver- the semaphore- Throws:
InterruptedException- if interrupted while waiting
-
tryAcquire
WeavesSemaphore.tryAcquire().- Parameters:
receiver- the semaphore- Returns:
- whether a permit was taken
-
futureTaskRun
WeavesFutureTask.run()called by the code under test, the Memoizer idiom, where no executor wraps the task: when the run ends, what the callable did is released to the task, and a woven get that observed the completion acquires it (#1307).- Parameters:
receiver- the task the caller runs on its own thread
-
release
WeavesSemaphore.release().- Parameters:
receiver- the semaphore
-
acquire
WeavesSemaphore.acquire(int).The permit-count overloads matter more than they look. The detector's finding is a balance - acquisitions against releases - so a semaphore used as
acquire(3)thenrelease(1)leaks two permits, and recording one event for each call would have made that read as balanced. Each permit is therefore recorded separately, which is what keeps the arithmetic meaning what it says. None of these overloads was woven at all before (#434), so a pool sized in permits was invisible.- Parameters:
receiver- the semaphorepermits- how many permits to take- Throws:
InterruptedException- if interrupted while waiting
-
tryAcquire
WeavesSemaphore.tryAcquire(int).- Parameters:
receiver- the semaphorepermits- how many permits to take- Returns:
- whether they were taken
-
tryAcquire
public static boolean tryAcquire(Semaphore receiver, long timeout, TimeUnit unit) throws InterruptedException WeavesSemaphore.tryAcquire(long, TimeUnit), the timed form.- Parameters:
receiver- the semaphoretimeout- how long to waitunit- the unit oftimeout- Returns:
- whether a permit was taken
- Throws:
InterruptedException- if interrupted while waiting
-
tryAcquire
public static boolean tryAcquire(Semaphore receiver, int permits, long timeout, TimeUnit unit) throws InterruptedException WeavesSemaphore.tryAcquire(int, long, TimeUnit).- Parameters:
receiver- the semaphorepermits- how many permits to taketimeout- how long to waitunit- the unit oftimeout- Returns:
- whether they were taken
- Throws:
InterruptedException- if interrupted while waiting
-
release
WeavesSemaphore.release(int).- Parameters:
receiver- the semaphorepermits- how many permits to return
-
countDown
WeavesCountDownLatch.countDown().The latch is observed before it is counted down, which is what lets
LatchMisuseDetectorrecover the count it started from. Observing afterwards would read a count this very call has already decremented.- Parameters:
receiver- the latch
-
await
WeavesCountDownLatch.await().- Parameters:
receiver- the latch- Throws:
InterruptedException- if interrupted while waiting
-
await
public static boolean await(CountDownLatch receiver, long timeout, TimeUnit unit) throws InterruptedException WeavesCountDownLatch.await(long, TimeUnit).The timeout branch is the finding: a latch that timed out was not counted down as often as somebody expected, and the boolean saying so is routinely discarded.
- Parameters:
receiver- the latchtimeout- how long to waitunit- the unit oftimeout- Returns:
- whether the latch reached zero before the timeout
- Throws:
InterruptedException- if interrupted while waiting
-
await
WeavesCyclicBarrier.await()(#1246).The memory model orders every action a party takes before
awaitbefore every action any party takes after a normal return from the same generation. The edge is keyed by the barrier's own generation object, read under the barrier's own lock, and the arrival is made inside the same hold:awaittakes that lock reentrantly, so no other party can trip the barrier between the read and the arrival, and every release into a generation comes from a party that arrived in it. A party already arriving for the next generation therefore cannot publish into the one a slower party is just returning from. The party that trips the barrier runs the barrier action inside itsawait, and the memory model orders every party's actions beforeawaitbefore the action, and the action before every return (#1267). So the tripping party, seen under the lock as the last to arrive, acquires the generation before itsawait, and once that returns 0 it releases again before giving up the lock, which no other party can return without. A broken barrier, a timeout, an interrupt or aresetreturns abnormally, and acquires nothing; the release is withdrawn. Where the fields cannot be read the call is made unchanged and orders nothing.- Parameters:
receiver- the barrier- Returns:
- the arrival index
awaitreturned - Throws:
InterruptedException- if interrupted while waitingBrokenBarrierException- if the barrier broke
-
await
public static int await(CyclicBarrier receiver, long timeout, TimeUnit unit) throws InterruptedException, BrokenBarrierException, TimeoutException WeavesCyclicBarrier.await(long, TimeUnit), the same edge asawait(CyclicBarrier).- Parameters:
receiver- the barriertimeout- how long to waitunit- the unit oftimeout- Returns:
- the arrival index
awaitreturned - Throws:
InterruptedException- if interrupted while waitingBrokenBarrierException- if the barrier brokeTimeoutException- if the timeout elapsed, which breaks the barrier
-
arriveAndAwaitAdvance
WeavesPhaser.arriveAndAwaitAdvance()(#1265).The
Phaserjavadoc orders every arrival in a phase before every return from waiting for that phase to advance. This party releases into the phase it is in before it arrives, and acquires that phase once the call returns the next one. The phase is read before the call, which is exact for a registered party: the phase cannot advance without its arrival. Where the returned phase says otherwise, an arrival the phaser did not need, the release is withdrawn. A terminated phaser waits for nobody and orders nothing.A tiered phaser is keyed by its root: children advance when the root does, with the root's phase numbers, so arrivals on two children of one root order each other.
- Parameters:
receiver- the phaser- Returns:
- the phase the call returned: the next phase, or a negative one once terminated
-
arrive
WeavesPhaser.arrive(): a release into the phase it arrives in, as inarriveAndAwaitAdvance(java.util.concurrent.Phaser), with nothing to acquire, since it does not wait (#1265).- Parameters:
receiver- the phaser- Returns:
- the arrival phase, or a negative phase once terminated
-
arriveAndDeregister
WeavesPhaser.arriveAndDeregister(): the same release asarrive(java.util.concurrent.Phaser); the party's last arrival still counts toward the phase it arrives in (#1265).- Parameters:
receiver- the phaser- Returns:
- the arrival phase, or a negative phase once terminated
-
awaitAdvance
WeavesPhaser.awaitAdvance(int)(#1265): once the phaser is pastphase, every arrival in it happened, so the caller acquires it. A return ofphaseitself cannot happen for a live phaser, and a negative one means it terminated; neither orders anything. A phase the phaser has not reached yet returns at once and has no token.- Parameters:
receiver- the phaserphase- the phase to wait out- Returns:
- the phase the call returned
-
awaitAdvanceInterruptibly
WeavesPhaser.awaitAdvanceInterruptibly(int), the same edge asawaitAdvance(Phaser, int)on a normal return.- Parameters:
receiver- the phaserphase- the phase to wait out- Returns:
- the phase the call returned
- Throws:
InterruptedException- if interrupted while waiting
-
awaitAdvanceInterruptibly
public static int awaitAdvanceInterruptibly(Phaser receiver, int phase, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException WeavesPhaser.awaitAdvanceInterruptibly(int, long, TimeUnit), the same edge asawaitAdvance(Phaser, int)on a normal return.- Parameters:
receiver- the phaserphase- the phase to wait outtimeout- how long to waitunit- the unit oftimeout- Returns:
- the phase the call returned
- Throws:
InterruptedException- if interrupted while waitingTimeoutException- if the timeout elapsed first
-
offer
WeavesBlockingQueue.offer(Object).The discarded boolean is the bug: an
offerthat returnedfalsedropped the element, and the caller usually never looks.- Parameters:
receiver- the queueelement- the element to add- Returns:
- whether the element was added
-
offer
public static boolean offer(BlockingQueue<Object> receiver, Object element, long timeout, TimeUnit unit) throws InterruptedException WeavesBlockingQueue.offer(Object, long, TimeUnit), the timed form.The timed overloads are the ones production code reaches for - an untimed
offerthat returns immediately and an untimedpollthat returnsnullare the shapes people avoid - and neither was woven (#434). The discarded boolean is the same bug either way.- Parameters:
receiver- the queueelement- the element to addtimeout- how long to wait for spaceunit- the unit oftimeout- Returns:
- whether the element was added
- Throws:
InterruptedException- if interrupted while waiting
-
offerResultDiscarded
public static void offerResultDiscarded(boolean added) Weaves thePOPthat follows aBlockingQueue.offerwhose result the caller never read.Not an operation of its own. The offer already happened and was recorded by
offer(BlockingQueue, Object)or its timed form, on this thread, as the instruction before this one: the weaver substitutes this call for thePOPand for nothing else, so adjacency is guaranteed by construction rather than assumed. What this adds is the one fact the return value cannot carry - nobody looked. Afalsethat was branched on is backpressure working; afalsethat was popped is an element dropped on the floor, and the detector counts only the second as a finding (#454).- Parameters:
added- what the offer returned, which is the value the caller discarded- Since:
- 1.11.1
-
poll
public static Object poll(BlockingQueue<Object> receiver, long timeout, TimeUnit unit) throws InterruptedException WeavesBlockingQueue.poll(long, TimeUnit), the timed form.- Parameters:
receiver- the queuetimeout- how long to wait for an elementunit- the unit oftimeout- Returns:
- the head of the queue, or
nullon timeout - Throws:
InterruptedException- if interrupted while waiting
-
poll
WeavesBlockingQueue.poll().- Parameters:
receiver- the queue- Returns:
- the head of the queue, or
nullwhen it was empty
-
take
WeavesBlockingQueue.take().A take hands the head to this thread exactly as
polldoes, so it is reported the same way, with the queue as container (#664). Unwoven, it left the offer that put the element there on record, and an element put back by another thread through a call nothing observes then named the first offerer as owner of its next generation.- Parameters:
receiver- the queue- Returns:
- the head of the queue
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.12.2
-
drainTo
WeavesBlockingQueue.drainTo(Collection).The elements move into
targetwithout being named one by one, so the drain is reported as a whole: every offer into this queue recorded before it is stale (#664). The happens-before model is told per element where the target is a list (#1295).- Parameters:
receiver- the queuetarget- the collection the elements move to- Returns:
- how many elements moved
- Since:
- 1.12.2
-
drainTo
public static int drainTo(BlockingQueue<Object> receiver, Collection<Object> target, int maxElements) WeavesBlockingQueue.drainTo(Collection, int), reported likedrainTo(BlockingQueue, Collection).- Parameters:
receiver- the queuetarget- the collection the elements move tomaxElements- the most elements to move- Returns:
- how many elements moved
- Since:
- 1.12.2
-
put
WeavesBlockingQueue.put(Object).- Parameters:
receiver- the queueelement- the element to add- Throws:
InterruptedException- if interrupted while waiting for space
-
complete
WeavesCompletableFuture.complete(Object): the completing thread's accesses are published to whoever observes the completion (#741). A future that was already complete refuses the value, and the release is withdrawn.- Parameters:
receiver- the futurevalue- the value to complete it with- Returns:
- whether this call completed the future
- Since:
- 1.12.3
-
completeExceptionally
WeavesCompletableFuture.completeExceptionally(Throwable), a completion likecomplete(java.util.concurrent.CompletableFuture<java.lang.Object>, java.lang.Object): a join that throws with the failure observed it too (#741).- Parameters:
receiver- the futurefailure- the exception to complete it with- Returns:
- whether this call completed the future
- Since:
- 1.12.3
-
obtrudeValue
WeavesCompletableFuture.obtrudeValue(Object), which completes the future whatever it held (#741).- Parameters:
receiver- the futurevalue- the value it now holds- Since:
- 1.12.3
-
obtrudeException
WeavesCompletableFuture.obtrudeException(Throwable), which completes the future exceptionally whatever it held (#741).- Parameters:
receiver- the futurefailure- the exception it now holds- Since:
- 1.12.3
-
join
WeavesCompletableFuture.join(): a join that returned, or threw the exception the future completed with, observed the completion and is ordered after it (#741).- Parameters:
receiver- the future- Returns:
- its value
- Since:
- 1.12.3
-
get
public static @Nullable Object get(Future<Object> receiver) throws InterruptedException, ExecutionException WeavesFuture.get(): a get that returned, or threw the task's exception, observed the completion and is ordered after it (#741). Matches aCompletableFuture.getas well, which is the same method.- Parameters:
receiver- the future- Returns:
- its value
- Throws:
InterruptedException- if interrupted while waitingExecutionException- if the task completed exceptionally- Since:
- 1.12.3
-
get
public static @Nullable Object get(Future<Object> receiver, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException WeavesFuture.get(long, TimeUnit), asget(Future); a get that timed out observed nothing.- Parameters:
receiver- the futuretimeout- how long to waitunit- the unit oftimeout- Returns:
- its value
- Throws:
InterruptedException- if interrupted while waitingExecutionException- if the task completed exceptionallyTimeoutException- if the wait timed out- Since:
- 1.12.3
-
processBuilderStart
WeavesProcessBuilder.start(): the child is started, then recorded onPROCESS_STREAM_STARVATIONwith its builder, which alone tells a stderr merged into stdout from a pipe on Linux.- Parameters:
receiver- the builder- Returns:
- the started child
- Throws:
IOException- if the child cannot be started- Since:
- 1.13.2
-
processBuilderStartPipeline
public static List<Process> processBuilderStartPipeline(List<ProcessBuilder> builders) throws IOException WeavesProcessBuilder.startPipeline(List), asprocessBuilderStart(java.lang.ProcessBuilder)for each builder and the child it started.- Parameters:
builders- the builders, in pipeline order- Returns:
- the started children, in the same order
- Throws:
IOException- if a child cannot be started- Since:
- 1.13.2
-
processWaitFor
WeavesProcess.waitFor(): the wait is recorded onPROCESS_STREAM_STARVATIONwith the output pipes no thread had taken yet, then made.- Parameters:
receiver- the child process- Returns:
- its exit value
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.13.2
-
processWaitFor
public static boolean processWaitFor(Process receiver, long timeout, TimeUnit unit) throws InterruptedException WeavesProcess.waitFor(long, TimeUnit), asprocessWaitFor(Process): a wait with a timeout still waits on a child that cannot finish.- Parameters:
receiver- the child processtimeout- how long to waitunit- the unit oftimeout- Returns:
- whether the child exited in time
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.13.2
-
processWaitFor
public static boolean processWaitFor(Process receiver, Duration duration) throws InterruptedException WeavesProcess.waitFor(Duration), asprocessWaitFor(Process). The method exists from JDK 25 and the library compiles for 21, so it is called through a handle resolved once; on an older JDK no call site can carry this descriptor, and the hook is never reached.- Parameters:
receiver- the child processduration- how long to wait- Returns:
- whether the child exited in time
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.13.2
-
processInputStream
WeavesProcess.getInputStream(): withPROCESS_STREAM_STARVATIONon, the caller gets the child's stdout pipe in a stream that notes who reads it and whether it reached its end, so a pipe taken before a wait but read only after it is told from one read first (#998). Otherwise the pipe itself.- Parameters:
receiver- the child process- Returns:
- the stream
- Since:
- 1.13.2
-
processErrorStream
WeavesProcess.getErrorStream(), asprocessInputStream(java.lang.Process)for stderr.- Parameters:
receiver- the child process- Returns:
- the stream
- Since:
- 1.13.2
-
processInputReader
WeavesProcess.inputReader(), asprocessInputStream(java.lang.Process).- Parameters:
receiver- the child process- Returns:
- the reader
- Since:
- 1.13.2
-
processInputReader
WeavesProcess.inputReader(Charset), asprocessInputStream(java.lang.Process).- Parameters:
receiver- the child processcharset- the charset to decode with- Returns:
- the reader
- Since:
- 1.13.2
-
processErrorReader
WeavesProcess.errorReader(), asprocessErrorStream(java.lang.Process).- Parameters:
receiver- the child process- Returns:
- the reader
- Since:
- 1.13.2
-
processErrorReader
WeavesProcess.errorReader(Charset), asprocessErrorStream(java.lang.Process).- Parameters:
receiver- the child processcharset- the charset to decode with- Returns:
- the reader
- Since:
- 1.13.2
-
pipedWrite
WeavesPipedOutputStream.write(int): the write is recorded against the pipe's reading end, so one thread on both ends of a pair is reported (#994).- Parameters:
receiver- the writing endb- the byte- Throws:
IOException- as the write does- Since:
- 1.13.2
-
pipedWrite
public static void pipedWrite(PipedOutputStream receiver, byte[] b, int off, int len) throws IOException WeavesPipedOutputStream.write(byte[], int, int), aspipedWrite(java.io.PipedOutputStream, int).- Parameters:
receiver- the writing endb- the bytesoff- the first byte to writelen- how many to write- Throws:
IOException- as the write does- Since:
- 1.13.2
-
pipedWrite
WeavesPipedOutputStream.write(byte[]), aspipedWrite(java.io.PipedOutputStream, int).- Parameters:
receiver- the writing endb- the bytes- Throws:
IOException- as the write does- Since:
- 1.13.2
-
pipedRead
WeavesPipedInputStream.read(): the read is recorded against the pipe (#994).- Parameters:
receiver- the reading end- Returns:
- what the read returns
- Throws:
IOException- as the read does- Since:
- 1.13.2
-
pipedRead
public static int pipedRead(PipedInputStream receiver, byte[] b, int off, int len) throws IOException WeavesPipedInputStream.read(byte[], int, int), aspipedRead(java.io.PipedInputStream).- Parameters:
receiver- the reading endb- where to read intooff- the first index to filllen- how many bytes at most- Returns:
- what the read returns
- Throws:
IOException- as the read does- Since:
- 1.13.2
-
pipedRead
WeavesPipedInputStream.read(byte[]), aspipedRead(java.io.PipedInputStream).- Parameters:
receiver- the reading endb- where to read into- Returns:
- what the read returns
- Throws:
IOException- as the read does- Since:
- 1.13.2
-
thenApply
public static CompletableFuture<Object> thenApply(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenApply(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenApplyAsync
public static CompletableFuture<Object> thenApplyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenApplyAsync(Function), asthenApply(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenApplyAsync
public static CompletableFuture<Object> thenApplyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.thenApplyAsync(Function, Executor), asthenApply(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAccept
public static CompletableFuture<Void> thenAccept(CompletableFuture<Object> receiver, Consumer<Object> action) WeavesCompletableFuture.thenAccept(Consumer): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptAsync
public static CompletableFuture<Void> thenAcceptAsync(CompletableFuture<Object> receiver, Consumer<Object> action) WeavesCompletableFuture.thenAcceptAsync(Consumer), asthenAccept(CompletableFuture, Consumer).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptAsync
public static CompletableFuture<Void> thenAcceptAsync(CompletableFuture<Object> receiver, Consumer<Object> action, Executor executor) WeavesCompletableFuture.thenAcceptAsync(Consumer, Executor), asthenAccept(CompletableFuture, Consumer).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRun
WeavesCompletableFuture.thenRun(Runnable): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRunAsync
public static CompletableFuture<Void> thenRunAsync(CompletableFuture<Object> receiver, Runnable action) WeavesCompletableFuture.thenRunAsync(Runnable), asthenRun(CompletableFuture, Runnable).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRunAsync
public static CompletableFuture<Void> thenRunAsync(CompletableFuture<Object> receiver, Runnable action, Executor executor) WeavesCompletableFuture.thenRunAsync(Runnable, Executor), asthenRun(CompletableFuture, Runnable).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombine
public static CompletableFuture<Object> thenCombine(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.thenCombine(CompletionStage, BiFunction): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombineAsync
public static CompletableFuture<Object> thenCombineAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.thenCombineAsync(CompletionStage, BiFunction), asthenCombine(CompletableFuture, CompletionStage, BiFunction).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombineAsync
public static CompletableFuture<Object> thenCombineAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletableFuture.thenCombineAsync(CompletionStage, BiFunction, Executor), asthenCombine(CompletableFuture, CompletionStage, BiFunction).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBoth
public static CompletableFuture<Void> thenAcceptBoth(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletableFuture.thenAcceptBoth(CompletionStage, BiConsumer): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBothAsync
public static CompletableFuture<Void> thenAcceptBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletableFuture.thenAcceptBothAsync(CompletionStage, BiConsumer), asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBothAsync
public static CompletableFuture<Void> thenAcceptBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action, Executor executor) WeavesCompletableFuture.thenAcceptBothAsync(CompletionStage, BiConsumer, Executor), asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBoth
public static CompletableFuture<Void> runAfterBoth(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterBoth(CompletionStage, Runnable): the function runs wrapped, after this thread's clock and the completions it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBothAsync
public static CompletableFuture<Void> runAfterBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterBothAsync(CompletionStage, Runnable), asrunAfterBoth(CompletableFuture, CompletionStage, Runnable).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBothAsync
public static CompletableFuture<Void> runAfterBothAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletableFuture.runAfterBothAsync(CompletionStage, Runnable, Executor), asrunAfterBoth(CompletableFuture, CompletionStage, Runnable).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEither
public static CompletableFuture<Object> applyToEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletableFuture.applyToEither(CompletionStage, Function): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEitherAsync
public static CompletableFuture<Object> applyToEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletableFuture.applyToEitherAsync(CompletionStage, Function), asapplyToEither(CompletableFuture, CompletionStage, Function).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEitherAsync
public static CompletableFuture<Object> applyToEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.applyToEitherAsync(CompletionStage, Function, Executor), asapplyToEither(CompletableFuture, CompletionStage, Function).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEither
public static CompletableFuture<Void> acceptEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletableFuture.acceptEither(CompletionStage, Consumer): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEitherAsync
public static CompletableFuture<Void> acceptEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletableFuture.acceptEitherAsync(CompletionStage, Consumer), asacceptEither(CompletableFuture, CompletionStage, Consumer).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEitherAsync
public static CompletableFuture<Void> acceptEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Consumer<Object> action, Executor executor) WeavesCompletableFuture.acceptEitherAsync(CompletionStage, Consumer, Executor), asacceptEither(CompletableFuture, CompletionStage, Consumer).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEither
public static CompletableFuture<Void> runAfterEither(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterEither(CompletionStage, Runnable): the function runs wrapped, after this thread's clock only, since which stage it followed is not known, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEitherAsync
public static CompletableFuture<Void> runAfterEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletableFuture.runAfterEitherAsync(CompletionStage, Runnable), asrunAfterEither(CompletableFuture, CompletionStage, Runnable).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEitherAsync
public static CompletableFuture<Void> runAfterEitherAsync(CompletableFuture<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletableFuture.runAfterEitherAsync(CompletionStage, Runnable, Executor), asrunAfterEither(CompletableFuture, CompletionStage, Runnable).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCompose
public static CompletableFuture<Object> thenCompose(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenCompose(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenComposeAsync
public static CompletableFuture<Object> thenComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.thenComposeAsync(Function), asthenCompose(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenComposeAsync
public static CompletableFuture<Object> thenComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.thenComposeAsync(Function, Executor), asthenCompose(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenComplete
public static CompletableFuture<Object> whenComplete(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletableFuture.whenComplete(BiConsumer): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenCompleteAsync
public static CompletableFuture<Object> whenCompleteAsync(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletableFuture.whenCompleteAsync(BiConsumer), aswhenComplete(CompletableFuture, BiConsumer).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenCompleteAsync
public static CompletableFuture<Object> whenCompleteAsync(CompletableFuture<Object> receiver, BiConsumer<Object, Object> action, Executor executor) WeavesCompletableFuture.whenCompleteAsync(BiConsumer, Executor), aswhenComplete(CompletableFuture, BiConsumer).- Parameters:
receiver- the stage the function followsaction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handle
public static CompletableFuture<Object> handle(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.handle(BiFunction): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handleAsync
public static CompletableFuture<Object> handleAsync(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletableFuture.handleAsync(BiFunction), ashandle(CompletableFuture, BiFunction).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handleAsync
public static CompletableFuture<Object> handleAsync(CompletableFuture<Object> receiver, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletableFuture.handleAsync(BiFunction, Executor), ashandle(CompletableFuture, BiFunction).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionally
public static CompletableFuture<Object> exceptionally(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionally(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyAsync
public static CompletableFuture<Object> exceptionallyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyAsync(Function), asexceptionally(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyAsync
public static CompletableFuture<Object> exceptionallyAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.exceptionallyAsync(Function, Executor), asexceptionally(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyCompose
public static CompletableFuture<Object> exceptionallyCompose(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyCompose(Function): the function runs wrapped, after this thread's clock and the completion it follows, and a join of the returned stage on this thread is ordered after it (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyComposeAsync
public static CompletableFuture<Object> exceptionallyComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function) WeavesCompletableFuture.exceptionallyComposeAsync(Function), asexceptionallyCompose(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock first- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyComposeAsync
public static CompletableFuture<Object> exceptionallyComposeAsync(CompletableFuture<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletableFuture.exceptionallyComposeAsync(Function, Executor), asexceptionallyCompose(CompletableFuture, Function).- Parameters:
receiver- the stage the function followsfunction- what runs next; the thread running it receives this thread's clock firstexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenApply
public static CompletionStage<Object> thenApply(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenApply(Function): on aCompletableFuture, asthenApply(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenApplyAsync
public static CompletionStage<Object> thenApplyAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenApplyAsync(Function): on aCompletableFuture, asthenApplyAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenApplyAsync
public static CompletionStage<Object> thenApplyAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.thenApplyAsync(Function, Executor): on aCompletableFuture, asthenApplyAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAccept
public static CompletionStage<Void> thenAccept(CompletionStage<Object> receiver, Consumer<Object> action) WeavesCompletionStage.thenAccept(Consumer): on aCompletableFuture, asthenAccept(CompletableFuture, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptAsync
public static CompletionStage<Void> thenAcceptAsync(CompletionStage<Object> receiver, Consumer<Object> action) WeavesCompletionStage.thenAcceptAsync(Consumer): on aCompletableFuture, asthenAcceptAsync(CompletableFuture, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptAsync
public static CompletionStage<Void> thenAcceptAsync(CompletionStage<Object> receiver, Consumer<Object> action, Executor executor) WeavesCompletionStage.thenAcceptAsync(Consumer, Executor): on aCompletableFuture, asthenAcceptAsync(CompletableFuture, Consumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRun
WeavesCompletionStage.thenRun(Runnable): on aCompletableFuture, asthenRun(CompletableFuture, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRunAsync
WeavesCompletionStage.thenRunAsync(Runnable): on aCompletableFuture, asthenRunAsync(CompletableFuture, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenRunAsync
public static CompletionStage<Void> thenRunAsync(CompletionStage<Object> receiver, Runnable action, Executor executor) WeavesCompletionStage.thenRunAsync(Runnable, Executor): on aCompletableFuture, asthenRunAsync(CompletableFuture, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombine
public static CompletionStage<Object> thenCombine(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletionStage.thenCombine(CompletionStage, BiFunction): on aCompletableFuture, asthenCombine(CompletableFuture, CompletionStage, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombineAsync
public static CompletionStage<Object> thenCombineAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function) WeavesCompletionStage.thenCombineAsync(CompletionStage, BiFunction): on aCompletableFuture, asthenCombineAsync(CompletableFuture, CompletionStage, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCombineAsync
public static CompletionStage<Object> thenCombineAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletionStage.thenCombineAsync(CompletionStage, BiFunction, Executor): on aCompletableFuture, asthenCombineAsync(CompletableFuture, CompletionStage, BiFunction, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBoth
public static CompletionStage<Void> thenAcceptBoth(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletionStage.thenAcceptBoth(CompletionStage, BiConsumer): on aCompletableFuture, asthenAcceptBoth(CompletableFuture, CompletionStage, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBothAsync
public static CompletionStage<Void> thenAcceptBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action) WeavesCompletionStage.thenAcceptBothAsync(CompletionStage, BiConsumer): on aCompletableFuture, asthenAcceptBothAsync(CompletableFuture, CompletionStage, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenAcceptBothAsync
public static CompletionStage<Void> thenAcceptBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, BiConsumer<Object, Object> action, Executor executor) WeavesCompletionStage.thenAcceptBothAsync(CompletionStage, BiConsumer, Executor): on aCompletableFuture, asthenAcceptBothAsync(CompletableFuture, CompletionStage, BiConsumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBoth
public static CompletionStage<Void> runAfterBoth(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterBoth(CompletionStage, Runnable): on aCompletableFuture, asrunAfterBoth(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBothAsync
public static CompletionStage<Void> runAfterBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterBothAsync(CompletionStage, Runnable): on aCompletableFuture, asrunAfterBothAsync(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterBothAsync
public static CompletionStage<Void> runAfterBothAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletionStage.runAfterBothAsync(CompletionStage, Runnable, Executor): on aCompletableFuture, asrunAfterBothAsync(CompletableFuture, CompletionStage, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage, which must also complete before the function runsaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEither
public static CompletionStage<Object> applyToEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletionStage.applyToEither(CompletionStage, Function): on aCompletableFuture, asapplyToEither(CompletableFuture, CompletionStage, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEitherAsync
public static CompletionStage<Object> applyToEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function) WeavesCompletionStage.applyToEitherAsync(CompletionStage, Function): on aCompletableFuture, asapplyToEitherAsync(CompletableFuture, CompletionStage, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
applyToEitherAsync
public static CompletionStage<Object> applyToEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Function<Object, Object> function, Executor executor) WeavesCompletionStage.applyToEitherAsync(CompletionStage, Function, Executor): on aCompletableFuture, asapplyToEitherAsync(CompletableFuture, CompletionStage, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEither
public static CompletionStage<Void> acceptEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletionStage.acceptEither(CompletionStage, Consumer): on aCompletableFuture, asacceptEither(CompletableFuture, CompletionStage, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEitherAsync
public static CompletionStage<Void> acceptEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action) WeavesCompletionStage.acceptEitherAsync(CompletionStage, Consumer): on aCompletableFuture, asacceptEitherAsync(CompletableFuture, CompletionStage, Consumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
acceptEitherAsync
public static CompletionStage<Void> acceptEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Consumer<Object> action, Executor executor) WeavesCompletionStage.acceptEitherAsync(CompletionStage, Consumer, Executor): on aCompletableFuture, asacceptEitherAsync(CompletableFuture, CompletionStage, Consumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEither
public static CompletionStage<Void> runAfterEither(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterEither(CompletionStage, Runnable): on aCompletableFuture, asrunAfterEither(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEitherAsync
public static CompletionStage<Void> runAfterEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action) WeavesCompletionStage.runAfterEitherAsync(CompletionStage, Runnable): on aCompletableFuture, asrunAfterEitherAsync(CompletableFuture, CompletionStage, Runnable); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
runAfterEitherAsync
public static CompletionStage<Void> runAfterEitherAsync(CompletionStage<Object> receiver, CompletionStage<Object> other, Runnable action, Executor executor) WeavesCompletionStage.runAfterEitherAsync(CompletionStage, Runnable, Executor): on aCompletableFuture, asrunAfterEitherAsync(CompletableFuture, CompletionStage, Runnable, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsother- the second stage; either one completing runs the functionaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenCompose
public static CompletionStage<Object> thenCompose(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenCompose(Function): on aCompletableFuture, asthenCompose(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenComposeAsync
public static CompletionStage<Object> thenComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.thenComposeAsync(Function): on aCompletableFuture, asthenComposeAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
thenComposeAsync
public static CompletionStage<Object> thenComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.thenComposeAsync(Function, Executor): on aCompletableFuture, asthenComposeAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenComplete
public static CompletionStage<Object> whenComplete(CompletionStage<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletionStage.whenComplete(BiConsumer): on aCompletableFuture, aswhenComplete(CompletableFuture, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenCompleteAsync
public static CompletionStage<Object> whenCompleteAsync(CompletionStage<Object> receiver, BiConsumer<Object, Object> action) WeavesCompletionStage.whenCompleteAsync(BiConsumer): on aCompletableFuture, aswhenCompleteAsync(CompletableFuture, BiConsumer); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
whenCompleteAsync
public static CompletionStage<Object> whenCompleteAsync(CompletionStage<Object> receiver, BiConsumer<Object, Object> action, Executor executor) WeavesCompletionStage.whenCompleteAsync(BiConsumer, Executor): on aCompletableFuture, aswhenCompleteAsync(CompletableFuture, BiConsumer, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsaction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handle
public static CompletionStage<Object> handle(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletionStage.handle(BiFunction): on aCompletableFuture, ashandle(CompletableFuture, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handleAsync
public static CompletionStage<Object> handleAsync(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function) WeavesCompletionStage.handleAsync(BiFunction): on aCompletableFuture, ashandleAsync(CompletableFuture, BiFunction); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
handleAsync
public static CompletionStage<Object> handleAsync(CompletionStage<Object> receiver, BiFunction<Object, Object, Object> function, Executor executor) WeavesCompletionStage.handleAsync(BiFunction, Executor): on aCompletableFuture, ashandleAsync(CompletableFuture, BiFunction, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionally
public static CompletionStage<Object> exceptionally(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionally(Function): on aCompletableFuture, asexceptionally(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyAsync
public static CompletionStage<Object> exceptionallyAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyAsync(Function): on aCompletableFuture, asexceptionallyAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyAsync
public static CompletionStage<Object> exceptionallyAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.exceptionallyAsync(Function, Executor): on aCompletableFuture, asexceptionallyAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyCompose
public static CompletionStage<Object> exceptionallyCompose(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyCompose(Function): on aCompletableFuture, asexceptionallyCompose(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyComposeAsync
public static CompletionStage<Object> exceptionallyComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function) WeavesCompletionStage.exceptionallyComposeAsync(Function): on aCompletableFuture, asexceptionallyComposeAsync(CompletableFuture, Function); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs next- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
exceptionallyComposeAsync
public static CompletionStage<Object> exceptionallyComposeAsync(CompletionStage<Object> receiver, Function<Object, Object> function, Executor executor) WeavesCompletionStage.exceptionallyComposeAsync(Function, Executor): on aCompletableFuture, asexceptionallyComposeAsync(CompletableFuture, Function, Executor); any other stage gets the caller's function unwrapped, since it may hand it back (#741).- Parameters:
receiver- the stage the function followsfunction- what runs nextexecutor- the executor the function runs on- Returns:
- the stage the caller gets
- Since:
- 1.12.4
-
supplyAsync
WeavesCompletableFuture.supplyAsync(Supplier): the supplier runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call and a join on this thread is ordered after it finished (#741). The wrapper is internal to the future and never seen.- Parameters:
supplier- the value's supplier- Returns:
- the new future
- Since:
- 1.12.3
-
supplyAsync
WeavesCompletableFuture.supplyAsync(Supplier, Executor), assupplyAsync(Supplier).- Parameters:
supplier- the value's supplierexecutor- the executor to run it on- Returns:
- the new future
- Since:
- 1.12.3
-
allOf
WeavesCompletableFuture.allOf: a join on what it returns observes every child (seeAgentHandOffHooks.HandedAll).- Parameters:
children- the futures to wait for- Returns:
- the future that completes when they all have
- Since:
- 1.14.1
-
anyOf
WeavesCompletableFuture.anyOf: a join on what it returns observes the children that have completed by then, the one that completed it among them (seeAgentHandOffHooks.HandedAll).- Parameters:
children- the futures, the first of which to complete completes the result- Returns:
- the future that completes when one of them has
- Since:
- 1.14.3
-
copy
WeavesCompletableFuture.copy(): the copy completes when the receiver does, so a join on it observes the receiver and the work behind it.- Parameters:
receiver- the future copied- Returns:
- a new future that completes with the receiver's result, remembered on this thread
- Since:
- 1.14.3
-
isDone
WeavesFuture.isDone(): atrueanswer read the completion, the read a get would have made, so the caller is ordered after the task as after a returned get. Afalseanswer orders nothing. The work stays remembered for a later get.- Parameters:
receiver- the future asked- Returns:
- whether it has completed
- Since:
- 1.14.3
-
runAsync
WeavesCompletableFuture.runAsync(Runnable), assupplyAsync(Supplier).- Parameters:
task- the work to run asynchronously, not null; it is wrapped, so its start is ordered after this call- Returns:
- the new future
- Since:
- 1.12.3
-
runAsync
WeavesCompletableFuture.runAsync(Runnable, Executor), assupplyAsync(Supplier).- Parameters:
task- the work to run onexecutor, not null; it is wrapped, so its start is ordered after this callexecutor- the executor to run it on- Returns:
- the new future
- Since:
- 1.12.3
-
asyncResultDiscarded
Stands in for thePOPafter a wovensupplyAsyncorrunAsyncwhose future the caller never kept. Nothing can join, get or handle that future afterwards, so the detector judges it at analysis by whether its task failed.- Parameters:
future- the future the caller discarded- Since:
- 1.13.2
-
runBlockingEntered
public static void runBlockingEntered()Inserted by the agent'sRunBlockingWeaverbefore each call of a KotlinrunBlocking(#1007). It substitutes nothing and takes nothing off the stack: the call that follows it is the original, made unchanged.Only
BlockingOnNonBlockingThreadDetectorhears it, which reports it on a coroutine dispatcher worker or a thread that must not block; the thread is the caller's, so arunBlockingon an ordinary thread, its intended use, reports nothing.- Since:
- 1.14.0
-
kotlinMutexLock
Weaveskotlinx.coroutines.sync.Mutex.lock(owner, continuation), the callmutex.withLock(owner) { }andmutex.lock(owner)compile to (#1007). Around the lock,KotlinMutexReentrancyDetectorlearns who holds the mutex and hears a lock that waits for its own coroutine.While a run hears it, a call with no owner is made with a fresh owner token instead, so the mutex itself can later say whether this lock still holds it (#1221). kotlinx compares owners by identity and the token matches nothing else, so the lock, an
unlock(null)and atryLockbehave exactly as with no owner. The caller'sJobis recorded with the owner, and a call that waits while the caller, or a coroutine suspended until the caller'swithContext,coroutineScopeorwithTimeoutblock completes, holds the mutex is the finding: that wait ends only with an unlock the waiting coroutine itself has to make. The Kotlin types in the real descriptor are not on the library's class path, so the hook takesObjects and calls through a handle bound to the receiver's own kotlinx.- Parameters:
mutex- the receiverowner- the owner token, ornullcontinuation- the calling coroutine's continuation- Returns:
- what
lockreturned:Unit, orCOROUTINE_SUSPENDED - Since:
- 1.14.2
-
kotlinMutexLockDefault
public static Object kotlinMutexLockDefault(Object mutex, Object owner, Object continuation, int mask, Object marker) WeavesMutex.lock$default, the call a baremutex.lock()compiles to, askotlinMutexLock(java.lang.Object, java.lang.Object, java.lang.Object). The bridge only fills in the defaulted owner,null, and callslock, so while a run hears the call it is made aslockdirectly, with the owner token; otherwise the bridge is called unchanged.- Parameters:
mutex- the receiverowner- the owner token as passed, ignored by kotlinx wheremaskomits itcontinuation- the calling coroutine's continuationmask- which parameters the call site left to their defaultsmarker- alwaysnullfrom a compiled call site- Returns:
- what
lockreturned - Since:
- 1.14.2
-
kotlinMutexUnlock
WeavesMutex.unlock(owner), a schedule point; the unlock is made unchanged. Nothing is recorded: whether a lock still holds the mutex is asked of the mutex itself, so an unlock the agent sees and one it does not end a hold alike (#1221).- Parameters:
mutex- the receiverowner- the owner token, ornull- Since:
- 1.14.2
-
kotlinMutexUnlockDefault
WeavesMutex.unlock$default, askotlinMutexUnlock(java.lang.Object, java.lang.Object).- Parameters:
mutex- the receiverowner- the owner token as passedmask- which parameters the call site left to their defaultsmarker- alwaysnullfrom a compiled call site- Since:
- 1.14.2
-
kotlinMutexTryLock
WeavesMutex.tryLock(owner)for an agent older thankotlinMutexTryLockIn(java.lang.Object, java.lang.Object, java.lang.Object), which passes no continuation: a schedule point, and the call is made unchanged. The coroutine that took the mutex cannot be named, so nothing is recorded and no lock is judged against it.- Parameters:
mutex- the receiverowner- the owner token, ornull- Returns:
- whether the mutex was taken
- Since:
- 1.14.2
-
kotlinMutexTryLockDefault
public static boolean kotlinMutexTryLockDefault(Object mutex, Object owner, int mask, Object marker) WeavesMutex.tryLock$default, askotlinMutexTryLock(java.lang.Object, java.lang.Object).- Parameters:
mutex- the receiverowner- the owner token as passedmask- which parameters the call site left to their defaultsmarker- alwaysnullfrom a compiled call site- Returns:
- whether the mutex was taken
- Since:
- 1.14.2
-
kotlinMutexTryLockIn
public static boolean kotlinMutexTryLockIn(Object mutex, Object owner, @Nullable Object continuation) WeavesMutex.tryLock(owner)where the agent could name the calling coroutine (#1220):continuationis the one of the suspend function or lambda the call is made in, which the agent passes becausetryLockitself takes none, ornullwhere it found none. While a run hears the call and the continuation names aJob, a call with no owner is made with a fresh owner token, askotlinMutexLock(java.lang.Object, java.lang.Object, java.lang.Object)does, and a mutex it takes is recorded as held by thatJob, so a laterlockby the same coroutine that waits for it is reported. AtryLockthat finds the mutex taken records nothing and never waits, so it is never itself the finding.- Parameters:
mutex- the receiverowner- the owner token, ornullcontinuation- the enclosing coroutine's continuation, ornull- Returns:
- whether the mutex was taken
- Since:
- 1.14.2
-
kotlinMutexTryLockDefaultIn
public static boolean kotlinMutexTryLockDefaultIn(Object mutex, Object owner, int mask, Object marker, @Nullable Object continuation) WeavesMutex.tryLock$default, the call a baremutex.tryLock()compiles to, askotlinMutexTryLockIn(java.lang.Object, java.lang.Object, java.lang.Object). While a run hears the call it is made astryLockdirectly, with the owner token; otherwise the bridge is called unchanged.- Parameters:
mutex- the receiverowner- the owner token as passed, ignored by kotlinx wheremaskomits itmask- which parameters the call site left to their defaultsmarker- alwaysnullfrom a compiled call sitecontinuation- the enclosing coroutine's continuation, ornull- Returns:
- whether the mutex was taken
- Since:
- 1.14.2
-
kotlinSelectInvokeIn
public static void kotlinSelectInvokeIn(Object builder, Object clause, Object block, @Nullable Object continuation) WeavesSelectBuilder.invoke(clause, block), the registration an inlinedselect { mutex.onLock { } }compiles to (#1220).continuationis the one of the suspend function or lambda theselectis written in, which the agent passes, ornullwhere it found none. While a run hears it andclauseis a mutex'sonLock, the clause is registered with a fresh owner token, askotlinMutexLock(java.lang.Object, java.lang.Object, java.lang.Object)makes a lock with no owner, and the token is recorded with the calling coroutine'sJob: the mutex then says, throughholdsLock, whether the clause was selected and still holds it, and a laterlockby the same coroutine that waits for it is reported. kotlinx compares owners by identity, so the select and anunlock(null)behave as with no owner. Every other clause, and every clause while no run hears the call, is registered unchanged. A schedule point, like every substituted call.- Parameters:
builder- the receiver, theselect's builderclause- the clause, aSelectClause2block- the clause's blockcontinuation- the enclosing coroutine's continuation, ornull- Since:
- 1.14.3
-
kotlinSelectInvokeOwnerIn
public static void kotlinSelectInvokeOwnerIn(Object builder, Object clause, Object owner, Object block, @Nullable Object continuation) WeavesSelectBuilder.invoke(clause, owner, block), the registration an inlinedselect { mutex.onLock(owner) { } }compiles to, askotlinSelectInvokeIn(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object); an owner the caller passed is kept, and the mutex is asked about that one (#1220).- Parameters:
builder- the receiver, theselect's builderclause- the clause, aSelectClause2owner- the clause's parameter: foronLock, the owner token, ornullblock- the clause's blockcontinuation- the enclosing coroutine's continuation, ornull- Since:
- 1.14.3
-
submit
WeavesExecutorService.submit(Callable): submitted to ajava.util.concurrentexecutor, the task runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call and a get on this thread is ordered after it finished (#741).Only the JDK's own executors get the wrapper, because only there is it invisible: they wrap every submitted task in a future of their own, and nothing a caller can reach returns the task. A user's executor may override
newTaskForand inspect the task, and aForkJoinTaskis run differently from any other, so both keep the task as it was.- Parameters:
receiver- the executortask- the work submitted, not null; on a JDK executor it is wrapped, so its run is ordered after this call and a get after its end- Returns:
- the task's future
- Since:
- 1.12.3
-
submit
WeavesExecutorService.submit(Runnable), assubmit(ExecutorService, Callable).- Parameters:
receiver- the executortask- the work submitted, not null; on a JDK executor it is wrapped, as in theCallableform- Returns:
- the task's future
- Since:
- 1.12.3
-
submit
public static Future<Object> submit(ExecutorService receiver, Runnable task, @Nullable Object result) WeavesExecutorService.submit(Runnable, Object), assubmit(ExecutorService, Callable).- Parameters:
receiver- the executortask- the work submitted, not null; on a JDK executor it is wrapped, as in theCallableformresult- what the future returns- Returns:
- the task's future
- Since:
- 1.12.3
-
submitResultDiscarded
Stands in for thePOPafter a wovensubmitwhose future the caller never kept. Nothing can inspect that future afterwards, so the detector judges it at analysis by whether its task failed.- Parameters:
future- the future the caller discarded- Since:
- 1.13.2
-
schedule
public static ScheduledFuture<?> schedule(ScheduledExecutorService receiver, Runnable task, long delay, TimeUnit unit) Weaves the one-shotScheduledExecutorService.schedule(Runnable, long, TimeUnit): the task is scheduled unchanged. Like a submit, its future is judged only when the caller pops it, which the weaver turns intoscheduleResultDiscarded(java.util.concurrent.ScheduledFuture<?>)(#1281).- Parameters:
receiver- the schedulertask- the task, scheduled unchangeddelay- the delay before it runsunit- the unit of the delay- Returns:
- the task's future
- Since:
- 1.14.4
-
schedule
public static ScheduledFuture<Object> schedule(ScheduledExecutorService receiver, Callable<Object> task, long delay, TimeUnit unit) Weaves the one-shotScheduledExecutorService.schedule(Callable, long, TimeUnit), asschedule(ScheduledExecutorService, Runnable, long, TimeUnit)(#1281).- Parameters:
receiver- the schedulertask- the task, scheduled unchangeddelay- the delay before it runsunit- the unit of the delay- Returns:
- the task's future
- Since:
- 1.14.4
-
scheduleResultDiscarded
Stands in for thePOPafter a woven one-shotschedule: the caller discarded the future, so nothing can ever read the task's exception, and the ignored-future detector reports it at analysis if the task threw, as forsubmitResultDiscarded(java.util.concurrent.Future<?>)(#1281). A task still pending at analysis, such as one delayed past the run's end, draws nothing.- Parameters:
future- the future the caller discarded- Since:
- 1.14.4
-
scheduleAtFixedRate
public static ScheduledFuture<?> scheduleAtFixedRate(ScheduledExecutorService receiver, Runnable task, long initialDelay, long period, TimeUnit unit) WeavesScheduledExecutorService.scheduleAtFixedRate: the task is scheduled as it was, and its future is handed to the ignored-future detector, which reports it at analysis if the task threw, since the executor then cancels every later run and nobody reads a periodic task's future (#1254).- Parameters:
receiver- the schedulertask- the periodic task, scheduled unchangedinitialDelay- the delay before the first runperiod- the period between the starts of runsunit- the unit of both- Returns:
- the task's future
- Since:
- 1.14.3
-
scheduleWithFixedDelay
public static ScheduledFuture<?> scheduleWithFixedDelay(ScheduledExecutorService receiver, Runnable task, long initialDelay, long delay, TimeUnit unit) WeavesScheduledExecutorService.scheduleWithFixedDelay, asscheduleAtFixedRate(java.util.concurrent.ScheduledExecutorService, java.lang.Runnable, long, long, java.util.concurrent.TimeUnit).- Parameters:
receiver- the schedulertask- the periodic task, scheduled unchangedinitialDelay- the delay before the first rundelay- the delay between the end of one run and the start of the nextunit- the unit of both- Returns:
- the task's future
- Since:
- 1.14.3
-
newFixedThreadPool
WeavesExecutors.newFixedThreadPool(int): the pool is declared as the run's own.- Parameters:
threads- the number of threads- Returns:
- the new pool
- Since:
- 1.13.2
-
newFixedThreadPool
WeavesExecutors.newFixedThreadPool(int, ThreadFactory), asnewFixedThreadPool(int).- Parameters:
threads- the number of threadsfactory- the thread factory- Returns:
- the new pool
- Since:
- 1.13.2
-
newCachedThreadPool
WeavesExecutors.newCachedThreadPool(), asnewFixedThreadPool(int).- Returns:
- the new pool
- Since:
- 1.13.2
-
newCachedThreadPool
WeavesExecutors.newCachedThreadPool(ThreadFactory), asnewFixedThreadPool(int).- Parameters:
factory- the thread factory- Returns:
- the new pool
- Since:
- 1.13.2
-
newSingleThreadExecutor
WeavesExecutors.newSingleThreadExecutor(), asnewFixedThreadPool(int).- Returns:
- the new executor
- Since:
- 1.13.2
-
newSingleThreadExecutor
WeavesExecutors.newSingleThreadExecutor(ThreadFactory), asnewFixedThreadPool(int).- Parameters:
factory- the thread factory- Returns:
- the new executor
- Since:
- 1.13.2
-
newScheduledThreadPool
WeavesExecutors.newScheduledThreadPool(int), asnewFixedThreadPool(int).- Parameters:
coreThreads- the number of threads kept in the pool- Returns:
- the new pool
- Since:
- 1.13.2
-
newScheduledThreadPool
public static ScheduledExecutorService newScheduledThreadPool(int coreThreads, ThreadFactory factory) WeavesExecutors.newScheduledThreadPool(int, ThreadFactory), asnewFixedThreadPool(int).- Parameters:
coreThreads- the number of threads kept in the poolfactory- the thread factory- Returns:
- the new pool
- Since:
- 1.13.2
-
newSingleThreadScheduledExecutor
WeavesExecutors.newSingleThreadScheduledExecutor(), asnewFixedThreadPool(int).- Returns:
- the new executor
- Since:
- 1.13.2
-
newSingleThreadScheduledExecutor
WeavesExecutors.newSingleThreadScheduledExecutor(ThreadFactory), asnewFixedThreadPool(int).- Parameters:
factory- the thread factory- Returns:
- the new executor
- Since:
- 1.13.2
-
newWorkStealingPool
WeavesExecutors.newWorkStealingPool(), asnewFixedThreadPool(int).- Returns:
- the new pool
- Since:
- 1.13.2
-
newWorkStealingPool
WeavesExecutors.newWorkStealingPool(int), asnewFixedThreadPool(int).- Parameters:
parallelism- the targeted parallelism level- Returns:
- the new pool
- Since:
- 1.13.2
-
newVirtualThreadPerTaskExecutor
WeavesExecutors.newVirtualThreadPerTaskExecutor(), asnewFixedThreadPool(int).- Returns:
- the new executor
- Since:
- 1.13.2
-
newThreadPerTaskExecutor
WeavesExecutors.newThreadPerTaskExecutor(ThreadFactory), asnewFixedThreadPool(int).- Parameters:
factory- the factory each task's thread comes from- Returns:
- the new executor
- Since:
- 1.13.2
-
unconfigurableExecutorService
WeavesExecutors.unconfigurableExecutorService(ExecutorService): remembers what the wrapper forwards to, so a wovenexecuteon it decides by the executor behind it (#1107). kotlinx'snewSingleThreadContextwraps aScheduledThreadPoolExecutorthis way, and without the look-through nothing its thread did reached a detector.- Parameters:
executor- the executor to wrap- Returns:
- what the JDK returns
- Since:
- 1.14.1
-
unconfigurableScheduledExecutorService
public static ScheduledExecutorService unconfigurableScheduledExecutorService(ScheduledExecutorService executor) WeavesExecutors.unconfigurableScheduledExecutorService(ScheduledExecutorService), asunconfigurableExecutorService(java.util.concurrent.ExecutorService).- Parameters:
executor- the executor to wrap- Returns:
- what the JDK returns
- Since:
- 1.14.1
-
exchange
public static @Nullable Object exchange(Exchanger<Object> receiver, @Nullable Object item) throws InterruptedException WeavesExchanger.exchange(Object): this thread's accesses are published through the object it hands over, and it receives what its partner published through the one it got back (#741). An exchange that threw handed nothing over, and its release is withdrawn.- Parameters:
receiver- the exchangeritem- the object handed over- Returns:
- the partner's object
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.12.3
-
exchange
public static @Nullable Object exchange(Exchanger<Object> receiver, @Nullable Object item, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException WeavesExchanger.exchange(Object, long, TimeUnit), asexchange(Exchanger, Object); one that timed out handed nothing over.- Parameters:
receiver- the exchangeritem- the object handed overtimeout- how long to wait for a partnerunit- the unit oftimeout- Returns:
- the partner's object
- Throws:
InterruptedException- if interrupted while waitingTimeoutException- if no partner arrived in time- Since:
- 1.12.3
-
execute
WeavesExecutor.execute(Runnable)(#741, #834): on an executor that never hands the task back, the task runs as aAgentHandOffHooks.HandedTask, so it starts ordered after this call, and the thread running it is attributed to the run while it does. There is no future, so nothing is ordered after the task.Only the JDK's own
ForkJoinPool,ScheduledThreadPoolExecutorand the thread-per-task executor behindExecutors.newVirtualThreadPerTaskExecutor()qualify, by exact class: the first runs it inside its own adapter and returns no queued task fromshutdownNow, the second queues its own futures, and the third queues nothing. AThreadPoolExecutorqualifies too, inside a run (#1155), and so does a subclass that overrides none of the methods a task reaches (#1173), and a wrapperExecutorsbuilt around any of these (#1107, #1269); seeexecutesInvisibly(java.util.concurrent.Executor). Any other subclass's tasks are left alone, since itsbeforeExecutewould see the wrapper, as are those of any executor outside the JDK's.- Parameters:
receiver- the executor the call site invokedcommand- what to run; the executor rejectsnull- Since:
- 1.12.4
-
streamForEach
WeavesStream.forEach: seeAgentConcurrencyUtilHooks.ParallelForEach. A sequential stream, or one outside a run, takes the call as it was (#1156).- Parameters:
receiver- the streamaction- what to run for each element- Since:
- 1.14.1
-
concurrentMapForEach
public static void concurrentMapForEach(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, BiConsumer<Object, Object> action) WeavesConcurrentHashMap.forEach(long, BiConsumer): the common pool's workers run the action once the map holds at leastparallelismThresholdmappings, so each runs as an element of aAgentConcurrencyUtilHooks.ParallelForEach. Outside a run the call is as it was.- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the poolaction- what to run for each mapping- Since:
- 1.14.3
-
concurrentMapForEachKey
public static void concurrentMapForEachKey(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Object> action) WeavesConcurrentHashMap.forEachKey(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the poolaction- what to run for each key- Since:
- 1.14.3
-
concurrentMapForEachValue
public static void concurrentMapForEachValue(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Object> action) WeavesConcurrentHashMap.forEachValue(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the poolaction- what to run for each value- Since:
- 1.14.3
-
concurrentMapForEachEntry
public static void concurrentMapForEachEntry(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Consumer<Map.Entry<Object, Object>> action) WeavesConcurrentHashMap.forEachEntry(long, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the poolaction- what to run for each entry- Since:
- 1.14.3
-
concurrentMapForEach
public static void concurrentMapForEach(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, BiFunction<Object, Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEach(long, BiFunction, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>): the transformer and the action each run as an element.- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the pooltransformer- what turns each mapping into the action's input, or null to skip itaction- what to run for each non-null transformation- Since:
- 1.14.3
-
concurrentMapForEachKey
public static void concurrentMapForEachKey(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachKey(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the pooltransformer- what turns each key into the action's input, or null to skip itaction- what to run for each non-null transformation- Since:
- 1.14.3
-
concurrentMapForEachValue
public static void concurrentMapForEachValue(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Object, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachValue(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the pooltransformer- what turns each value into the action's input, or null to skip itaction- what to run for each non-null transformation- Since:
- 1.14.3
-
concurrentMapForEachEntry
public static void concurrentMapForEachEntry(ConcurrentHashMap<Object, Object> receiver, long parallelismThreshold, Function<Map.Entry<Object, Object>, Object> transformer, Consumer<Object> action) WeavesConcurrentHashMap.forEachEntry(long, Function, Consumer), asconcurrentMapForEach(java.util.concurrent.ConcurrentHashMap<java.lang.Object, java.lang.Object>, long, java.util.function.BiConsumer<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the mapparallelismThreshold- the size from which the map splits the work across the pooltransformer- what turns each entry into the action's input, or null to skip itaction- what to run for each non-null transformation- Since:
- 1.14.3
-
arraysParallelSetAll
WeavesArrays.parallelSetAll(Object[], IntFunction): the common pool's workers call the generator, so each call runs as an element of aAgentConcurrencyUtilHooks.ParallelForEach. Outside a run the call is as it was.- Parameters:
array- the array to fillgenerator- what computes the value at each index- Since:
- 1.14.3
-
arraysParallelSetAll
WeavesArrays.parallelSetAll(int[], IntUnaryOperator), as theObject[]form.- Parameters:
array- the array to fillgenerator- what computes the value at each index- Since:
- 1.14.3
-
arraysParallelSetAll
WeavesArrays.parallelSetAll(long[], IntToLongFunction), as theObject[]form.- Parameters:
array- the array to fillgenerator- what computes the value at each index- Since:
- 1.14.3
-
arraysParallelSetAll
WeavesArrays.parallelSetAll(double[], IntToDoubleFunction), as theObject[]form.- Parameters:
array- the array to fillgenerator- what computes the value at each index- Since:
- 1.14.3
-
streamMap
WeavesStream.map: seeAgentConcurrencyUtilHooks.StageSlot. Outside a run the call is as it was.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
streamFilter
WeavesStream.filter, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the streampredicate- what keeps an element- Returns:
- the filtered stream
- Since:
- 1.14.2
-
streamPeek
WeavesStream.peek, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element as it passes- Returns:
- the peeked stream
- Since:
- 1.14.2
-
streamForEachOrdered
WeavesStream.forEachOrdered, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>), with each action ordered after the one before it (AgentConcurrencyUtilHooks.ParallelForEach.ordered(java.lang.Runnable)).- Parameters:
receiver- the streamaction- what to run for each element, in encounter order- Since:
- 1.14.2
-
streamCollect
public static Object streamCollect(Stream<Object> receiver, Collector<? super Object, ?, ?> collector) WeavesStream.collect(Collector): the pipeline's woven stages run as its elements. The collector's own functions are left as they are; the JDK's run no woven code.- Parameters:
receiver- the streamcollector- what accumulates the elements, run as it is- Returns:
- what the collector produced
- Since:
- 1.14.2
-
streamCollect
public static Object streamCollect(Stream<Object> receiver, Supplier<Object> supplier, BiConsumer<Object, Object> accumulator, BiConsumer<Object, Object> combiner) WeavesStream.collect(Supplier, BiConsumer, BiConsumer): supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.- Parameters:
receiver- the streamsupplier- makes a containeraccumulator- adds an element to onecombiner- merges two- Returns:
- the container
- Since:
- 1.14.2
-
streamReduce
public static Optional<Object> streamReduce(Stream<Object> receiver, BinaryOperator<Object> accumulator) WeavesStream.reduce(BinaryOperator): the accumulator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).- Parameters:
receiver- the streamaccumulator- combines two values- Returns:
- the reduction, if any element
- Since:
- 1.14.2
-
streamReduce
public static Object streamReduce(Stream<Object> receiver, Object identity, BinaryOperator<Object> accumulator) WeavesStream.reduce(Object, BinaryOperator), asstreamReduce(Stream, BinaryOperator).- Parameters:
receiver- the streamidentity- the identity valueaccumulator- combines two values- Returns:
- the reduction
- Since:
- 1.14.2
-
streamReduce
public static Object streamReduce(Stream<Object> receiver, Object identity, BiFunction<Object, Object, Object> accumulator, BinaryOperator<Object> combiner) WeavesStream.reduce(Object, BiFunction, BinaryOperator): the accumulator runs as an element and the combiner as a combine.- Parameters:
receiver- the streamidentity- the identity valueaccumulator- folds an element into a partial resultcombiner- merges two partial results- Returns:
- the reduction
- Since:
- 1.14.2
-
streamMin
WeavesStream.min(Comparator): the comparator runs as a combine, since it compares elements other subtasks produced.- Parameters:
receiver- the streamcomparator- orders two values- Returns:
- the least, if any element
- Since:
- 1.14.2
-
streamMax
WeavesStream.max(Comparator), asstreamMin(java.util.stream.Stream<java.lang.Object>, java.util.Comparator<java.lang.Object>).- Parameters:
receiver- the streamcomparator- orders two values- Returns:
- the greatest, if any element
- Since:
- 1.14.2
-
streamAnyMatch
WeavesStream.anyMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether any element passed
- Since:
- 1.14.2
-
streamAllMatch
WeavesStream.allMatch, asstreamAnyMatch(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).- Parameters:
receiver- the streampredicate- the test- Returns:
- whether every element passed
- Since:
- 1.14.2
-
streamNoneMatch
WeavesStream.noneMatch, asstreamAnyMatch(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).- Parameters:
receiver- the streampredicate- the test- Returns:
- whether no element passed
- Since:
- 1.14.2
-
streamToList
WeavesStream.toList(): the pipeline's woven stages run as its elements.- Parameters:
receiver- the stream- Returns:
- the elements
- Since:
- 1.14.2
-
streamToArray
WeavesStream.toArray(), asstreamToList(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- the elements
- Since:
- 1.14.2
-
streamToArray
WeavesStream.toArray(IntFunction), asstreamToList(java.util.stream.Stream<java.lang.Object>); the generator is the array constructor nearly always and is left as it is.- Parameters:
receiver- the streamgenerator- makes the array- Returns:
- the elements
- Since:
- 1.14.2
-
streamCount
WeavesStream.count(), asstreamToList(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- how many elements
- Since:
- 1.14.2
-
streamFindFirst
WeavesStream.findFirst(), asstreamToList(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- the first element, if any
- Since:
- 1.14.2
-
streamFindAny
WeavesStream.findAny(), asstreamToList(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- some element, if any
- Since:
- 1.14.2
-
intStreamForEach
WeavesIntStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element- Since:
- 1.14.1
-
longStreamForEach
WeavesLongStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element- Since:
- 1.14.1
-
doubleStreamForEach
WeavesDoubleStream.forEach, asstreamForEach(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element- Since:
- 1.14.1
-
streamSorted
WeavesStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
streamDistinct
WeavesStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
streamLimit
WeavesStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streammaxSize- how many to keep- Returns:
- the stream
- Since:
- 1.14.2
-
streamSkip
WeavesStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streamn- how many to drop- Returns:
- the stream
- Since:
- 1.14.2
-
streamParallel
WeavesStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream; declared by
BaseStream, so the call site expects one - Since:
- 1.14.2
-
streamSequential
WeavesStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream; declared by
BaseStream, so the call site expects one - Since:
- 1.14.2
-
streamUnordered
WeavesStream.unordered: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream; declared by
BaseStream, so the call site expects one - Since:
- 1.14.2
-
streamSorted
WeavesStream.sorted: the comparator runs as a combine, since a parallel sort compares elements other subtasks produced.- Parameters:
receiver- the streamcomparator- orders two elements; the sort calls it on pool workers- Returns:
- the stream it returns
- Since:
- 1.14.2
-
streamFlatMap
public static Stream<Object> streamFlatMap(Stream<Object> receiver, Function<Object, Stream<Object>> mapper) WeavesStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
streamMapMulti
public static Stream<Object> streamMapMulti(Stream<Object> receiver, BiConsumer<Object, Consumer<Object>> mapper) WeavesStream.mapMulti: the mapper runs as an element, and the values it passes on go downstream inside it (#1172).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
streamMapMultiToInt
public static IntStream streamMapMultiToInt(Stream<Object> receiver, BiConsumer<Object, IntConsumer> mapper) WeavesStream.mapMultiToInt, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
streamMapMultiToLong
public static LongStream streamMapMultiToLong(Stream<Object> receiver, BiConsumer<Object, LongConsumer> mapper) WeavesStream.mapMultiToLong, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
streamMapMultiToDouble
public static DoubleStream streamMapMultiToDouble(Stream<Object> receiver, BiConsumer<Object, DoubleConsumer> mapper) WeavesStream.mapMultiToDouble, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
intStreamMapMulti
WeavesIntStream.mapMulti, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
longStreamMapMulti
public static LongStream longStreamMapMulti(LongStream receiver, LongStream.LongMapMultiConsumer mapper) WeavesLongStream.mapMulti, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
doubleStreamMapMulti
public static DoubleStream doubleStreamMapMulti(DoubleStream receiver, DoubleStream.DoubleMapMultiConsumer mapper) WeavesDoubleStream.mapMulti, asstreamMapMulti(java.util.stream.Stream<java.lang.Object>, java.util.function.BiConsumer<java.lang.Object, java.util.function.Consumer<java.lang.Object>>).- Parameters:
receiver- the streammapper- the function given each element and the sink for what it maps to- Returns:
- the stream it returns
- Since:
- 1.14.3
-
intStreamUnordered
WeavesIntStream.unordered, whichIntStreaminherits fromBaseStream: it runs no lambda of its own and carries the woven stages behind it (#1172).- Parameters:
receiver- the stream- Returns:
- the stream it returns
- Since:
- 1.14.3
-
longStreamUnordered
WeavesLongStream.unordered, asintStreamUnordered(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the stream it returns
- Since:
- 1.14.3
-
doubleStreamUnordered
WeavesDoubleStream.unordered, asintStreamUnordered(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the stream it returns
- Since:
- 1.14.3
-
streamOnClose
WeavesStream.onClose: the close handler runs atclose(), not in the pipeline, so it carries the woven stages behind it like a stage with no lambda (#1172).- Parameters:
receiver- the streamcloseHandler- whatclose()runs- Returns:
- the stream it returns
- Since:
- 1.14.3
-
intStreamOnClose
WeavesIntStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).- Parameters:
receiver- the streamcloseHandler- whatclose()runs- Returns:
- the stream it returns
- Since:
- 1.14.3
-
longStreamOnClose
WeavesLongStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).- Parameters:
receiver- the streamcloseHandler- whatclose()runs- Returns:
- the stream it returns
- Since:
- 1.14.3
-
doubleStreamOnClose
WeavesDoubleStream.onClose, asstreamOnClose(java.util.stream.Stream<java.lang.Object>, java.lang.Runnable).- Parameters:
receiver- the streamcloseHandler- whatclose()runs- Returns:
- the stream it returns
- Since:
- 1.14.3
-
streamIterator
WeavesStream.iterator(): seeAgentConcurrencyUtilHooks.LentPipeline. A sequential pipeline, one with no woven stage, or one outside a run is iterated as it was.- Parameters:
receiver- the stream- Returns:
- the iterator over its elements
- Since:
- 1.14.3
-
intStreamIterator
WeavesIntStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- the iterator over its elements
- Since:
- 1.14.3
-
longStreamIterator
WeavesLongStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- the iterator over its elements
- Since:
- 1.14.3
-
doubleStreamIterator
WeavesDoubleStream.iterator(), asstreamIterator(java.util.stream.Stream<java.lang.Object>).- Parameters:
receiver- the stream- Returns:
- the iterator over its elements
- Since:
- 1.14.3
-
streamTakeWhile
WeavesStream.takeWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
streamDropWhile
WeavesStream.dropWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamSorted
WeavesIntStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamDistinct
WeavesIntStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamLimit
WeavesIntStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streammaxSize- how many to keep- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamSkip
WeavesIntStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streamn- how many to drop- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamParallel
WeavesIntStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamSequential
WeavesIntStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamFlatMap
WeavesIntStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamTakeWhile
WeavesIntStream.takeWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamDropWhile
WeavesIntStream.dropWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamMapToLong
WeavesIntStream.mapToLong: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedLongStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamMapToDouble
WeavesIntStream.mapToDouble: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedDoubleStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
intStreamAsLongStream
WeavesIntStream.asLongStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
intStreamAsDoubleStream
WeavesIntStream.asDoubleStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamSorted
WeavesLongStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamDistinct
WeavesLongStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamLimit
WeavesLongStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streammaxSize- how many to keep- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamSkip
WeavesLongStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streamn- how many to drop- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamParallel
WeavesLongStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamSequential
WeavesLongStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
longStreamFlatMap
WeavesLongStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
longStreamTakeWhile
WeavesLongStream.takeWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
longStreamDropWhile
WeavesLongStream.dropWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
longStreamMapToInt
WeavesLongStream.mapToInt: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedIntStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
longStreamMapToDouble
WeavesLongStream.mapToDouble: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedDoubleStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
longStreamAsDoubleStream
WeavesLongStream.asDoubleStream: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamSorted
WeavesDoubleStream.sorted: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamDistinct
WeavesDoubleStream.distinct: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamLimit
WeavesDoubleStream.limit: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streammaxSize- how many to keep- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamSkip
WeavesDoubleStream.skip: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the streamn- how many to drop- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamParallel
WeavesDoubleStream.parallel: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamSequential
WeavesDoubleStream.sequential: it runs no lambda of its own and carries the woven stages behind it to the stream it returns, so the terminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the stream
- Since:
- 1.14.2
-
doubleStreamFlatMap
public static DoubleStream doubleStreamFlatMap(DoubleStream receiver, DoubleFunction<DoubleStream> mapper) WeavesDoubleStream.flatMap: the mapper runs as an element; the stream it returns is consumed inside that element.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
doubleStreamTakeWhile
WeavesDoubleStream.takeWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
doubleStreamDropWhile
WeavesDoubleStream.dropWhile: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
doubleStreamMapToInt
WeavesDoubleStream.mapToInt: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedIntStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
doubleStreamMapToLong
WeavesDoubleStream.mapToLong: the mapper runs as an element, and the stages behind it stay in the pipeline the returnedLongStreamends.- Parameters:
receiver- the streammapper- the lambda given to each element- Returns:
- the stream it returns
- Since:
- 1.14.2
-
streamMapToInt
WeavesStream.mapToInt, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedIntStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
streamMapToLong
WeavesStream.mapToLong, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedLongStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
streamMapToDouble
public static DoubleStream streamMapToDouble(Stream<Object> receiver, ToDoubleFunction<Object> mapper) WeavesStream.mapToDouble, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedDoubleStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
intStreamMap
WeavesIntStream.map, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>): the operator waits in a slot the terminal operation lends the run to.- Parameters:
receiver- the streammapper- the operator given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
intStreamFilter
WeavesIntStream.filter, asstreamFilter(java.util.stream.Stream<java.lang.Object>, java.util.function.Predicate<java.lang.Object>).- Parameters:
receiver- the streampredicate- what keeps an element- Returns:
- the filtered stream
- Since:
- 1.14.2
-
intStreamPeek
WeavesIntStream.peek, asstreamPeek(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element as it passes- Returns:
- the peeked stream
- Since:
- 1.14.2
-
intStreamMapToObj
WeavesIntStream.mapToObj, asstreamMap(java.util.stream.Stream<java.lang.Object>, java.util.function.Function<java.lang.Object, java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
intStreamBoxed
WeavesIntStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the elements as
Integer - Since:
- 1.14.2
-
intStreamForEachOrdered
WeavesIntStream.forEachOrdered, asstreamForEachOrdered(java.util.stream.Stream<java.lang.Object>, java.util.function.Consumer<java.lang.Object>).- Parameters:
receiver- the streamaction- what to run for each element, in encounter order- Since:
- 1.14.2
-
intStreamReduce
WeavesIntStream.reduce(int, IntBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).- Parameters:
receiver- the streamidentity- the identity valueoperator- combines two values- Returns:
- the reduction
- Since:
- 1.14.2
-
intStreamReduce
WeavesIntStream.reduce(IntBinaryOperator), as the reduce with an identity.- Parameters:
receiver- the streamoperator- combines two values- Returns:
- the reduction, if any element
- Since:
- 1.14.2
-
intStreamCollect
public static Object intStreamCollect(IntStream receiver, Supplier<Object> supplier, ObjIntConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesIntStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.- Parameters:
receiver- the streamsupplier- makes a containeraccumulator- adds an element to onecombiner- merges two- Returns:
- the container
- Since:
- 1.14.2
-
intStreamAnyMatch
WeavesIntStream.anyMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether any element passed
- Since:
- 1.14.2
-
intStreamAllMatch
WeavesIntStream.allMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether every element passed
- Since:
- 1.14.2
-
intStreamNoneMatch
WeavesIntStream.noneMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether no element passed
- Since:
- 1.14.2
-
intStreamSum
WeavesIntStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.- Parameters:
receiver- the stream- Returns:
- the sum of the elements
- Since:
- 1.14.2
-
intStreamCount
WeavesIntStream.count(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- how many elements
- Since:
- 1.14.2
-
intStreamAverage
WeavesIntStream.average(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the mean, if any element
- Since:
- 1.14.2
-
intStreamMin
WeavesIntStream.min(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the least, if any element
- Since:
- 1.14.2
-
intStreamMax
WeavesIntStream.max(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the greatest, if any element
- Since:
- 1.14.2
-
intStreamSummaryStatistics
WeavesIntStream.summaryStatistics(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- count, sum, least, greatest and mean
- Since:
- 1.14.2
-
intStreamToArray
WeavesIntStream.toArray(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the elements
- Since:
- 1.14.2
-
intStreamFindFirst
WeavesIntStream.findFirst(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- the first element, if any
- Since:
- 1.14.2
-
intStreamFindAny
WeavesIntStream.findAny(), asintStreamSum(java.util.stream.IntStream).- Parameters:
receiver- the stream- Returns:
- some element, if any
- Since:
- 1.14.2
-
longStreamMap
WeavesLongStream.map, asintStreamMap(java.util.stream.IntStream, java.util.function.IntUnaryOperator): the operator waits in a slot the terminal operation lends the run to.- Parameters:
receiver- the streammapper- the operator given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
longStreamFilter
WeavesLongStream.filter, asintStreamFilter(java.util.stream.IntStream, java.util.function.IntPredicate).- Parameters:
receiver- the streampredicate- what keeps an element- Returns:
- the filtered stream
- Since:
- 1.14.2
-
longStreamPeek
WeavesLongStream.peek, asintStreamPeek(java.util.stream.IntStream, java.util.function.IntConsumer).- Parameters:
receiver- the streamaction- what to run for each element as it passes- Returns:
- the peeked stream
- Since:
- 1.14.2
-
longStreamMapToObj
WeavesLongStream.mapToObj, asintStreamMapToObj(java.util.stream.IntStream, java.util.function.IntFunction<java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
longStreamBoxed
WeavesLongStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the elements as
Long - Since:
- 1.14.2
-
longStreamForEachOrdered
WeavesLongStream.forEachOrdered, asintStreamForEachOrdered(java.util.stream.IntStream, java.util.function.IntConsumer).- Parameters:
receiver- the streamaction- what to run for each element, in encounter order- Since:
- 1.14.2
-
longStreamReduce
public static long longStreamReduce(LongStream receiver, long identity, LongBinaryOperator operator) WeavesLongStream.reduce(long, LongBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).- Parameters:
receiver- the streamidentity- the identity valueoperator- combines two values- Returns:
- the reduction
- Since:
- 1.14.2
-
longStreamReduce
WeavesLongStream.reduce(LongBinaryOperator), as the reduce with an identity.- Parameters:
receiver- the streamoperator- combines two values- Returns:
- the reduction, if any element
- Since:
- 1.14.2
-
longStreamCollect
public static Object longStreamCollect(LongStream receiver, Supplier<Object> supplier, ObjLongConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesLongStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.- Parameters:
receiver- the streamsupplier- makes a containeraccumulator- adds an element to onecombiner- merges two- Returns:
- the container
- Since:
- 1.14.2
-
longStreamAnyMatch
WeavesLongStream.anyMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether any element passed
- Since:
- 1.14.2
-
longStreamAllMatch
WeavesLongStream.allMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether every element passed
- Since:
- 1.14.2
-
longStreamNoneMatch
WeavesLongStream.noneMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether no element passed
- Since:
- 1.14.2
-
longStreamSum
WeavesLongStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.- Parameters:
receiver- the stream- Returns:
- the sum of the elements
- Since:
- 1.14.2
-
longStreamCount
WeavesLongStream.count(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- how many elements
- Since:
- 1.14.2
-
longStreamAverage
WeavesLongStream.average(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- the mean, if any element
- Since:
- 1.14.2
-
longStreamMin
WeavesLongStream.min(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- the least, if any element
- Since:
- 1.14.2
-
longStreamMax
WeavesLongStream.max(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- the greatest, if any element
- Since:
- 1.14.2
-
longStreamSummaryStatistics
WeavesLongStream.summaryStatistics(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- count, sum, least, greatest and mean
- Since:
- 1.14.2
-
longStreamToArray
WeavesLongStream.toArray(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- the elements
- Since:
- 1.14.2
-
longStreamFindFirst
WeavesLongStream.findFirst(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- the first element, if any
- Since:
- 1.14.2
-
longStreamFindAny
WeavesLongStream.findAny(), aslongStreamSum(java.util.stream.LongStream).- Parameters:
receiver- the stream- Returns:
- some element, if any
- Since:
- 1.14.2
-
doubleStreamMap
WeavesDoubleStream.map, asintStreamMap(java.util.stream.IntStream, java.util.function.IntUnaryOperator): the operator waits in a slot the terminal operation lends the run to.- Parameters:
receiver- the streammapper- the operator given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
doubleStreamFilter
WeavesDoubleStream.filter, asintStreamFilter(java.util.stream.IntStream, java.util.function.IntPredicate).- Parameters:
receiver- the streampredicate- what keeps an element- Returns:
- the filtered stream
- Since:
- 1.14.2
-
doubleStreamPeek
WeavesDoubleStream.peek, asintStreamPeek(java.util.stream.IntStream, java.util.function.IntConsumer).- Parameters:
receiver- the streamaction- what to run for each element as it passes- Returns:
- the peeked stream
- Since:
- 1.14.2
-
doubleStreamMapToObj
public static Stream<Object> doubleStreamMapToObj(DoubleStream receiver, DoubleFunction<Object> mapper) WeavesDoubleStream.mapToObj, asintStreamMapToObj(java.util.stream.IntStream, java.util.function.IntFunction<java.lang.Object>); the stages behind it stay in the pipeline the returnedStreamends.- Parameters:
receiver- the streammapper- the function given to each element- Returns:
- the mapped stream
- Since:
- 1.14.2
-
doubleStreamBoxed
WeavesDoubleStream.boxed: it adds no lambda of its own, and carries the stages behind it to theStreamit returns, so a wovenStreamterminal operation still lends them the run.- Parameters:
receiver- the stream- Returns:
- the elements as
Double - Since:
- 1.14.2
-
doubleStreamForEachOrdered
WeavesDoubleStream.forEachOrdered, asintStreamForEachOrdered(java.util.stream.IntStream, java.util.function.IntConsumer).- Parameters:
receiver- the streamaction- what to run for each element, in encounter order- Since:
- 1.14.2
-
doubleStreamReduce
public static double doubleStreamReduce(DoubleStream receiver, double identity, DoubleBinaryOperator operator) WeavesDoubleStream.reduce(double, DoubleBinaryOperator): the operator runs as a combine, since it also merges partial results other subtasks built (AgentConcurrencyUtilHooks.ParallelForEach.combined(java.lang.Runnable)).- Parameters:
receiver- the streamidentity- the identity valueoperator- combines two values- Returns:
- the reduction
- Since:
- 1.14.2
-
doubleStreamReduce
public static OptionalDouble doubleStreamReduce(DoubleStream receiver, DoubleBinaryOperator operator) WeavesDoubleStream.reduce(DoubleBinaryOperator), as the reduce with an identity.- Parameters:
receiver- the streamoperator- combines two values- Returns:
- the reduction, if any element
- Since:
- 1.14.2
-
doubleStreamCollect
public static Object doubleStreamCollect(DoubleStream receiver, Supplier<Object> supplier, ObjDoubleConsumer<Object> accumulator, BiConsumer<Object, Object> combiner) WeavesDoubleStream.collect: supplier and accumulator run as elements, and the combiner, which merges containers other subtasks filled, as a combine.- Parameters:
receiver- the streamsupplier- makes a containeraccumulator- adds an element to onecombiner- merges two- Returns:
- the container
- Since:
- 1.14.2
-
doubleStreamAnyMatch
WeavesDoubleStream.anyMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether any element passed
- Since:
- 1.14.2
-
doubleStreamAllMatch
WeavesDoubleStream.allMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether every element passed
- Since:
- 1.14.2
-
doubleStreamNoneMatch
WeavesDoubleStream.noneMatch: the predicate runs as an element.- Parameters:
receiver- the streampredicate- the test- Returns:
- whether no element passed
- Since:
- 1.14.2
-
doubleStreamSum
WeavesDoubleStream.sum(): the pipeline's woven stages run as its elements, and the caller is ordered after them once it returns.- Parameters:
receiver- the stream- Returns:
- the sum of the elements
- Since:
- 1.14.2
-
doubleStreamCount
WeavesDoubleStream.count(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- how many elements
- Since:
- 1.14.2
-
doubleStreamAverage
WeavesDoubleStream.average(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- the mean, if any element
- Since:
- 1.14.2
-
doubleStreamMin
WeavesDoubleStream.min(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- the least, if any element
- Since:
- 1.14.2
-
doubleStreamMax
WeavesDoubleStream.max(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- the greatest, if any element
- Since:
- 1.14.2
-
doubleStreamSummaryStatistics
WeavesDoubleStream.summaryStatistics(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- count, sum, least, greatest and mean
- Since:
- 1.14.2
-
doubleStreamToArray
WeavesDoubleStream.toArray(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- the elements
- Since:
- 1.14.2
-
doubleStreamFindFirst
WeavesDoubleStream.findFirst(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- the first element, if any
- Since:
- 1.14.2
-
doubleStreamFindAny
WeavesDoubleStream.findAny(), asdoubleStreamSum(java.util.stream.DoubleStream).- Parameters:
receiver- the stream- Returns:
- some element, if any
- Since:
- 1.14.2
-
shutdownNow
WeavesExecutorService.shutdownNow(): what comes back is the tasksexecute(java.util.concurrent.Executor, java.lang.Runnable)was given, not the wrappers it queued (#1155), so code that re-queues or inspects them sees its own. A list with no wrapper in it is returned as the executor made it.- Parameters:
receiver- the executor the call site invoked- Returns:
- the tasks that never started
- Since:
- 1.14.1
-
awaitTermination
public static boolean awaitTermination(ExecutorService receiver, long timeout, TimeUnit unit) throws InterruptedException WeavesExecutorService.awaitTermination(long, TimeUnit)(#1266): atruereturn means every task the pool ran has ended, so the caller is ordered after what each task a woven submit or execute wrapped did; each released into the pool as it ended. Afalsereturn orders nothing. SeepoolTerminated(java.util.concurrent.ExecutorService)for which pools count.- Parameters:
receiver- the executortimeout- how long to waitunit- the unit oftimeout- Returns:
- whether the executor terminated
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.14.3
-
closeExecutor
WeavesExecutorService.close()(#1266), the end of a try-with-resources block over an executor: it returns once every task has ended, so the caller is ordered after them as afterawaitTermination(java.util.concurrent.ExecutorService, long, java.util.concurrent.TimeUnit). The common pool'sclosedoes nothing, whichpoolTerminated(java.util.concurrent.ExecutorService)sees.- Parameters:
receiver- the executor- Since:
- 1.14.3
-
removeFromPool
WeavesThreadPoolExecutor.remove(Runnable): the caller names the task it gave toexecute(java.util.concurrent.Executor, java.lang.Runnable), and the queue holds the wrapper around it (#1155).- Parameters:
pool- the pool the call site invokedtask- the task to remove- Returns:
- whether it was removed
- Since:
- 1.14.1
-
poolQueue
WeavesThreadPoolExecutor.getQueue()(#1173): where the pool queues wrappers around the tasksexecute(java.util.concurrent.Executor, java.lang.Runnable)was given, woven code reads the queue through a view that holds the caller's own tasks, removes them by those tasks, and tells the schedule a task taken out of it will never run. Anywhere else the pool's own queue is returned, so its identity is unchanged outside a run.- Parameters:
pool- the pool the call site invoked- Returns:
- the pool's queue, or a view of it that unwraps the tasks
- Since:
- 1.14.3
-
poolTask
Returns the task the caller gave, wheretaskis the wrapperexecute(java.util.concurrent.Executor, java.lang.Runnable)queued around it, ortaskitself. The agent inserts this at the entry of aThreadPoolExecutorsubclass'sbeforeExecuteandafterExecute, and of aRejectedExecutionHandler'srejectedExecution, storing the result back into the parameter, so the override is handed what the caller gave (#1173). Not a schedule point: the pool, not the caller, calls these.- Parameters:
task- the task the pool handed the method- Returns:
- the task the caller gave, where
taskis the wrapperexecute(java.util.concurrent.Executor, java.lang.Runnable)queued around it, ortaskitself - Since:
- 1.14.3
-
poolTaskOverrideWoven
Records that the agent rewroteclassName'sbeforeExecute,afterExecuteorrejectedExecutionwithpoolTask(java.lang.Runnable)(#1173), soexecute(java.util.concurrent.Executor, java.lang.Runnable)may wrap a task for a pool that overrides them or uses that handler. Called by the agent while it weaves the class, before the class can be used; a class it never reports keeps its pool's tasks unwrapped, the direction that cannot report correct code.- Parameters:
className- the binary name of the rewritten class- Since:
- 1.14.3
-
invokeAll
public static List<Future<Object>> invokeAll(ExecutorService receiver, Collection<? extends Callable<Object>> tasks) throws InterruptedException WeavesExecutorService.invokeAll(Collection). A task of this pool that calls it waits for tasks of its own pool, as ageton one does (#1175).- Parameters:
receiver- the executortasks- the tasks to run and wait for- Returns:
- their futures
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.14.1
-
invokeAny
public static @Nullable Object invokeAny(ExecutorService receiver, Collection<? extends Callable<Object>> tasks) throws InterruptedException, ExecutionException WeavesExecutorService.invokeAny(Collection), asinvokeAll(ExecutorService, Collection).- Parameters:
receiver- the executortasks- the tasks to run, one of which must finish- Returns:
- the result of one that did
- Throws:
InterruptedException- if interrupted while waitingExecutionException- if none finished normally- Since:
- 1.14.1
-
invokeAny
public static @Nullable Object invokeAny(ExecutorService receiver, Collection<? extends Callable<Object>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException WeavesExecutorService.invokeAny(Collection, long, TimeUnit), asinvokeAll(ExecutorService, Collection).- Parameters:
receiver- the executortasks- the tasks to run, one of which must finishtimeout- how long to waitunit- the unit oftimeout- Returns:
- the result of one that did
- Throws:
InterruptedException- if interrupted while waitingExecutionException- if none finished normallyTimeoutException- if the wait timed out- Since:
- 1.14.1
-
invokeAll
public static List<Future<Object>> invokeAll(ExecutorService receiver, Collection<? extends Callable<Object>> tasks, long timeout, TimeUnit unit) throws InterruptedException WeavesExecutorService.invokeAll(Collection, long, TimeUnit), asinvokeAll(ExecutorService, Collection).- Parameters:
receiver- the executortasks- the tasks to run and wait fortimeout- how long to waitunit- the unit oftimeout- Returns:
- their futures
- Throws:
InterruptedException- if interrupted while waiting- Since:
- 1.14.1
-
threadLocalGet
WeavesThreadLocal.get(): inside a pooled task the run handed over, the read is recorded onTHREAD_LOCAL_LEAKSwith the task, so a value an earlier task on the thread set and left behind is told from this task's own (#995).- Parameters:
receiver- the thread-local- Returns:
- what the get returns
- Since:
- 1.13.2
-
threadLocalSet
WeavesThreadLocal.set(Object), asthreadLocalGet(java.lang.ThreadLocal<?>): inside a pooled task the set is recorded with the task (#995).- Parameters:
receiver- the thread-localvalue- the value to set- Since:
- 1.13.2
-
threadLocalRemove
WeavesThreadLocal.remove(): the next task on this thread starts clean (#995).- Parameters:
receiver- the thread-local- Since:
- 1.13.2
-
atomicRead
A woven read of anAtomicIntegerorAtomicLong(#1157).- Parameters:
atomic- the atomic the call site read
-
atomicStored
A woven plain store to one of those atomics (#1157).- Parameters:
atomic- the atomic the call site wrote
-
atomicIncremented
A woven arithmetic update of one of those atomics, the act half of a check-then-act when this thread read the atomic just before (#1249).- Parameters:
atomic- the atomic the call site updated
-
updaterRead
A woven read of a field through an updater,atomicRead(java.lang.Object)for a slot that is not an object of its own (#1275): tracked by the field's key, so every updater and every call reaching the same field of the same object meet.- Parameters:
receiver- the object whose field was readfield- the field,declaringClass.name;nullor empty when the updater could not say, which records nothing
-
updaterIncremented
A woven arithmetic update of a field through an updater,atomicIncremented(java.lang.Object)for a slot that is not an object of its own (#1275).- Parameters:
receiver- the object whose field was updatedfield- the field, asupdaterRead(java.lang.Object, java.lang.String)takes it
-
updaterSwapped
A woven atomic swap of a field through an updater, which ends a pending read, asatomicSwapped(java.lang.Object)does for an atomic (#1275).- Parameters:
receiver- the object whose field was swappedfield- the field, asupdaterRead(java.lang.Object, java.lang.String)takes it
-
updaterStored
A woven plain store to a field through an updater, asatomicStored(java.lang.Object)records one to an atomic (#1275).- Parameters:
receiver- the object whose field was writtenfield- the field, asupdaterRead(java.lang.Object, java.lang.String)takes it
-
atomicReferenceStored
A woven store to anAtomicReference(#1174). Only a stored object can have been built from the read, so an enum or aBoolean, which is a status, ornull, ends the read instead.- Parameters:
reference- the reference the call site wrotestored- what it stored
-
atomicSwapped
A woven atomic update of one of those atomics, which needs no read before it (#1157).- Parameters:
atomic- the atomic the call site updated
-