Liking cljdoc? Tell your friends :D

jdk.util.concurrent.CompletableFuture

A Future that may be explicitly completed (setting its value and status), and may be used as a CompletionStage, supporting dependent functions and actions that trigger upon its completion.

When two or more threads attempt to complete, completeExceptionally, or cancel a CompletableFuture, only one of them succeeds.

In addition to these and related methods for directly manipulating status and results, CompletableFuture implements interface CompletionStage with the following policies:

Actions supplied for dependent completions of non-async methods may be performed by the thread that completes the current CompletableFuture, or by any other caller of a completion method.

All async methods without an explicit Executor argument are performed using the ForkJoinPool.commonPool() (unless it does not support a parallelism level of at least two, in which case, a new Thread is created to run each task). To simplify monitoring, debugging, and tracking, all generated asynchronous tasks are instances of the marker interface CompletableFuture.AsynchronousCompletionTask.

All CompletionStage methods are implemented independently of other public methods, so the behavior of one method is not impacted by overrides of others in subclasses.

CompletableFuture also implements Future with the following policies:

Since (unlike FutureTask) this class has no direct control over the computation that causes it to be completed, cancellation is treated as just another form of exceptional completion. Method cancel has the same effect as completeExceptionally(new CancellationException()). Method isCompletedExceptionally() can be used to determine if a CompletableFuture completed in any exceptional fashion.

In case of exceptional completion with a CompletionException, methods get() and get(long, TimeUnit) throw an ExecutionException with the same cause as held in the corresponding CompletionException. To simplify usage in most contexts, this class also defines methods join() and getNow(T) that instead throw the CompletionException directly in these cases.

A Future that may be explicitly completed (setting its
value and status), and may be used as a CompletionStage,
supporting dependent functions and actions that trigger upon its
completion.

When two or more threads attempt to
complete,
completeExceptionally, or
cancel
a CompletableFuture, only one of them succeeds.

In addition to these and related methods for directly
manipulating status and results, CompletableFuture implements
interface CompletionStage with the following policies:

Actions supplied for dependent completions of
non-async methods may be performed by the thread that
completes the current CompletableFuture, or by any other caller of
a completion method.

All async methods without an explicit Executor
argument are performed using the ForkJoinPool.commonPool()
(unless it does not support a parallelism level of at least two, in
which case, a new Thread is created to run each task).  To simplify
monitoring, debugging, and tracking, all generated asynchronous
tasks are instances of the marker interface CompletableFuture.AsynchronousCompletionTask.

All CompletionStage methods are implemented independently of
other public methods, so the behavior of one method is not impacted
by overrides of others in subclasses.

CompletableFuture also implements Future with the following
policies:

Since (unlike FutureTask) this class has no direct
control over the computation that causes it to be completed,
cancellation is treated as just another form of exceptional
completion.  Method cancel has the same effect as
completeExceptionally(new CancellationException()). Method
isCompletedExceptionally() can be used to determine if a
CompletableFuture completed in any exceptional fashion.

In case of exceptional completion with a CompletionException,
methods get() and get(long, TimeUnit) throw an
ExecutionException with the same cause as held in the
corresponding CompletionException.  To simplify usage in most
contexts, this class also defines methods join() and
getNow(T) that instead throw the CompletionException directly
in these cases.
raw docstring

*all-ofclj

(*all-of cfs)

Returns a new CompletableFuture that is completed when all of the given CompletableFutures complete. If any of the given CompletableFutures complete exceptionally, then the returned CompletableFuture also does so, with a CompletionException holding this exception as its cause. Otherwise, the results, if any, of the given CompletableFutures are not reflected in the returned CompletableFuture, but may be obtained by inspecting them individually. If no CompletableFutures are provided, returns a CompletableFuture completed with the value null.

Among the applications of this method is to await completion of a set of independent CompletableFutures before continuing a program, as in: CompletableFuture.allOf(c1, c2, c3).join();.

cfs - the CompletableFutures - java.util.concurrent.CompletableFuture

returns: a new CompletableFuture that is completed when all of the given CompletableFutures complete - java.util.concurrent.CompletableFuture<java.lang.Void>

throws: java.lang.NullPointerException - if the array or any of its elements are null

