Liking cljdoc? Tell your friends :D

qbits.auspex.protocols


ICancelcljprotocol

-cancel!clj

(-cancel! cf)

If not already completed, completes this CompletableFuture with a CancellationException.

If not already completed, completes this CompletableFuture with a
CancellationException.

-canceled?clj

(-canceled? cf)

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

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

IFuturecljprotocol

-error!clj

(-error! cf t)

If not already completed, set error value to the given exception.

If not already completed, set error value to the given
exception.

-error?clj

(-error? cf)

Returns true if future is in error state.

Returns true if future is in error state.

-when-completeclj

(-when-complete cf f)
(-when-complete cf f executor)

Returns a new future with the same result or exception as this stage, that executes the given action using this stage's default asynchronous execution facility when this stage completes.

Returns a new future with the same result or exception as this
stage, that executes the given action using this stage's default
asynchronous execution facility when this stage completes.

-realized?clj

(-realized? cf)

Returns true if future is realized.

Returns true if future is realized.

-thenclj

(-then cf f)
(-then cf f executor)

Runs f on future result and returns a new future with result.

Runs f on future result and returns a new future with result.

-fmapclj

(-fmap cf f)
(-fmap cf f executor)

Runs f, fn returning a future, on future result and returns a new future with result.

Runs f, fn returning a future, on future result and returns a new
future with result.

-handleclj

(-handle cf f)
(-handle cf f executor)

Returns a new CompletionStage that, when this stage completes either normally or exceptionally, is executed using the supplied executor, with this stage's result and exception as arguments to the supplied function.

Returns a new CompletionStage that, when this stage completes
either normally or exceptionally, is executed using the supplied
executor, with this stage's result and exception as arguments to
the supplied function.

-success!clj

(-success! cf x)

Sets the success value of future to x.

Sets the success value of future to x.

-finallyclj

(-finally cf f)
(-finally cf f executor)

Runs side-effectful code after completion, returns original future value.

Runs side-effectful code after completion, returns original
future value.

-complete!clj

(-complete! cf f)
(-complete! cf f executor)

If not already completed, sets the value to the f return value.

If not already completed, sets the value to the f return value.

-catchclj

(-catch cf f)
(-catch cf error-class f)

Returns a new CompletableFuture 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. 3 arg version allows to catch a specific error-class only and let others error.

Returns a new CompletableFuture 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.  3
arg version allows to catch a specific error-class only and let
others error.
source

ITimeoutcljprotocol

-timeout!clj

(-timeout! cf timeout-ms)
(-timeout! cf timeout-ms timeout-val)

Exceptionally completes this CompletableFuture with a TimeoutException if not otherwise completed before the given timeout. 3 arg will complete with timeout-val on timeout

Exceptionally completes this CompletableFuture with a
TimeoutException if not otherwise completed before the given
timeout.  3 arg will complete with timeout-val on timeout
source

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

× close