Package io.github.zero88.schedulerx
Interface FuturableJob<INPUT,OUTPUT,R,CTX>
- Type Parameters:
INPUT
- Type of job inputOUTPUT
- Type of job outputR
- Type ofRxified
execution resultCTX
- Type ofRxified
execution context
- All Known Subinterfaces:
CompletionStageJob<INPUT,
,OUTPUT> MutinyJob<INPUT,
,OUTPUT> io.github.zero88.schedulerx.rxjava3.Rx3Job<INPUT,
,OUTPUT, T> Rx3MaybeJob<INPUT,
,OUTPUT> Rx3SingleJob<INPUT,
OUTPUT>
An interface supports reactive version for
Job
.
This interface bridges you to write a new Job
that based on your flavor async coding style and the reactive
library such as #reactivex or
#mutiny- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.vertx.core.Future<OUTPUT>
asyncExecute
(@NotNull JobData<INPUT> jobData, @NotNull ExecutionContext<OUTPUT> executionContext) Async execute jobAsync executetransformContext
(@NotNull ExecutionContext<OUTPUT> executionContext) Transform execution context toRxified
execution contextio.vertx.core.Future<OUTPUT>
transformResult
(R result) Transform theRxified
execution result toVert.x
Future
version
-
Method Details
-
asyncExecute
default io.vertx.core.Future<OUTPUT> asyncExecute(@NotNull @NotNull JobData<INPUT> jobData, @NotNull @NotNull ExecutionContext<OUTPUT> executionContext) Description copied from interface:AsyncJob
Async execute jobWARNING: After execution, be aware to call a terminal operation of
Future
such asFuture.onSuccess(Handler)
,Future.onFailure(Handler)
orFuture.onComplete(Handler)
. The async job is already registered these handlers, if severalhandler
s are registered, there is no guarantee that they will be invoked in order of registration.- Specified by:
asyncExecute
in interfaceAsyncJob<INPUT,
OUTPUT> - Parameters:
jobData
- job dataexecutionContext
- job execution context- Returns:
- the job result in future
- See Also:
-
transformContext
Transform execution context toRxified
execution context- Parameters:
executionContext
- job execution context- Returns:
Rxified
execution context- See Also:
-
transformResult
Transform theRxified
execution result toVert.x
Future
version- Parameters:
result
-Rxified
execution result- Returns:
- the execution result in
Future
-
doExecute
Async execute- Parameters:
jobData
- job dataexecutionContext
- job execution context- Returns:
- the
Rxified
execution result
-