Interface FuturableJob<INPUT,OUTPUT,R,CTX>

Type Parameters:
INPUT - Type of job input
OUTPUT - Type of job output
R - Type of Rxified execution result
CTX - Type of Rxified execution context
All Superinterfaces:
AsyncJob<INPUT,OUTPUT>, Job<INPUT,OUTPUT>
All Known Subinterfaces:
CompletionStageJob<INPUT,OUTPUT>, MutinyJob<INPUT,OUTPUT>, io.github.zero88.schedulerx.rxjava3.Rx3Job<INPUT,OUTPUT,T>, Rx3MaybeJob<INPUT,OUTPUT>, Rx3SingleJob<INPUT,OUTPUT>

public interface FuturableJob<INPUT,OUTPUT,R,CTX> extends AsyncJob<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 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 job

      WARNING: After execution, be aware to call a terminal operation of Future such as Future.onSuccess(Handler), Future.onFailure(Handler) or Future.onComplete(Handler). The async job is already registered these handlers, if several handlers are registered, there is no guarantee that they will be invoked in order of registration.

      Specified by:
      asyncExecute in interface AsyncJob<INPUT,OUTPUT>
      Parameters:
      jobData - job data
      executionContext - job execution context
      Returns:
      the job result in future
      See Also:
    • transformContext

      CTX transformContext(@NotNull @NotNull ExecutionContext<OUTPUT> executionContext)
      Transform execution context to Rxified execution context
      Parameters:
      executionContext - job execution context
      Returns:
      Rxified execution context
      See Also:
    • transformResult

      io.vertx.core.Future<OUTPUT> transformResult(R result)
      Transform the Rxified execution result to Vert.x Future version
      Parameters:
      result - Rxified execution result
      Returns:
      the execution result in Future
    • doExecute

      R doExecute(@NotNull @NotNull JobData<INPUT> jobData, @NotNull CTX executionContext)
      Async execute
      Parameters:
      jobData - job data
      executionContext - job execution context
      Returns:
      the Rxified execution result