Uses of Interface
ratpack.exec.Promise
-
Packages that use Promise Package Description ratpack.core.file Types for dealing with the file system and serving files.ratpack.core.handling The handling of application requests.ratpack.core.health Health checks report on the status of key components in the system and are generally used for monitoring and reporting.ratpack.core.http The HTTP protocol.ratpack.core.http.client The HTTP client.ratpack.core.render The renderer framework provides a pluggable mechanism for serializing objects to the response.ratpack.core.sse.client ratpack.exec The execution management.ratpack.exec.stream Support for reactive streams.ratpack.exec.stream.bytebuf ratpack.exec.util ratpack.exec.util.retry ratpack.hikari Provides integration with HikariCP library.ratpack.jdbctx ratpack.reactor Provides integration with the Project Reactor library.ratpack.rx2 Provides integration with the RxJava library.ratpack.session Objects for providingSession
support.ratpack.test.exec -
-
Uses of Promise in ratpack.core.file
Methods in ratpack.core.file that return Promise Modifier and Type Method Description static Promise<AsynchronousFileChannel>
FileIo. open(Path file, OpenOption... options)
Creates a promise for an (open) async file channel.static Promise<AsynchronousFileChannel>
FileIo. open(Path file, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
Creates a promise for an (open) async file channel.static Promise<io.netty.buffer.CompositeByteBuf>
FileIo. read(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize)
Read the contents of a file from the given start until the given stop.static Promise<io.netty.buffer.CompositeByteBuf>
FileIo. read(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize, long start, long stop)
Read the contents of a file.static Promise<Long>
FileIo. write(Publisher<? extends io.netty.buffer.ByteBuf> publisher, long position, Promise<? extends AsynchronousFileChannel> file)
Writes the bytes of the given publisher to the given file, returning the number of bytes written.static Promise<Long>
FileIo. write(Publisher<? extends io.netty.buffer.ByteBuf> publisher, Promise<? extends AsynchronousFileChannel> file)
Writes the bytes of the given publisher to the given file starting at the start, returning the number of bytes written.Methods in ratpack.core.file with parameters of type Promise Modifier and Type Method Description static Promise<io.netty.buffer.CompositeByteBuf>
FileIo. read(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize)
Read the contents of a file from the given start until the given stop.static Promise<io.netty.buffer.CompositeByteBuf>
FileIo. read(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize, long start, long stop)
Read the contents of a file.static TransformablePublisher<io.netty.buffer.ByteBuf>
FileIo. readStream(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize)
Streams the entire contents of a file.static TransformablePublisher<io.netty.buffer.ByteBuf>
FileIo. readStream(Promise<? extends AsynchronousFileChannel> file, io.netty.buffer.ByteBufAllocator allocator, int bufferSize, long start, long stop)
Streams the contents of a file.static Operation
FileIo. write(io.netty.buffer.ByteBuf bytes, long position, Promise<? extends AsynchronousFileChannel> file)
Writes the given bytes to the given file, starting at the given position.static Operation
FileIo. write(io.netty.buffer.ByteBuf bytes, Promise<? extends AsynchronousFileChannel> file)
Writes the given bytes to the given file, starting at the start.static Promise<Long>
FileIo. write(Publisher<? extends io.netty.buffer.ByteBuf> publisher, long position, Promise<? extends AsynchronousFileChannel> file)
Writes the bytes of the given publisher to the given file, returning the number of bytes written.static Promise<Long>
FileIo. write(Publisher<? extends io.netty.buffer.ByteBuf> publisher, Promise<? extends AsynchronousFileChannel> file)
Writes the bytes of the given publisher to the given file starting at the start, returning the number of bytes written. -
Uses of Promise in ratpack.core.handling
Methods in ratpack.core.handling that return Promise Modifier and Type Method Description <T> Promise<T>
Context. parse(com.google.common.reflect.TypeToken<T> type)
Parse the request into the given type, using no options (or more specifically an instance ofNullParseOpts
as the options).<T,O>
Promise<T>Context. parse(com.google.common.reflect.TypeToken<T> type, O options)
Constructs aParse
from the given args and delegates toContext.parse(Parse)
.<T> Promise<T>
Context. parse(Class<T> type)
Parse the request into the given type, using no options (or more specifically an instance ofNullParseOpts
as the options).<T,O>
Promise<T>Context. parse(Class<T> type, O options)
Constructs aParse
from the given args and delegates toContext.parse(Parse)
.<T,O>
Promise<T>Context. parse(Parse<T,O> parse)
Parses the request body into an object. -
Uses of Promise in ratpack.core.health
Methods in ratpack.core.health that return Promise Modifier and Type Method Description Promise<HealthCheck.Result>
HealthCheck. check(Registry registry)
Checks the health of the component, providing a promise for the result.static Promise<HealthCheckResults>
HealthCheck. checkAll(Registry registry, Iterable<? extends HealthCheck> healthChecks)
Execute health checks.static Promise<HealthCheckResults>
HealthCheck. checkAll(Registry registry, Throttle throttle, Iterable<? extends HealthCheck> healthChecks)
Execute health checks.Method parameters in ratpack.core.health with type arguments of type Promise Modifier and Type Method Description static HealthCheck
HealthCheck. of(String name, Function<? super Registry,? extends Promise<HealthCheck.Result>> func)
Convenience factory for health check implementations. -
Uses of Promise in ratpack.core.http
Methods in ratpack.core.http that return Promise Modifier and Type Method Description Promise<TypedData>
Request. getBody()
The body of the request.Promise<TypedData>
Request. getBody(long maxContentLength)
The body of the request allowing up to the provided size for the content.Promise<TypedData>
Request. getBody(long maxContentLength, Block onTooLarge)
The body of the request allowing up to the provided size for the content.Promise<TypedData>
Request. getBody(Block onTooLarge)
The body of the request. -
Uses of Promise in ratpack.core.http.client
Methods in ratpack.core.http.client that return Promise Modifier and Type Method Description default Promise<ReceivedResponse>
HttpClient. get(URI uri)
Promise<ReceivedResponse>
HttpClient. get(URI uri, Action<? super RequestSpec> action)
An asynchronous method to do a GET HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a GET.Promise<ReceivedResponse>
HttpClient. post(URI uri, Action<? super RequestSpec> action)
An asynchronous method to do a POST HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, but the method will be defaulted to a POST.Promise<ReceivedResponse>
HttpClient. request(URI uri, Action<? super RequestSpec> action)
An asynchronous method to do a HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec.Promise<StreamedResponse>
HttpClient. requestStream(URI uri, Action<? super RequestSpec> requestConfigurer)
An asynchronous method to do a HTTP request, the URL and all details of the request are configured by the Action acting on the RequestSpec, the received response content will be streamed. -
Uses of Promise in ratpack.core.render
Methods in ratpack.core.render that return Promise Modifier and Type Method Description Promise<T>
RenderableDecorator. decorate(Context context, T object)
Decorates the given object on its way to being rendered.Method parameters in ratpack.core.render with type arguments of type Promise Modifier and Type Method Description static <T> RenderableDecorator<T>
RenderableDecorator. ofAsync(Class<T> type, BiFunction<? super Context,? super T,? extends Promise<T>> impl)
Creates a renderable decorator implementation for the given type that uses the function as decorator. -
Uses of Promise in ratpack.core.sse.client
Methods in ratpack.core.sse.client that return Promise Modifier and Type Method Description default Promise<ServerSentEventResponse>
ServerSentEventClient. request(URI uri)
Makes a request for an event stream to the given location.Promise<ServerSentEventResponse>
ServerSentEventClient. request(URI uri, Action<? super RequestSpec> action)
Makes a request for an event stream to the given location. -
Uses of Promise in ratpack.exec
Methods in ratpack.exec that return Promise Modifier and Type Method Description default <O> Promise<O>
Promise. apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.default <B,A>
Promise<A>Promise. around(Factory<? extends B> before, BiFunction<? super B,? super ExecResult<T>,? extends ExecResult<A>> after)
Facilitates capturing a value before the the promise is subscribed and using it to later augment the result.static <T> Promise<T>
Promise. async(Upstream<T> upstream)
Creates a promise for value that will be produced asynchronously.default <O> Promise<O>
Promise. blockingMap(Function<? super T,? extends O> transformer)
Likemap(Function)
, but performs the transformation on a blocking thread.default Promise<T>
Promise. blockingOp(Action<? super T> action)
Executes the given action with the promise value, on a blocking thread.default Promise<T>
Promise. cache()
Caches the promised value (or error) and returns it to all subscribers.default Promise<T>
Promise. cacheIf(Predicate<? super T> shouldCache)
Caches the promise value and provides it to all future subscribers, if it satisfies the predicate.default Promise<T>
Promise. cacheResultFor(Function<? super ExecResult<T>,Duration> cacheFor)
Caches the promise result for a calculated amount of time.default Promise<T>
Promise. cacheResultIf(Predicate<? super ExecResult<T>> shouldCache)
Caches the promise result eternally and provide it to all future subscribers, if it satisfies the predicate.default Promise<T>
Promise. close(AutoCloseable closeable)
Closes the given closeable when the value or error propagates to this point.default Promise<T>
Promise. close(Operation closer)
Likeclose(AutoCloseable)
, but allows async close operations.default Promise<T>
Promise. defer(Duration duration)
Defers the subscription ofthis
promise for the given duration.default Promise<T>
Promise. defer(Action<? super Runnable> releaser)
Defers the subscription ofthis
promise until later.static <T> Promise<T>
Promise. error(Throwable t)
Creates a failed promise with the given error.default <O> Promise<Pair<O,T>>
Promise. flatLeft(Function<? super T,? extends Promise<O>> leftFunction)
Transforms the promised value to aPair
, with the value of the result of the given function as theleft
.default <T> Promise<T>
Operation. flatMap(Promise<T> promise)
default <T> Promise<T>
Operation. flatMap(Factory<? extends Promise<T>> factory)
default <O> Promise<O>
Promise. flatMap(Function<? super T,? extends Promise<O>> transformer)
Transforms the promised value by applying the given function to it that returns a promise for the transformed value.default <E extends Throwable>
Promise<T>Promise. flatMapError(Class<E> type, Function<? super E,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default Promise<T>
Promise. flatMapError(Function<? super Throwable,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default Promise<T>
Promise. flatMapError(Predicate<? super Throwable> predicate, Function<? super Throwable,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default <O> Promise<O>
Promise. flatMapIf(Predicate<? super T> predicate, Function<? super T,? extends Promise<O>> onTrue, Function<? super T,? extends Promise<O>> onFalse)
Transforms the promised value by applying one of the given functions to it that returns a promise for the transformed value, depending if it satisfies the predicate.default Promise<T>
Promise. flatMapIf(Predicate<? super T> predicate, Function<? super T,? extends Promise<T>> transformer)
Transforms the promised value by applying the given function to it that returns a promise for the transformed value, if it satisfies the predicate.default <O> Promise<Pair<T,O>>
Promise. flatRight(Function<? super T,? extends Promise<O>> rightFunction)
Transforms the promised value to aPair
, with the value of the result of the given function as theright
.static <T> Promise<T>
Promise. flatten(Factory<? extends Promise<T>> factory)
Creates a promise for the promise produced by the given factory.default Promise<T>
Promise. fork()
Forks a new execution and subscribes to this promise, returning a promise for its value.default Promise<T>
Promise. fork(Action<? super ExecSpec> execSpec)
Forks a new execution and subscribes to this promise, returning a promise for its value.static <T> Promise<T>
Blocking. get(Factory<T> factory)
Performs a blocking operation on a separate thread, returning a promise for its value.default <O> Promise<Pair<O,T>>
Promise. left(Promise<O> left)
Transforms the promised value to aPair
, with the value of the given promise as theleft
.default <O> Promise<Pair<O,T>>
Promise. left(Function<? super T,? extends O> leftFunction)
Transforms the promised value to aPair
, with the result of the given function as theleft
.default <T> Promise<T>
Operation. map(Factory<? extends T> factory)
default <O> Promise<O>
Promise. map(Function<? super T,? extends O> transformer)
Transforms the promised value by applying the given function to it.default <E extends Throwable>
Promise<T>Promise. mapError(Class<E> type, Function<? super E,? extends T> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default Promise<T>
Promise. mapError(Function<? super Throwable,? extends T> transformer)
Transforms the promise failure (potentially into a value) by applying the given function to it.default Promise<T>
Promise. mapError(Predicate<? super Throwable> predicate, Function<? super Throwable,? extends T> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default <O> Promise<O>
Promise. mapIf(Predicate<? super T> predicate, Function<? super T,? extends O> onTrue, Function<? super T,? extends O> onFalse)
Transforms the promised value by applying one of the given functions to it, depending if it satisfies the predicate.default Promise<T>
Promise. mapIf(Predicate<? super T> predicate, Function<? super T,? extends T> transformer)
Transforms the promised value by applying the given function to it, if it satisfies the predicate.default Promise<T>
Promise. next(Action<? super T> action)
Executes the provided, potentially asynchronous,Action
with the promised value as input.default Promise<T>
Promise. nextOp(Function<? super T,? extends Operation> function)
Executes the operation returned by the given function.default Promise<T>
Promise. nextOpIf(Predicate<? super T> predicate, Function<? super T,? extends Operation> function)
Executes the operation returned by the given function, if it satisfies the predicate.static <T> Promise<T>
Promise. ofNull()
A promise fornull
.default Promise<T>
Promise. onComplete(Block block)
Specifies the action to take if theUpstream
signals complete without emitting a value or an error.default <E extends Throwable>
Promise<T>Promise. onError(Class<E> errorType, Action<? super E> errorHandler)
Specifies the action to take if the an error of the given type occurs trying to produce the promised value.default Promise<T>
Promise. onError(Action<? super Throwable> errorHandler)
Specifies the action to take if an error occurs trying to produce the promised value.default Promise<T>
Promise. onError(Predicate<? super Throwable> predicate, Action<? super Throwable> errorHandler)
Specifies the action to take if the an error occurs trying to produce the promised value, that the given predicate applies to.default Promise<T>
Promise. onNull(Block action)
A convenience shorthand forrouting
null
values.default Promise<T>
Promise. onYield(Runnable onYield)
Registers a listener that is invoked whenthis
promise is initiated.Promise<Void>
Operation. promise()
default <O> Promise<O>
Promise. replace(Promise<O> next)
Replacesthis
promise with the provided promise for downstream subscribers.default Promise<T>
Promise. retry(RetryPolicy retryPolicy, BiAction<? super Integer,? super Throwable> onError)
Causesthis
yielding the promised value to be retried on error, under the rules of providedretryPolicy
.default Promise<T>
Promise. retryIf(Predicate<? super Throwable> predicate, RetryPolicy retryPolicy, BiAction<? super Integer,? super Throwable> onError)
Causesthis
yielding the promised value to be retried on error, under the rules of providedretryPolicy
, and if the givenPredicate
matches the error thrown.default <O> Promise<Pair<T,O>>
Promise. right(Promise<O> right)
Transforms the promised value to aPair
, with the value of the given promise as theright
.default <O> Promise<Pair<T,O>>
Promise. right(Function<? super T,? extends O> rightFunction)
Transforms the promised value to aPair
, with the result of the given function as theright
.default Promise<T>
Promise. route(Predicate<? super T> predicate, Action<? super T> action)
Allows the promised value to be handled specially if it meets the given predicate, instead of being handled by the promise subscriber.static <T> Promise<T>
Promise. sync(Factory<T> factory)
Creates a promise for the value synchronously produced by the given factory.<T> Promise<T>
Throttle. throttle(Promise<T> promise)
Throttles the given promise.default Promise<T>
Promise. throttled(Throttle throttle)
Throttlesthis
promise, using the giventhrottle
.default Promise<T>
Promise. time(Action<? super Duration> action)
Emits the time taken from when the promise is subscribed to to when the result is available.default Promise<Pair<ExecResult<T>,Duration>>
Promise. timeResult()
default Promise<T>
Promise. timeResult(BiAction<? super ExecResult<T>,? super Duration> action)
Emits the time taken from when the promise is subscribed to to when the result is available.static <T> Promise<T>
Promise. toPromise(CompletableFuture<T> future)
Convert aCompletableFuture
into a promise.<O> Promise<O>
Promise. transform(Function<? super Upstream<? extends T>,? extends Upstream<O>> upstreamTransformer)
Apply a custom transform to this promise.static <T> Promise<T>
Promise. value(T t)
Creates a promise for the given item.default Promise<T>
Promise. wiretap(Action<? super Result<T>> listener)
Registers a listener for the promise outcome.Methods in ratpack.exec with parameters of type Promise Modifier and Type Method Description default <T> Promise<T>
Operation. flatMap(Promise<T> promise)
default <O> Promise<Pair<O,T>>
Promise. left(Promise<O> left)
Transforms the promised value to aPair
, with the value of the given promise as theleft
.static <T> T
Blocking. on(Promise<T> promise)
Blocks execution waiting for this promise to complete and returns the promised value.default <O> Promise<O>
Promise. replace(Promise<O> next)
Replacesthis
promise with the provided promise for downstream subscribers.default <O> Promise<Pair<T,O>>
Promise. right(Promise<O> right)
Transforms the promised value to aPair
, with the value of the given promise as theright
.<T> Promise<T>
Throttle. throttle(Promise<T> promise)
Throttles the given promise.Method parameters in ratpack.exec with type arguments of type Promise Modifier and Type Method Description default <O> Promise<O>
Promise. apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.default <O> Promise<O>
Promise. apply(Function<? super Promise<T>,? extends Promise<O>> function)
Applies the custom operation function to this promise.default <O> Promise<Pair<O,T>>
Promise. flatLeft(Function<? super T,? extends Promise<O>> leftFunction)
Transforms the promised value to aPair
, with the value of the result of the given function as theleft
.default <T> Promise<T>
Operation. flatMap(Factory<? extends Promise<T>> factory)
default <O> Promise<O>
Promise. flatMap(Function<? super T,? extends Promise<O>> transformer)
Transforms the promised value by applying the given function to it that returns a promise for the transformed value.default <E extends Throwable>
Promise<T>Promise. flatMapError(Class<E> type, Function<? super E,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default Promise<T>
Promise. flatMapError(Function<? super Throwable,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default Promise<T>
Promise. flatMapError(Predicate<? super Throwable> predicate, Function<? super Throwable,? extends Promise<T>> function)
Transforms a failure of the given type (potentially into a value) by applying the given function to it.default <O> Promise<O>
Promise. flatMapIf(Predicate<? super T> predicate, Function<? super T,? extends Promise<O>> onTrue, Function<? super T,? extends Promise<O>> onFalse)
Transforms the promised value by applying one of the given functions to it that returns a promise for the transformed value, depending if it satisfies the predicate.default Promise<T>
Promise. flatMapIf(Predicate<? super T> predicate, Function<? super T,? extends Promise<T>> transformer)
Transforms the promised value by applying the given function to it that returns a promise for the transformed value, if it satisfies the predicate.default <O> Promise<Pair<T,O>>
Promise. flatRight(Function<? super T,? extends Promise<O>> rightFunction)
Transforms the promised value to aPair
, with the value of the result of the given function as theright
.static <T> Promise<T>
Promise. flatten(Factory<? extends Promise<T>> factory)
Creates a promise for the promise produced by the given factory.default <O> O
Promise. to(Function<? super Promise<T>,? extends O> function)
Applies the given function tothis
and returns the result. -
Uses of Promise in ratpack.exec.stream
Methods in ratpack.exec.stream that return Promise Modifier and Type Method Description static <T,R>
Promise<R>Streams. reduce(Publisher<T> publisher, R seed, BiFunction<? super R,? super T,? extends R> reducer)
Reduces the stream to a single value, by applying the given function successively.default <R> Promise<R>
TransformablePublisher. reduce(R seed, BiFunction<? super R,? super T,? extends R> reducer)
Reduces the stream to a single value, by applying the given function successively.static <T> Promise<List<T>>
Streams. toList(Publisher<T> publisher)
Creates a promise for the given publisher's items as a List.default Promise<List<T>>
TransformablePublisher. toList()
Consumes the given publisher's items to a list.static <T> Promise<T>
Streams. toPromise(Publisher<T> publisher)
Creates a promise for the given publisher's single item.default Promise<T>
TransformablePublisher. toPromise()
Methods in ratpack.exec.stream with parameters of type Promise Modifier and Type Method Description static <T> TransformablePublisher<T>
Streams. publish(Promise<? extends Iterable<T>> promise)
Converts aPromise
for an iterable into a publishable.Method parameters in ratpack.exec.stream with type arguments of type Promise Modifier and Type Method Description static <I,O>
TransformablePublisher<O>Streams. flatMap(Publisher<I> input, Function<? super I,? extends Promise<? extends O>> function)
Returns a publisher that publishes items from the given input publisher after transforming each item via the given, promise returning, function.default <O> TransformablePublisher<O>
TransformablePublisher. flatMap(Function<? super T,? extends Promise<? extends O>> function)
static <T> TransformablePublisher<T>
Streams. flatYield(Function<? super YieldRequest,? extends Promise<T>> producer)
Creates a new publisher, backed by the given asynchronous data producing function. -
Uses of Promise in ratpack.exec.stream.bytebuf
Methods in ratpack.exec.stream.bytebuf that return Promise Modifier and Type Method Description static Promise<io.netty.buffer.CompositeByteBuf>
ByteBufStreams. compose(Publisher<? extends io.netty.buffer.ByteBuf> publisher)
Reduces the stream to a single composite byte buf.static Promise<io.netty.buffer.CompositeByteBuf>
ByteBufStreams. compose(Publisher<? extends io.netty.buffer.ByteBuf> publisher, io.netty.buffer.ByteBufAllocator alloc)
Reduces the stream to a single composite byte buf.static Promise<byte[]>
ByteBufStreams. toByteArray(Publisher<? extends io.netty.buffer.ByteBuf> publisher)
Reduces the stream to a singlebyte[]
. -
Uses of Promise in ratpack.exec.util
Methods in ratpack.exec.util that return Promise Modifier and Type Method Description Promise<T>
Promised. promise()
Creates a new promise for the eventual value.<T> Promise<T>
ReadWriteAccess. read(Promise<T> promise)
Decorates the given promise with read serialization.<T> Promise<T>
ReadWriteAccess. read(Promise<T> promise, Duration timeout)
Decorates the given promise with read serialization and the given timeout.<T> Promise<T>
ReadWriteAccess. write(Promise<T> promise)
Decorates the given promise with write serialization.<T> Promise<T>
ReadWriteAccess. write(Promise<T> promise, Duration timeout)
Decorates the given promise with write serialization.Promise<List<T>>
Batch. yield()
Processes all the promises of the batch, stopping at the first error.Promise<List<T>>
ParallelBatch. yield()
Processes all the promises of the batch, stopping at the first error.Promise<List<T>>
SerialBatch. yield()
Processes all the promises of the batch, stopping at the first error.Promise<List<? extends ExecResult<T>>>
Batch. yieldAll()
Processes all the promises of the batch, collecting any errors.Promise<List<? extends ExecResult<T>>>
ParallelBatch. yieldAll()
Processes all the promises of the batch, collecting any errors.Promise<List<? extends ExecResult<T>>>
SerialBatch. yieldAll()
Processes all the promises of the batch, collecting any errors.Methods in ratpack.exec.util with parameters of type Promise Modifier and Type Method Description static <T> ParallelBatch<T>
ParallelBatch. of(Promise<? extends T>... promises)
Creates a new parallel batch of the given promises.static <T> SerialBatch<T>
SerialBatch. of(Promise<? extends T>... promises)
Creates a new serial batch of the given promises.<T> Promise<T>
ReadWriteAccess. read(Promise<T> promise)
Decorates the given promise with read serialization.<T> Promise<T>
ReadWriteAccess. read(Promise<T> promise, Duration timeout)
Decorates the given promise with read serialization and the given timeout.<T> Promise<T>
ReadWriteAccess. write(Promise<T> promise)
Decorates the given promise with write serialization.<T> Promise<T>
ReadWriteAccess. write(Promise<T> promise, Duration timeout)
Decorates the given promise with write serialization.Method parameters in ratpack.exec.util with type arguments of type Promise Modifier and Type Method Description static <T> ParallelBatch<T>
ParallelBatch. of(Iterable<? extends Promise<? extends T>> promises)
Creates a new parallel batch of the given promises.static <T> SerialBatch<T>
SerialBatch. of(Iterable<? extends Promise<? extends T>> promises)
Creates a new serial batch of the given promises. -
Uses of Promise in ratpack.exec.util.retry
Methods in ratpack.exec.util.retry that return Promise Modifier and Type Method Description Promise<Duration>
AttemptRetryPolicy. delay()
Promise that returns the waiting time before retrying.Promise<Duration>
Delay. delay(Integer attempt)
Builds a promise wrapping a duration that will instruct the caller how long to wait between retries.Promise<Duration>
DurationRetryPolicy. delay()
Promise that returns the waiting time before retrying.Promise<Duration>
FixedDelay. delay(Integer attempt)
Builds a promise wrapping a duration that will instruct the caller how long to wait between retries.Promise<Duration>
IndexedDelay. delay(Integer attempt)
Builds a promise wrapping a duration that will instruct the caller how long to wait between retries.Promise<Duration>
RetryPolicy. delay()
Promise that returns the waiting time before retrying. -
Uses of Promise in ratpack.hikari
Methods in ratpack.hikari that return Promise Modifier and Type Method Description Promise<HealthCheck.Result>
HikariHealthCheck. check(Registry registry)
-
Uses of Promise in ratpack.jdbctx
Methods in ratpack.jdbctx that return Promise Modifier and Type Method Description <T> Promise<T>
Transaction. wrap(Promise<T> promise)
Decorates the given promise in a transaction boundary.default <T> Promise<T>
Transaction. wrap(Factory<? extends Promise<T>> promiseFactory)
Executes the given factory and yields the resultant promise in a transaction.Methods in ratpack.jdbctx with parameters of type Promise Modifier and Type Method Description <T> Promise<T>
Transaction. wrap(Promise<T> promise)
Decorates the given promise in a transaction boundary.Method parameters in ratpack.jdbctx with type arguments of type Promise Modifier and Type Method Description default <T> Promise<T>
Transaction. wrap(Factory<? extends Promise<T>> promiseFactory)
Executes the given factory and yields the resultant promise in a transaction. -
Uses of Promise in ratpack.reactor
Methods in ratpack.reactor that return Promise Modifier and Type Method Description static <T> Promise<List<T>>
ReactorRatpack. promise(Flux<T> flux)
static <T> Promise<T>
ReactorRatpack. promiseSingle(Mono<T> mono)
Methods in ratpack.reactor with parameters of type Promise Modifier and Type Method Description static <T> Flux<T>
ReactorRatpack. flux(Promise<T> promise)
static <T,I extends Iterable<T>>
Flux<T>ReactorRatpack. fluxEach(Promise<I> promise)
static <T> Mono<T>
ReactorRatpack. mono(Promise<T> promise)
-
Uses of Promise in ratpack.rx2
Methods in ratpack.rx2 that return Promise Modifier and Type Method Description static <T> Promise<T>
RxRatpack. promise(Single<T> single)
static <T> Promise<T>
RxRatpack. promise(SingleOnSubscribe<T> onSubscribe)
Converts anSingleOnSubscribe
into aPromise
, for the Single's item.static <T> Promise<List<T>>
RxRatpack. promiseAll(Observable<T> observable)
Converts anObservable
into aPromise
, for all of the observable's items.static <T> Promise<List<T>>
RxRatpack. promiseAll(ObservableOnSubscribe<T> onSubscribe)
Converts anObservable
into aPromise
, for all of the observable's items.Methods in ratpack.rx2 with parameters of type Promise Modifier and Type Method Description static <T,I extends Iterable<T>>
Observable<T>RxRatpack. observe(Promise<I> promise)
Observe a promise list as an observable stream.static <T> Single<T>
RxRatpack. single(Promise<T> promise)
-
Uses of Promise in ratpack.session
Methods in ratpack.session that return Promise Modifier and Type Method Description default <T> Promise<Optional<T>>
Session. get(Class<T> type)
A convenience shorthand forSessionData.get(Class)
.default <T> Promise<Optional<T>>
Session. get(Class<T> type, SessionSerializer serializer)
A convenience shorthand forSessionData.get(Class, SessionSerializer)
.default Promise<Optional<?>>
Session. get(String name)
A convenience shorthand forSessionData.get(String)
.default Promise<Optional<?>>
Session. get(String name, SessionSerializer serializer)
A convenience shorthand forSessionData.get(String, SessionSerializer)
.default <T> Promise<Optional<T>>
Session. get(SessionKey<T> key)
A convenience shorthand forSessionData.get(SessionKey)
.default <T> Promise<Optional<T>>
Session. get(SessionKey<T> key, SessionSerializer serializer)
A convenience shorthand forSessionData.get(SessionKey, SessionSerializer)
.Promise<SessionData>
Session. getData()
The session data.default Promise<Set<SessionKey<?>>>
Session. getKeys()
A convenience shorthand forSessionData.getKeys()
.Promise<io.netty.buffer.ByteBuf>
SessionStore. load(io.netty.util.AsciiString sessionId)
Reads the session data for the given id.default <T> Promise<T>
Session. require(Class<T> type)
A convenience shorthand forSessionData.require(Class)
.default <T> Promise<T>
Session. require(Class<T> type, SessionSerializer serializer)
A convenience shorthand forSessionData.require(Class, SessionSerializer)
.default Promise<?>
Session. require(String name)
A convenience shorthand forSessionData.require(String)
.default Promise<?>
Session. require(String name, SessionSerializer serializer)
A convenience shorthand forSessionData.require(String, SessionSerializer)
.default <T> Promise<T>
Session. require(SessionKey<T> key)
A convenience shorthand forSessionData.require(SessionKey)
.default <T> Promise<T>
Session. require(SessionKey<T> key, SessionSerializer serializer)
A convenience shorthand forSessionData.require(SessionKey, SessionSerializer)
.Promise<Long>
SessionStore. size()
The current number of sessions. -
Uses of Promise in ratpack.test.exec
Method parameters in ratpack.test.exec with type arguments of type Promise Modifier and Type Method Description <T> ExecResult<T>
ExecHarness. yield(Action<? super RegistrySpec> registry, Function<? super Execution,? extends Promise<T>> func)
Synchronously returns a promised value.default <T> ExecResult<T>
ExecHarness. yield(Function<? super Execution,? extends Promise<T>> func)
Synchronously returns a promised value.static <T> ExecResult<T>
ExecHarness. yieldSingle(Action<? super RegistrySpec> registry, Function<? super Execution,? extends Promise<T>> func)
Creates an exec harness,executes
the given function with it before closing it, then returning execution result.static <T> ExecResult<T>
ExecHarness. yieldSingle(Function<? super Execution,? extends Promise<T>> func)
Creates an exec harness,executes
the given function with it before closing it, then returning execution result.
-