Returns a new CompletableFuture that is completed when all of
 the given CompletableFutures complete.  If any of the given
 CompletableFutures complete exceptionally, then the returned
 CompletableFuture also does so, with a CompletionException
 holding this exception as its cause.  Otherwise, the results,
 if any, of the given CompletableFutures are not reflected in
 the returned CompletableFuture, but may be obtained by
 inspecting them individually. If no CompletableFutures are
 provided, returns a CompletableFuture completed with the value
 null.

 Among the applications of this method is to await completion
 of a set of independent CompletableFutures before continuing a
 program, as in: CompletableFuture.allOf(c1, c2,
 c3).join();.

cfs - the CompletableFutures - `java.util.concurrent.CompletableFuture`

returns: a new CompletableFuture that is completed when all of the
 given CompletableFutures complete - `java.util.concurrent.CompletableFuture<java.lang.Void>`

throws: java.lang.NullPointerException - if the array or any of its elements are null
raw docstring

*any-ofclj

(*any-of cfs)

Returns a new CompletableFuture that is completed when any of the given CompletableFutures complete, with the same result. Otherwise, if it completed exceptionally, the returned CompletableFuture also does so, with a CompletionException holding this exception as its cause. If no CompletableFutures are provided, returns an incomplete CompletableFuture.

cfs - the CompletableFutures - java.util.concurrent.CompletableFuture

returns: a new CompletableFuture that is completed with the result or exception of any of the given CompletableFutures when one completes - java.util.concurrent.CompletableFuture<java.lang.Object>

throws: java.lang.NullPointerException - if the array or any of its elements are null

Returns a new CompletableFuture that is completed when any of
 the given CompletableFutures complete, with the same result.
 Otherwise, if it completed exceptionally, the returned
 CompletableFuture also does so, with a CompletionException
 holding this exception as its cause.  If no CompletableFutures
 are provided, returns an incomplete CompletableFuture.

cfs - the CompletableFutures - `java.util.concurrent.CompletableFuture`

returns: a new CompletableFuture that is completed with the
 result or exception of any of the given CompletableFutures when
 one completes - `java.util.concurrent.CompletableFuture<java.lang.Object>`

throws: java.lang.NullPointerException - if the array or any of its elements are null
raw docstring

*completed-futureclj

(*completed-future value)

Returns a new CompletableFuture that is already completed with the given value.

value - the value - U

returns: the completed CompletableFuture - <U> java.util.concurrent.CompletableFuture<U>

Returns a new CompletableFuture that is already completed with
 the given value.

value - the value - `U`

returns: the completed CompletableFuture - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

*run-asyncclj

(*run-async runnable)
(*run-async runnable executor)

Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor after it runs the given action.

runnable - the action to run before completing the returned CompletableFuture - java.lang.Runnable executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletableFuture - java.util.concurrent.CompletableFuture<java.lang.Void>

Returns a new CompletableFuture that is asynchronously completed
 by a task running in the given executor after it runs the given
 action.

runnable - the action to run before completing the returned CompletableFuture - `java.lang.Runnable`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletableFuture - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

*supply-asyncclj

(*supply-async supplier)
(*supply-async supplier executor)

Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor with the value obtained by calling the given Supplier.

supplier - a function returning the value to be used to complete the returned CompletableFuture - java.util.function.Supplier executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletableFuture - <U> java.util.concurrent.CompletableFuture<U>

Returns a new CompletableFuture that is asynchronously completed
 by a task running in the given executor with the value obtained
 by calling the given Supplier.

supplier - a function returning the value to be used to complete the returned CompletableFuture - `java.util.function.Supplier`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletableFuture - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

->completable-futureclj

(->completable-future)

Constructor.

Creates a new incomplete CompletableFuture.

Constructor.

Creates a new incomplete CompletableFuture.
raw docstring

accept-eitherclj

(accept-either this other action)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.util.function.Consumer

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.util.function.Consumer`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

accept-either-asyncclj

(accept-either-async this other action)
(accept-either-async this other action executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.util.function.Consumer executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.util.function.Consumer`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

apply-to-eitherclj

(apply-to-either this other fn)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage fn - the function to use to compute the value of the returned CompletionStage - java.util.function.Function

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.Function`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

apply-to-either-asyncclj

(apply-to-either-async this other fn)
(apply-to-either-async this other fn executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage fn - the function to use to compute the value of the returned CompletionStage - java.util.function.Function executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.Function`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

cancelclj

(cancel this may-interrupt-if-running)

