A collection of functions which determines how requests and responses are handled via the delta-sharing client
A collection of functions which determines how requests and responses are handled via the delta-sharing client
(completable-future-handler &
{:keys [retry-interval retry-duration]
:or {retry-interval 1000 retry-duration 30000}})
The asynchronous handler will return a CompletableFuture that either
yields the response data (on success) or throw an exception (on error).
When an exception is thrown, the returned exception is a
java.util.concurrent.ExecutionException
where the original exception is its cause.
The asynchronous handler will return a CompletableFuture that either yields the response data (on success) or throw an exception (on error). When an exception is thrown, the returned exception is a `java.util.concurrent.ExecutionException` where the original exception is its cause.
Protocol for a handler which controls how client requests should be exposed to the consumer of the delta-sharing APIs.
Protocol for a handler which controls how client requests should be exposed to the consumer of the delta-sharing APIs.
(await handler result)
(await handler result timeout-ms timeout-val)
Wait for the given call to complete, blocking the current thread if
necessary. Returns the response value on success, throws an exception on
failure, or returns timeout-val
if supplied and timeout-ms
milliseconds
pass while waiting.
This will be invoked on the value returned by the call
method, not the
internal state object.
Wait for the given call to complete, blocking the current thread if necessary. Returns the response value on success, throws an exception on failure, or returns `timeout-val` if supplied and `timeout-ms` milliseconds pass while waiting. This will be invoked on the value returned by the `call` method, not the internal state object.
(call! handler info f)
Create a new state container and invoke the function on it to initiate a
request. Returns the result object the client should see. The info
map
may contain additional observability information.
Create a new state container and invoke the function on it to initiate a request. Returns the result object the client should see. The `info` map may contain additional observability information.
(on-error! handler state info ex)
Callback indicating a failure response with the given exception. Should modify the state; the result of this call is not used.
Callback indicating a failure response with the given exception. Should modify the state; the result of this call is not used.
(on-success! handler state info data)
Callback indicating a successful response with the given response data. Should modify the state; the result of this call is not used.
Callback indicating a successful response with the given response data. Should modify the state; the result of this call is not used.
(sync-handler &
{:keys [retry-interval retry-duration]
:or {retry-interval 1000 retry-duration 30000}})
The synchronous handler will block the thread calling the API and will return either the response data (on success) or throw an exception (on error).
The synchronous handler will block the thread calling the API and will return either the response data (on success) or throw an exception (on error).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close