- AcceptCallback(Coroutine<AsynchronousSocketChannel, ?>, Suspension<Void>) - Constructor for class de.esoco.coroutine.step.nio.ServerSocketAccept.AcceptCallback
-
Creates a new instance.
- acceptRequestOn(Function<Continuation<?>, SocketAddress>, Coroutine<AsynchronousSocketChannel, ?>) - Static method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Accepts an incoming request on the given socket address and then handles
it by executing the given coroutine with the client socket channel as
it's input.
- add(Continuation<? extends V>) - Method in class de.esoco.coroutine.Selection
-
Adds a continuation to this group.
- and(Coroutine<? super I, ? extends O>) - Method in class de.esoco.coroutine.step.Collect
-
Creates a new instance that collects the result of an additional
coroutine.
- and(CoroutineStep<? super I, ? extends O>) - Method in class de.esoco.coroutine.step.Collect
-
Creates a new instance that collects the result of an additional step.
- apply(Function<I, O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Applies a Function
to the step input and return the processed
output.
- apply(BiFunction<I, Continuation<?>, O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Applies a BiFunction
to the step input and the continuation of
the current execution and return the processed output.
- AsynchronousChannelStep<I,O> - Class in de.esoco.coroutine.step.nio
-
The base class for coroutine steps that perform communication through
instances of AsynchronousChannel
.
- AsynchronousChannelStep() - Constructor for class de.esoco.coroutine.step.nio.AsynchronousChannelStep
-
- AsynchronousChannelStep.ChannelCallback<V,C extends java.nio.channels.AsynchronousChannel> - Class in de.esoco.coroutine.step.nio
-
A CompletionHandler
implementation that performs an asynchronous
channel operation and resumes a coroutine step afterwards
(asynchronously).
- AsynchronousChannelStep.ChannelOperation<C extends java.nio.channels.AsynchronousChannel> - Interface in de.esoco.coroutine.step.nio
-
- AsynchronousFileStep - Class in de.esoco.coroutine.step.nio
-
The base class for coroutine steps that perform communication on instances of
AsynchronousFileChannel
.
- AsynchronousFileStep(Function<Continuation<?>, AsynchronousFileChannel>) - Constructor for class de.esoco.coroutine.step.nio.AsynchronousFileStep
-
Creates a new instance that opens a file channel with the given factory.
- AsynchronousSocketStep - Class in de.esoco.coroutine.step.nio
-
The base class for coroutine steps that perform communication on instances of
AsynchronousSocketChannel
.
- AsynchronousSocketStep(Function<Continuation<?>, SocketAddress>) - Constructor for class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
Creates a new instance that connects to the socket with the address
provided by the given factory.
- await() - Method in class de.esoco.coroutine.Continuation
-
Awaits the completion of the coroutine execution.
- await(long, TimeUnit) - Method in class de.esoco.coroutine.Continuation
-
Awaits the completion of this continuation but only until a timeout is
reached.
- await() - Method in class de.esoco.coroutine.CoroutineScope
-
Blocks until all coroutines in this scope have finished execution.
- await(long, TimeUnit) - Method in class de.esoco.coroutine.CoroutineScope
-
Blocks until all coroutines in this scope have finished execution or a
timeout expires.
- awaitAllScopes() - Method in class de.esoco.coroutine.CoroutineContext
-
Blocks until the coroutines of all
scopes
in this
context have finished execution.
- call(Coroutine<I, O>) - Static method in class de.esoco.coroutine.step.CallSubroutine
-
Calls a coroutine as a subroutine of the coroutine this step is added to.
- CallSubroutine<I,O> - Class in de.esoco.coroutine.step
-
A
Coroutine
step that executes another coroutine in the context of
the parent routine.
- CallSubroutine(Coroutine<I, O>) - Constructor for class de.esoco.coroutine.step.CallSubroutine
-
Creates a new instance.
- cancel() - Method in class de.esoco.coroutine.Continuation
-
Cancels the execution of the associated
Coroutine
at the next
suspension point.
- cancel() - Method in class de.esoco.coroutine.CoroutineScope
-
Cancels the execution of all coroutines that are currently running in
this scope.
- cancel(boolean) - Method in class de.esoco.coroutine.CoroutineScope.ScopeFuture
- cancel() - Method in class de.esoco.coroutine.Selection
-
Cancels this suspension.
- cancel() - Method in class de.esoco.coroutine.Suspension
-
Cancels this suspension.
- Channel<T> - Class in de.esoco.coroutine
-
A channel that allows communication between
Coroutines
.
- Channel(ChannelId<T>, int) - Constructor for class de.esoco.coroutine.Channel
-
Creates a new instance.
- channel(String, Class<T>) - Static method in interface de.esoco.coroutine.ChannelId
-
Creates a new channel ID from an identifier string.
- CHANNEL_GROUP - Static variable in class de.esoco.coroutine.step.nio.AsynchronousChannelStep
-
State: the AsynchronousChannelGroup
to associate any new
asynchronous channels with.
- ChannelCallback(C, Suspension<ByteBuffer>, AsynchronousChannelStep.ChannelOperation<C>) - Constructor for class de.esoco.coroutine.step.nio.AsynchronousChannelStep.ChannelCallback
-
Creates a new instance.
- ChannelClosedException - Exception in de.esoco.coroutine
-
A coroutine exception that is thrown if a closed channel is accessed.
- ChannelClosedException(ChannelId<?>) - Constructor for exception de.esoco.coroutine.ChannelClosedException
-
Creates a new instance.
- ChannelId<T> - Interface in de.esoco.coroutine
-
This is a marker interface for identifiers of
channels
which
are used for communication between
coroutines
.
- ChannelId.StringId<T> - Class in de.esoco.coroutine
-
Internal implementation of string-based channel IDs.
- ChannelReceive<T> - Class in de.esoco.coroutine.step
-
A coroutine step that receives a value from a channel.
- ChannelReceive(Function<Continuation<?>, ChannelId<T>>) - Constructor for class de.esoco.coroutine.step.ChannelReceive
-
Creates a new instance that receives from a channel the ID of which is
provided in a state relation.
- ChannelSend<T> - Class in de.esoco.coroutine.step
-
A coroutine step that sends a value into a channel.
- ChannelSend(Function<Continuation<?>, ChannelId<T>>) - Constructor for class de.esoco.coroutine.step.ChannelSend
-
Creates a new instance that sends to a channel the ID of which is
provided in a state relation.
- ChannelStep<I,O> - Class in de.esoco.coroutine.step
-
A base class for coroutine steps that perform
Channel
operations.
- ChannelStep(Function<Continuation<?>, ChannelId<O>>) - Constructor for class de.esoco.coroutine.step.ChannelStep
-
Creates a new instance that operates on a channel the ID of which is
provided by a certain function that will be applied to the continuation
of an execution.
- checkClosed() - Method in class de.esoco.coroutine.Channel
-
- close() - Method in class de.esoco.coroutine.Channel
-
Closes this channel.
- closeManagedResources(Relatable, Consumer<Throwable>) - Static method in class de.esoco.coroutine.Coroutines
-
Iterates over all relations in the given state object that are annotated
with MetaTypes.MANAGED
and closes them if they implement the
AutoCloseable
interface.
- CodeExecution<I,O> - Class in de.esoco.coroutine.step
-
An coroutine step that executes a code function.
- CodeExecution(BiFunction<I, Continuation<?>, O>) - Constructor for class de.esoco.coroutine.step.CodeExecution
-
Creates a new instance from a binary function that accepts the
continuation of the execution and the input value.
- CodeExecution(Function<I, O>) - Constructor for class de.esoco.coroutine.step.CodeExecution
-
Creates a new instance from a simple function that processes the input
into the output value.
- Collect<I,O> - Class in de.esoco.coroutine.step
-
A coroutine step that suspends the coroutine execution until the results of
several other asynchronously executed coroutines are available.
- Collect(Collection<Coroutine<? super I, ? extends O>>) - Constructor for class de.esoco.coroutine.step.Collect
-
Creates a new instance.
- collect(Coroutine<? super I, ? extends O>...) - Static method in class de.esoco.coroutine.step.Collect
-
Suspends the coroutine execution until all coroutines finish and then
resumes the execution with a collection of the results.
- collect(CoroutineStep<? super I, ? extends O>...) - Static method in class de.esoco.coroutine.step.Collect
-
Suspends the coroutine execution until one coroutine step finishes.
- collectEach(CoroutineStep<T, R>) - Static method in class de.esoco.coroutine.step.Iteration
-
Collects all processed elements into a list.
- collectEachInto(Supplier<C>, CoroutineStep<T, R>) - Static method in class de.esoco.coroutine.step.Iteration
-
Iterates over the elements in an Iterable
input value, processes
each element with another coroutine step, and collects the resulting
values into a target collection.
- completed(V, ByteBuffer) - Method in class de.esoco.coroutine.step.nio.AsynchronousChannelStep.ChannelCallback
- completed(AsynchronousSocketChannel, Void) - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept.AcceptCallback
- Condition<I,O> - Class in de.esoco.coroutine.step
-
A
Coroutine
step that test a logical expression in the form of a
Predicate
or
BiPredicate
and executes certain steps (which
may be a subroutines) based on the boolean result.
- Condition(BiPredicate<? super I, Continuation<?>>, CoroutineStep<I, O>, CoroutineStep<I, O>) - Constructor for class de.esoco.coroutine.step.Condition
-
Creates a new instance.
- consume(Consumer<T>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Consumes the input value with a Consumer
and creates no result.
- consume(BiConsumer<T, Continuation<?>>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Consumes the input value with a Consumer
and creates no result.
- contentFullyRead() - Static method in class de.esoco.coroutine.step.nio.SocketReceive
-
Returns a new predicate to be used with #until(Predicate)
that
checks whether a byte buffer contains the complete content of an HTTP
response.
- context() - Method in class de.esoco.coroutine.Continuation
-
Returns the context of the executed coroutine.
- context() - Method in class de.esoco.coroutine.CoroutineScope
-
Returns the context in which coroutines of this scope are executed.
- Continuation<T> - Class in de.esoco.coroutine
-
A continuation represents the state of a coroutine execution.
- Continuation(CoroutineScope, Coroutine<?, T>) - Constructor for class de.esoco.coroutine.Continuation
-
Creates a new instance for the execution of the given
Coroutine
in a certain scope.
- continuation() - Method in class de.esoco.coroutine.Suspension
-
Returns the continuation of the suspended coroutine.
- Coroutine<I,O> - Class in de.esoco.coroutine
-
A pure Java implementation of cooperative concurrency, also known as
coroutines.
- Coroutine(CoroutineStep<I, O>) - Constructor for class de.esoco.coroutine.Coroutine
-
Creates a new instance that starts execution with a certain step.
- Coroutine.Subroutine<I,T,O> - Class in de.esoco.coroutine
-
A coroutine subclass for the invocation of coroutines as subroutines in
the context of another execution.
- COROUTINE_LISTENERS - Static variable in class de.esoco.coroutine.Coroutines
-
Configuration: coroutine event listeners that will be invoked when
coroutines are started or finished.
- COROUTINE_STEP_LISTENER - Static variable in class de.esoco.coroutine.Coroutines
-
Configuration: a single listener for coroutine step executions.
- COROUTINE_SUSPENSION_LISTENER - Static variable in class de.esoco.coroutine.Coroutines
-
Configuration: a single listener for coroutine suspensions.
- CoroutineContext - Class in de.esoco.coroutine
-
- CoroutineContext() - Constructor for class de.esoco.coroutine.CoroutineContext
-
Creates a new instance that uses the common thread pool
as the executor.
- CoroutineContext(Executor) - Constructor for class de.esoco.coroutine.CoroutineContext
-
Creates a new instance with a specific coroutine executor.
- CoroutineContext(Executor, ScheduledExecutorService) - Constructor for class de.esoco.coroutine.CoroutineContext
-
Creates a new instance with a specific coroutine executor and scheduler.
- CoroutineEnvironment - Class in de.esoco.coroutine
-
A base class for environments to execute coroutines in.
- CoroutineEnvironment() - Constructor for class de.esoco.coroutine.CoroutineEnvironment
-
- CoroutineEvent - Class in de.esoco.coroutine
-
The event object for coroutine events.
- CoroutineEvent(Continuation<?>, CoroutineEvent.EventType) - Constructor for class de.esoco.coroutine.CoroutineEvent
-
Creates a new instance.
- CoroutineEvent.EventType - Enum in de.esoco.coroutine
-
The available event types.
- CoroutineException - Exception in de.esoco.coroutine
-
The base class of unchecked exceptions that may be thrown by
Coroutine
executions.
- CoroutineException(Throwable) - Constructor for exception de.esoco.coroutine.CoroutineException
-
Creates a new instance.
- CoroutineException(String, Object...) - Constructor for exception de.esoco.coroutine.CoroutineException
-
Creates a new instance with a formatted message.
- CoroutineException(String, Throwable) - Constructor for exception de.esoco.coroutine.CoroutineException
-
Creates a new instance.
- Coroutines - Class in de.esoco.coroutine
-
Contains global
Coroutine
management functions and relation types.
- CoroutineScope - Class in de.esoco.coroutine
-
A scope that manages one or more running coroutines.
- CoroutineScope.ScopeCode - Interface in de.esoco.coroutine
-
- CoroutineScope.ScopeFuture<T> - Class in de.esoco.coroutine
-
An implementation of the future interface that wraps a scope execution.
- CoroutineScopeException - Exception in de.esoco.coroutine
-
- CoroutineScopeException(Collection<Continuation<?>>) - Constructor for exception de.esoco.coroutine.CoroutineScopeException
-
Creates a new instance from the continuations of failed coroutines.
- CoroutineScopeException(Throwable, Collection<Continuation<?>>) - Constructor for exception de.esoco.coroutine.CoroutineScopeException
-
Creates a new instance from an explicit causing exception and optional
continuations of failed coroutines.
- CoroutineStep<I,O> - Class in de.esoco.coroutine
-
This is the base class for all steps of coroutines.
- CoroutineStep() - Constructor for class de.esoco.coroutine.CoroutineStep
-
Creates a new instance.
- createChannel(ChannelId<T>, int) - Method in class de.esoco.coroutine.CoroutineEnvironment
-
- equals(Object) - Method in class de.esoco.coroutine.ChannelId.StringId
- errorHandled() - Method in class de.esoco.coroutine.Continuation
-
Marks an error of this continuation as handled.
- EXCEPTION_HANDLER - Static variable in class de.esoco.coroutine.Coroutines
-
Configuration: A handler for coroutine exceptions.
- execute(Runnable) - Method in class de.esoco.coroutine.Continuation
-
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.CoroutineStep
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.CallSubroutine
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(Void, Continuation<?>) - Method in class de.esoco.coroutine.step.ChannelReceive
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(T, Continuation<?>) - Method in class de.esoco.coroutine.step.ChannelSend
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.CodeExecution
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.Collect
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.Condition
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(T, Continuation<?>) - Method in class de.esoco.coroutine.step.Delay
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.Iteration
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(T, Continuation<?>) - Method in class de.esoco.coroutine.step.Loop
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(int, C, ByteBuffer, AsynchronousChannelStep.ChannelCallback<Integer, C>) - Method in interface de.esoco.coroutine.step.nio.AsynchronousChannelStep.ChannelOperation
-
Performs an asnychronous channel operation if necessary or returns
FALSE.
- execute(ByteBuffer, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousFileStep
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(ByteBuffer, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(Void, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- execute(I, Continuation<?>) - Method in class de.esoco.coroutine.step.Select
-
This method must be implemented by subclasses to provide the actual
functionality of this step.
- get() - Method in class de.esoco.coroutine.CoroutineScope.ScopeFuture
- get(long, TimeUnit) - Method in class de.esoco.coroutine.CoroutineScope.ScopeFuture
- getChannel(ChannelId<C>) - Method in class de.esoco.coroutine.Continuation
-
Duplicated here for easier access during coroutine execution.
- getChannel(ChannelId<T>) - Method in class de.esoco.coroutine.CoroutineEnvironment
-
Returns a channel for a certain ID.
- getChannel(ChannelId<T>) - Method in class de.esoco.coroutine.CoroutineScope
-
- getChannel(Continuation<?>) - Method in class de.esoco.coroutine.step.ChannelStep
-
Returns the channel this step operates on.
- getChannelGroup(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousChannelStep
-
Returns the AsynchronousChannelGroup
for asynchronous channel
operations in the current scope.
- getChannelId() - Method in exception de.esoco.coroutine.ChannelClosedException
-
Returns the channel id.
- getConfiguration(RelationType<V>) - Method in class de.esoco.coroutine.Continuation
-
Returns a configuration value with a default value of NULL.
- getConfiguration(RelationType<V>, V) - Method in class de.esoco.coroutine.Continuation
-
Returns the value of a configuration relation.
- getCoroutineCount() - Method in class de.esoco.coroutine.CoroutineScope
-
Returns the number of currently running coroutines.
- getCurrentCoroutine() - Method in class de.esoco.coroutine.Continuation
-
Returns either the root coroutine or, if subroutines have been started
from it, the currently executing subroutine.
- getCurrentSuspension() - Method in class de.esoco.coroutine.Continuation
-
Returns the current suspension.
- getDefaultContext() - Static method in class de.esoco.coroutine.Coroutines
-
- getError() - Method in class de.esoco.coroutine.Continuation
-
Returns the error exception that caused a coroutine cancelation.
- getExecutor() - Method in class de.esoco.coroutine.CoroutineContext
-
Returns the executor to be used for the execution of the steps of a
Coroutine
.
- getFailedContinuations() - Method in exception de.esoco.coroutine.CoroutineScopeException
-
Returns the failed continuations that caused this exception.
- getFileChannel(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousFileStep
-
Returns the channel to be used by this step.
- getFileChannelFactory() - Method in class de.esoco.coroutine.step.nio.AsynchronousFileStep
-
Returns the file channel factory of this step.
- getId() - Method in class de.esoco.coroutine.Channel
-
Returns the channel identifier.
- getParameter(RelationType<O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Queries a parameter relation from the
Continuation
and returns it
as the result of the execution.
- getResult() - Method in class de.esoco.coroutine.Continuation
-
Return the result of the coroutine execution.
- getResult(long, TimeUnit) - Method in class de.esoco.coroutine.Continuation
-
Return the result of the coroutine execution or throws a
CoroutineException
if a timeout is reached.
- getScheduler() - Method in class de.esoco.coroutine.CoroutineContext
-
Returns the executor to be used for the execution of timed steps in a
Coroutine
.
- getScopeCount() - Method in class de.esoco.coroutine.CoroutineContext
-
Returns the number of currently active
scopes
.
- getScopeParameter(RelationType<O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Queries a parameter relation from the
CoroutineScope
and returns
it as the result of the execution.
- getServerSocketChannel(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Returns the channel to be used by this step.
- getSocketAddress(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
Returns the address of the socket to connect to.
- getSocketAddress(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Returns the address of the socket to connect to.
- getSocketAddressFactory() - Method in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
Returns the socket address factory of this step.
- getSocketAddressFactory() - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Returns the socket address factory of this step.
- getSocketChannel(Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
Returns the channel to be used by this step.
- getState(RelationType<V>) - Method in class de.esoco.coroutine.Continuation
-
Returns a state value with a default value of NULL.
- getState(RelationType<V>, V) - Method in class de.esoco.coroutine.Continuation
-
Returns the value of a runtime state relation of the current execution.
- getType() - Method in class de.esoco.coroutine.CoroutineEvent
-
Returns the event type.
- readFrom(Function<Continuation<?>, AsynchronousFileChannel>) - Static method in class de.esoco.coroutine.step.nio.FileRead
-
Suspends until a file has been read completely.
- readFrom(String, OpenOption...) - Static method in class de.esoco.coroutine.step.nio.FileRead
-
- receive(ChannelId<T>) - Static method in class de.esoco.coroutine.step.ChannelReceive
-
Suspends until a value can be received from a certain channel.
- receive(Function<Continuation<?>, ChannelId<T>>) - Static method in class de.esoco.coroutine.step.ChannelReceive
-
Suspends until a value can be received from the channel with the ID
provided by the given function.
- receiveBlocking() - Method in class de.esoco.coroutine.Channel
-
Receives a value from this channel, blocking if no data is available.
- receiveFrom(Function<Continuation<?>, SocketAddress>) - Static method in class de.esoco.coroutine.step.nio.SocketReceive
-
Suspends until data has been received from a network socket.
- receiveFrom(SocketAddress) - Static method in class de.esoco.coroutine.step.nio.SocketReceive
-
- receiveSuspending(Suspension<T>) - Method in class de.esoco.coroutine.Channel
-
Tries to receive a value from this channel and resumes the execution of a
Coroutine
at the given suspension as soon as a value becomes
available.
- receiveUntil(BiPredicate<Integer, ByteBuffer>) - Static method in class de.esoco.coroutine.step.nio.SocketReceive
-
Suspends until data has been received from a previously connected channel
stored in the currently executed coroutine.
- remainingCapacity() - Method in class de.esoco.coroutine.Channel
-
Returns the number of values that can still be send to this channel.
- removeChannel(ChannelId<?>) - Method in class de.esoco.coroutine.CoroutineEnvironment
-
Removes a channel from this context.
- removeChannel(ChannelId<?>) - Method in class de.esoco.coroutine.CoroutineScope
-
- resume() - Method in class de.esoco.coroutine.Suspension
-
Resumes the execution of the suspended coroutine with the input value
provided to the constructor.
- resume(T) - Method in class de.esoco.coroutine.Suspension
-
Resumes the execution of the suspended coroutine with the given value.
- run(Runnable) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Executes a Runnable
, ignoring any input value and returning no
result.
- run(Consumer<Continuation<?>>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Executes a Runnable
, ignoring any input value and returning no
result.
- runAsync(CoroutineScope) - Method in class de.esoco.coroutine.Coroutine
-
Runs a copy of this coroutine asynchronously in the given scope with an
input value of NULL.
- runAsync(CoroutineScope, I) - Method in class de.esoco.coroutine.Coroutine
-
Runs a copy of this coroutine asynchronously in a certain scope.
- runAsync(CompletableFuture<I>, Continuation<?>) - Method in class de.esoco.coroutine.Coroutine.Subroutine
-
Executes this subroutine asynchronously in the given future and
continuation.
- runAsync(CompletableFuture<I>, CoroutineStep<O, ?>, Continuation<?>) - Method in class de.esoco.coroutine.CoroutineStep
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<I>, CoroutineStep<O, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.CallSubroutine
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<Void>, CoroutineStep<T, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.ChannelReceive
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<T>, CoroutineStep<T, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.ChannelSend
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<I>, CoroutineStep<Collection<O>, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Collect
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<I>, CoroutineStep<O, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Condition
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<T>, CoroutineStep<T, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Delay
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<I>, CoroutineStep<C, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Iteration
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<T>, CoroutineStep<T, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Loop
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<ByteBuffer>, CoroutineStep<ByteBuffer, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousFileStep
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<ByteBuffer>, CoroutineStep<ByteBuffer, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<Void>, CoroutineStep<Void, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runAsync(CompletableFuture<I>, CoroutineStep<O, ?>, Continuation<?>) - Method in class de.esoco.coroutine.step.Select
-
Runs this execution step asynchronously as a continuation of a previous
code execution in a CompletableFuture
and proceeds to the next
step afterwards.
- runBlocking(CoroutineScope) - Method in class de.esoco.coroutine.Coroutine
-
Runs a copy of this coroutine in the given scope with an input value of
NULL and blocks the current thread until the coroutine finished.
- runBlocking(CoroutineScope, I) - Method in class de.esoco.coroutine.Coroutine
-
Runs a copy of this coroutine in a certain scope and blocks the current
thread until the coroutine finished.
- runBlocking(I, Continuation<?>) - Method in class de.esoco.coroutine.Coroutine.Subroutine
-
Executes this subroutine synchronously in the given continuation.
- runBlocking(I, Continuation<?>) - Method in class de.esoco.coroutine.CoroutineStep
-
Runs this execution immediately, blocking the current thread until the
execution finishes.
- runIn(CoroutineScope) - Method in interface de.esoco.coroutine.CoroutineScope.ScopeCode
-
Starts coroutines in the given
CoroutineScope
by invoking
methods like
CoroutineScope#async(Coroutine)
on it and
optionally also performs other operations, like processing the
results.
- scope() - Method in class de.esoco.coroutine.Continuation
-
Returns the scope in which the coroutine is executed.
- ScopeFuture(CoroutineScope, Function<? super CoroutineScope, T>, CoroutineScope.ScopeCode) - Constructor for class de.esoco.coroutine.CoroutineScope.ScopeFuture
-
Creates a new instance for a certain scope.
- seal() - Method in class de.esoco.coroutine.Selection
-
- Select<I,O> - Class in de.esoco.coroutine.step
-
A coroutine step that suspends the coroutine execution until the first
matching result of several other asynchronously executed coroutines are
available.
- Select(Collection<Coroutine<? super I, ? extends O>>) - Constructor for class de.esoco.coroutine.step.Select
-
Creates a new instance.
- select(Coroutine<? super I, ? extends O>...) - Static method in class de.esoco.coroutine.step.Select
-
Suspends the coroutine execution until one coroutine finishes and then
resumes the execution with the result.
- select(CoroutineStep<? super I, ? extends O>...) - Static method in class de.esoco.coroutine.step.Select
-
Suspends the coroutine execution until one coroutine step finishes.
- Selection<T,V,R> - Class in de.esoco.coroutine
-
A
Suspension
subclass that selects the suspension result from one or
more of multiple continuations based on certain criteria.
- send(ChannelId<T>) - Static method in class de.esoco.coroutine.step.ChannelSend
-
Suspends until a value can be sent to a certain channel.
- send(Function<Continuation<?>, ChannelId<T>>) - Static method in class de.esoco.coroutine.step.ChannelSend
-
Suspends until a value can be sent to the channel with the ID provided by
the given function.
- sendBlocking(T) - Method in class de.esoco.coroutine.Channel
-
Sends a value into this channel, blocking if no capacity is available.
- sendSuspending(Suspension<T>) - Method in class de.esoco.coroutine.Channel
-
Tries to send a value into this channel and resumes the execution of a
Coroutine
at the given step as soon as channel capacity becomes
available.
- sendTo(Function<Continuation<?>, SocketAddress>) - Static method in class de.esoco.coroutine.step.nio.SocketSend
-
Suspends until all data from the input ByteBuffer
has been sent
to a network socket.The buffer must be initialized for sending, i.e. if
necessary a call to Buffer.flip()
must have been performed.
- sendTo(SocketAddress) - Static method in class de.esoco.coroutine.step.nio.SocketSend
-
- SERVER_SOCKET_CHANNEL - Static variable in class de.esoco.coroutine.step.nio.ServerSocketAccept
-
State: an AsynchronousServerSocketChannel
that has been openened
and connected by an asynchronous execution.
- ServerSocketAccept - Class in de.esoco.coroutine.step.nio
-
A coroutine step for servers that listens to network request through an
instance of AsynchronousServerSocketChannel
.
- ServerSocketAccept(Function<Continuation<?>, SocketAddress>, Coroutine<AsynchronousSocketChannel, ?>) - Constructor for class de.esoco.coroutine.step.nio.ServerSocketAccept
-
Creates a new instance that accepts a single server request and processes
it asynchronously in a coroutine.
- ServerSocketAccept.AcceptCallback - Class in de.esoco.coroutine.step.nio
-
A CompletionHandler
implementation that receives the result of an
asynchronous accept and processes the request with an asynchronous
coroutine execution.
- setCancelOnError(boolean) - Method in class de.esoco.coroutine.CoroutineScope
-
Sets the behavior on coroutine errors in the scope.
- setDefaultContext(CoroutineContext) - Static method in class de.esoco.coroutine.Coroutines
-
- setParameter(RelationType<T>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Sets the input value into a parameter of the
Continuation
and
then returns it.
- setScopeParameter(RelationType<T>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Sets the input value into a parameter of the
CoroutineScope
and
then returns it.
- size() - Method in class de.esoco.coroutine.Channel
-
Returns the current number of values in this channel.
- sleep(int) - Static method in class de.esoco.coroutine.step.Delay
-
Suspends the coroutine execution for a certain duration in milliseconds.
- sleep(RelationType<Pair<Long, TimeUnit>>) - Static method in class de.esoco.coroutine.step.Delay
-
Suspends the coroutine execution for a duration stored in a certain state
relation.
- sleep(int, TimeUnit) - Static method in class de.esoco.coroutine.step.Delay
-
Suspends the coroutine execution for a certain duration.
- SOCKET_CHANNEL - Static variable in class de.esoco.coroutine.step.nio.AsynchronousSocketStep
-
State: the AsynchronousSocketChannel
that the steps in a
coroutine operate on.
- SocketReceive - Class in de.esoco.coroutine.step.nio
-
Implements asynchronous reading from a AsynchronousSocketChannel
.
- SocketReceive(Function<Continuation<?>, SocketAddress>, BiPredicate<Integer, ByteBuffer>) - Constructor for class de.esoco.coroutine.step.nio.SocketReceive
-
Creates a new instance.
- SocketSend - Class in de.esoco.coroutine.step.nio
-
Implements asynchronous writing to a AsynchronousSocketChannel
.
- SocketSend(Function<Continuation<?>, SocketAddress>) - Constructor for class de.esoco.coroutine.step.nio.SocketSend
-
Creates a new instance.
- stringChannel(String) - Static method in interface de.esoco.coroutine.ChannelId
-
Creates a channel ID with a string datatype.
- Subroutine(Coroutine<I, T>, CoroutineStep<T, O>) - Constructor for class de.esoco.coroutine.Coroutine.Subroutine
-
Creates a new instance that invokes the code of another coroutine as
a subroutine and then returns the control flow to a step in the
invoking subroutine.
- supply(Supplier<O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Provides a value from a Supplier
as the result, ignoring any
input value.
- supply(Function<Continuation<?>, O>) - Static method in class de.esoco.coroutine.step.CodeExecution
-
Provides a value from a Supplier
as the result, ignoring any
input value.
- suspend(CoroutineStep<?, V>, CoroutineStep<V, ?>) - Method in class de.esoco.coroutine.Continuation
-
Suspends an invoking step for later invocation.
- suspendingStep() - Method in class de.esoco.coroutine.Suspension
-
Returns the suspending step.
- suspendTo(Suspension<V>) - Method in class de.esoco.coroutine.Continuation
-
Suspends an invoking step for later invocation with the given instance of
a suspension subclass.
- Suspension<T> - Class in de.esoco.coroutine
-
Encapsulates the data that represents a suspended
Coroutine
.
- Suspension(CoroutineStep<?, T>, CoroutineStep<T, ?>, Continuation<?>) - Constructor for class de.esoco.coroutine.Suspension
-
Creates a new instance.