If not already completed, completes this CompletableFuture with a CancellationException. Dependent CompletableFutures that have not already completed will also complete exceptionally, with a CompletionException caused by this CancellationException.

may-interrupt-if-running - this value has no effect in this implementation because interrupts are not used to control processing. - boolean

returns: true if this task is now cancelled - boolean

If not already completed, completes this CompletableFuture with
 a CancellationException. Dependent CompletableFutures
 that have not already completed will also complete
 exceptionally, with a CompletionException caused by
 this CancellationException.

may-interrupt-if-running - this value has no effect in this implementation because interrupts are not used to control processing. - `boolean`

returns: true if this task is now cancelled - `boolean`
raw docstring

cancelled?clj

(cancelled? this)

Returns true if this CompletableFuture was cancelled before it completed normally.

returns: true if this CompletableFuture was cancelled before it completed normally - boolean

Returns true if this CompletableFuture was cancelled
 before it completed normally.

returns: true if this CompletableFuture was cancelled
 before it completed normally - `boolean`
raw docstring

completeclj

(complete this value)

If not already completed, sets the value returned by get() and related methods to the given value.

value - the result value - T

returns: true if this invocation caused this CompletableFuture to transition to a completed state, else false - boolean

If not already completed, sets the value returned by get() and related methods to the given value.

value - the result value - `T`

returns: true if this invocation caused this CompletableFuture
 to transition to a completed state, else false - `boolean`
raw docstring

complete-exceptionallyclj

(complete-exceptionally this ex)

If not already completed, causes invocations of get() and related methods to throw the given exception.

ex - the exception - java.lang.Throwable

returns: true if this invocation caused this CompletableFuture to transition to a completed state, else false - boolean

If not already completed, causes invocations of get()
 and related methods to throw the given exception.

ex - the exception - `java.lang.Throwable`

returns: true if this invocation caused this CompletableFuture
 to transition to a completed state, else false - `boolean`
raw docstring

completed-exceptionally?clj

(completed-exceptionally? this)

Returns true if this CompletableFuture completed exceptionally, in any way. Possible causes include cancellation, explicit invocation of completeExceptionally, and abrupt termination of a CompletionStage action.

returns: true if this CompletableFuture completed exceptionally - boolean

Returns true if this CompletableFuture completed
 exceptionally, in any way. Possible causes include
 cancellation, explicit invocation of completeExceptionally, and abrupt termination of a
 CompletionStage action.

returns: true if this CompletableFuture completed
 exceptionally - `boolean`
raw docstring

done?clj

(done? this)

Returns true if completed in any fashion: normally, exceptionally, or via cancellation.

returns: true if completed - boolean

Returns true if completed in any fashion: normally,
 exceptionally, or via cancellation.

returns: true if completed - `boolean`
raw docstring

exceptionallyclj

(exceptionally this fn)

Returns a new CompletableFuture that is completed when this CompletableFuture completes, with the result of the given function of the exception triggering this CompletableFuture's completion when it completes exceptionally; otherwise, if this CompletableFuture completes normally, then the returned CompletableFuture also completes normally with the same value. Note: More flexible versions of this functionality are available using methods whenComplete and handle.

fn - the function to use to compute the value of the returned CompletableFuture if this CompletableFuture completed exceptionally - java.util.function.Function

returns: the new CompletableFuture - java.util.concurrent.CompletableFuture<T>

Returns a new CompletableFuture that is completed when this
 CompletableFuture completes, with the result of the given
 function of the exception triggering this CompletableFuture's
 completion when it completes exceptionally; otherwise, if this
 CompletableFuture completes normally, then the returned
 CompletableFuture also completes normally with the same value.
 Note: More flexible versions of this functionality are
 available using methods whenComplete and handle.

fn - the function to use to compute the value of the returned CompletableFuture if this CompletableFuture completed exceptionally - `java.util.function.Function`

returns: the new CompletableFuture - `java.util.concurrent.CompletableFuture<T>`
raw docstring

getclj

(get this)
(get this timeout unit)

Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.

timeout - the maximum time to wait - long unit - the time unit of the timeout argument - java.util.concurrent.TimeUnit

returns: the result value - T

throws: java.util.concurrent.CancellationException - if this future was cancelled

Waits if necessary for at most the given time for this future
 to complete, and then returns its result, if available.

timeout - the maximum time to wait - `long`
unit - the time unit of the timeout argument - `java.util.concurrent.TimeUnit`

