See: Description
Interface | Description |
---|---|
CompletionHandler<V> |
Handler which can be attached to instances of
Promise to be notified once a value is available or when the
computation failed. |
Orchestration |
Provides a way of intercepting background tasks like
BackgroundLoop and EveryDay
to synchronize those activities across a cluster. |
SubContext |
Represents a sub context which can be managed by
CallContext . |
TaskContextAdapter |
Implementations of this interface can be attached to a
TaskContext of a thread to
perform
monitoring and logging. |
Class | Description |
---|---|
AsyncExecutor |
Represents an executor used by sirius to schedule background tasks.
|
BackgroundLoop |
Represents a background worker which is constantly processing a set of tasks (if available).
|
Barrier |
Provides a simple barrier to wait for the completion of a set of tasks represented by
Barrier . |
BasicTaskContextAdapter |
Default implementation for TaskContextAdapter
|
CallContext |
A CallContext is attached to each thread managed by sirius.
|
DelayLine |
Permits to delay the execution of a task by a certain amount of seconds.
|
ExecutionBuilder |
Builder pattern for forking or starting sub tasks.
|
ExecutionPoint |
Represents a state of execution, which is kind of an extended stack trace.
|
Future |
Represents an untyped
Promise where the completion or failure is more important than the result itself. |
Operation |
Tracks the execution of a blocking operation.
|
Operation.OperationMetrics |
Provides metrics of the operation monitoring.
|
Promise<V> |
Represents a value which is computed by another task or thread.
|
TaskContext |
Provides an interface between a running task and a monitoring system.
|
Tasks |
Static helper for managing and scheduling asynchronous background tasks.
|
Most of the functionality is accessed via the Tasks
class. This can be used to
submit tasks to executors which are configured via the extension async.executor.
Another central class is the CallContext
. This is attached to a thread and will be
passed along to subtasks. This can be used to provide implicit information like the current user for all
subsequent actions of a task. Also this contains the mapped diagnostic context (MDC) which can be useful
for debugging and logging, as it reveals the current context and flow of execution through several threads.
Also, Promise
is a class representing a central concept. A promise can be returned
by a call which internally starts a computation which does not immediately complete. The returned promise can
be passed on or have completion handlers attached. This permits a non-block way of interacting between several
threads and system components. The class Future
is basically an untyped promise and
can be used to wait for the completion of a task which has no immediate return value.
Copyright © 2018. All rights reserved.