returns: the result value - `T`

throws: java.util.concurrent.CancellationException - if this future was cancelled
raw docstring

get-nowclj

(get-now this value-if-absent)

Returns the result value (or throws any encountered exception) if completed, else returns the given valueIfAbsent.

value-if-absent - the value to return if not completed - T

returns: the result value, if completed, else the given valueIfAbsent - T

throws: java.util.concurrent.CancellationException - if the computation was cancelled

Returns the result value (or throws any encountered exception)
 if completed, else returns the given valueIfAbsent.

value-if-absent - the value to return if not completed - `T`

returns: the result value, if completed, else the given valueIfAbsent - `T`

throws: java.util.concurrent.CancellationException - if the computation was cancelled
raw docstring

get-number-of-dependentsclj

(get-number-of-dependents this)

Returns the estimated number of CompletableFutures whose completions are awaiting completion of this CompletableFuture. This method is designed for use in monitoring system state, not for synchronization control.

returns: the number of dependent CompletableFutures - int

Returns the estimated number of CompletableFutures whose
 completions are awaiting completion of this CompletableFuture.
 This method is designed for use in monitoring system state, not
 for synchronization control.

returns: the number of dependent CompletableFutures - `int`
raw docstring

handleclj

(handle this fn)

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - java.util.function.BiFunction

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.BiFunction`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

handle-asyncclj

(handle-async this fn)
(handle-async this fn executor)

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - java.util.function.BiFunction executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.BiFunction`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

joinclj

(join this)

Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally. To better conform with the use of common functional forms, if a computation involved in the completion of this CompletableFuture threw an exception, this method throws an (unchecked) CompletionException with the underlying exception as its cause.

returns: the result value - T

throws: java.util.concurrent.CancellationException - if the computation was cancelled

Returns the result value when complete, or throws an
 (unchecked) exception if completed exceptionally. To better
 conform with the use of common functional forms, if a
 computation involved in the completion of this
 CompletableFuture threw an exception, this method throws an
 (unchecked) CompletionException with the underlying
 exception as its cause.

returns: the result value - `T`

throws: java.util.concurrent.CancellationException - if the computation was cancelled
raw docstring

obtrude-exceptionclj

(obtrude-exception this ex)

Forcibly causes subsequent invocations of method get() and related methods to throw the given exception, whether or not already completed. This method is designed for use only in error recovery actions, and even in such situations may result in ongoing dependent completions using established versus overwritten outcomes.

ex - the exception - java.lang.Throwable

throws: java.lang.NullPointerException - if the exception is null

Forcibly causes subsequent invocations of method get()
 and related methods to throw the given exception, whether or
 not already completed. This method is designed for use only in
 error recovery actions, and even in such situations may result
 in ongoing dependent completions using established versus
 overwritten outcomes.

ex - the exception - `java.lang.Throwable`

throws: java.lang.NullPointerException - if the exception is null
raw docstring

obtrude-valueclj

(obtrude-value this value)

Forcibly sets or resets the value subsequently returned by method get() and related methods, whether or not already completed. This method is designed for use only in error recovery actions, and even in such situations may result in ongoing dependent completions using established versus overwritten outcomes.

value - the completion value - T

Forcibly sets or resets the value subsequently returned by
 method get() and related methods, whether or not
 already completed. This method is designed for use only in
 error recovery actions, and even in such situations may result
 in ongoing dependent completions using established versus
 overwritten outcomes.

value - the completion value - `T`
raw docstring

run-after-bothclj

(run-after-both this other action)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.lang.Runnable

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

run-after-both-asyncclj

(run-after-both-async this other action)
(run-after-both-async this other action executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.lang.Runnable executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

run-after-eitherclj

(run-after-either this other action)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.lang.Runnable

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

run-after-either-asyncclj

(run-after-either-async this other action)
(run-after-either-async this other action executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.lang.Runnable executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-acceptclj

(then-accept this action)

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - java.util.function.Consumer

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - `java.util.function.Consumer`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-accept-asyncclj

(then-accept-async this action)
(then-accept-async this action executor)

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - java.util.function.Consumer executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - `java.util.function.Consumer`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-accept-bothclj

(then-accept-both this other action)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.util.function.BiConsumer

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.util.function.BiConsumer`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-accept-both-asyncclj

(then-accept-both-async this other action)
(then-accept-both-async this other action executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage action - the action to perform before completing the returned CompletionStage - java.util.function.BiConsumer executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
action - the action to perform before completing the returned CompletionStage - `java.util.function.BiConsumer`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-applyclj

(then-apply this fn)

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - java.util.function.Function

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.Function`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

then-apply-asyncclj

(then-apply-async this fn)
(then-apply-async this fn executor)

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - java.util.function.Function executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.Function`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

then-combineclj

(then-combine this other fn)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage fn - the function to use to compute the value of the returned CompletionStage - java.util.function.BiFunction

returns: the new CompletionStage - <U,V> java.util.concurrent.CompletableFuture<V>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.BiFunction`

returns: the new CompletionStage - `<U,V> java.util.concurrent.CompletableFuture<V>`
raw docstring

then-combine-asyncclj

(then-combine-async this other fn)
(then-combine-async this other fn executor)

Description copied from interface: CompletionStage

other - the other CompletionStage - java.util.concurrent.CompletionStage fn - the function to use to compute the value of the returned CompletionStage - java.util.function.BiFunction executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - <U,V> java.util.concurrent.CompletableFuture<V>

Description copied from interface: CompletionStage

other - the other CompletionStage - `java.util.concurrent.CompletionStage`
fn - the function to use to compute the value of the returned CompletionStage - `java.util.function.BiFunction`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `<U,V> java.util.concurrent.CompletableFuture<V>`
raw docstring

then-composeclj

(then-compose this fn)

Description copied from interface: CompletionStage

fn - the function returning a new CompletionStage - java.util.function.Function

returns: the CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function returning a new CompletionStage - `java.util.function.Function`

returns: the CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

then-compose-asyncclj

(then-compose-async this fn)
(then-compose-async this fn executor)

Description copied from interface: CompletionStage

fn - the function returning a new CompletionStage - java.util.function.Function executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the CompletionStage - <U> java.util.concurrent.CompletableFuture<U>

Description copied from interface: CompletionStage

fn - the function returning a new CompletionStage - `java.util.function.Function`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the CompletionStage - `<U> java.util.concurrent.CompletableFuture<U>`
raw docstring

then-runclj

(then-run this action)

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - java.lang.Runnable

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

then-run-asyncclj

(then-run-async this action)
(then-run-async this action executor)

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - java.lang.Runnable executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<java.lang.Void>

Description copied from interface: CompletionStage

action - the action to perform before completing the returned CompletionStage - `java.lang.Runnable`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<java.lang.Void>`
raw docstring

to-completable-futureclj

(to-completable-future this)

Returns this CompletableFuture.

returns: this CompletableFuture - java.util.concurrent.CompletableFuture<T>

Returns this CompletableFuture.

returns: this CompletableFuture - `java.util.concurrent.CompletableFuture<T>`
raw docstring

to-stringclj

(to-string this)

Returns a string identifying this CompletableFuture, as well as its completion state. The state, in brackets, contains the String "Completed Normally" or the String "Completed Exceptionally", or the String "Not completed" followed by the number of CompletableFutures dependent upon its completion, if any.

returns: a string identifying this CompletableFuture, as well as its state - java.lang.String

Returns a string identifying this CompletableFuture, as well as
 its completion state.  The state, in brackets, contains the
 String "Completed Normally" or the String "Completed Exceptionally", or the String "Not
 completed" followed by the number of CompletableFutures
 dependent upon its completion, if any.

returns: a string identifying this CompletableFuture, as well as its state - `java.lang.String`
raw docstring

when-completeclj

(when-complete this action)

Description copied from interface: CompletionStage

action - the action to perform - java.util.function.BiConsumer

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<T>

Description copied from interface: CompletionStage

action - the action to perform - `java.util.function.BiConsumer`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<T>`
raw docstring

when-complete-asyncclj

(when-complete-async this action)
(when-complete-async this action executor)

Description copied from interface: CompletionStage

action - the action to perform - java.util.function.BiConsumer executor - the executor to use for asynchronous execution - java.util.concurrent.Executor

returns: the new CompletionStage - java.util.concurrent.CompletableFuture<T>

Description copied from interface: CompletionStage

action - the action to perform - `java.util.function.BiConsumer`
executor - the executor to use for asynchronous execution - `java.util.concurrent.Executor`

returns: the new CompletionStage - `java.util.concurrent.CompletableFuture<T>`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close