Packages

final class IORuntimeBuilder extends IORuntimeBuilderPlatform

Builder object for creating custom IORuntimes. Useful for creating IORuntime based on the default one but with some wrappers around execution contexts or custom shutdown hooks.

Source
IORuntimeBuilder.scala
Linear Supertypes
IORuntimeBuilderPlatform, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IORuntimeBuilder
  2. IORuntimeBuilderPlatform
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def addShutdownHook(shutdown: () => Unit): IORuntimeBuilder

    Introduce additional shutdown hook to be executed after compute, blocking and scheduler shutdown logic is invoked

    Introduce additional shutdown hook to be executed after compute, blocking and scheduler shutdown logic is invoked

    shutdown

    the shutdown hook executed upon IORuntime shutdown

  2. def build(): IORuntime
  3. def setBlocking(blocking: ExecutionContext, shutdown: () => Unit): IORuntimeBuilder

    Override the default blocking execution context

    Override the default blocking execution context

    blocking

    the ExecutionContext for blocking operations

    shutdown

    ExecutionContext shutdown hook

  4. def setCompute(compute: ExecutionContext, shutdown: () => Unit): IORuntimeBuilder

    Set a custom compute pool

    Set a custom compute pool

    compute

    the ExecutionContext for the compute pool

    shutdown

    IORuntime shutdown hook

  5. def setConfig(config: IORuntimeConfig): IORuntimeBuilder

    Provide custom IORuntimeConfig for created IORuntime

    Provide custom IORuntimeConfig for created IORuntime

    config

    the runtime configuration

  6. def setFailureReporter(f: (Throwable) => Unit): IORuntimeBuilder
  7. def setScheduler(scheduler: Scheduler, shutdown: () => Unit): IORuntimeBuilder

    Override the default scheduler

    Override the default scheduler

    scheduler

    the custom scheduler

    shutdown

    Scheduler shutdown hook

  8. def transformBlocking(transform: (ExecutionContext) => ExecutionContext): IORuntimeBuilder

    Modifies the execution underlying blocking execution context.

    Modifies the execution underlying blocking execution context. Useful in case you want to use the default blocking context but add extra logic to execute, e.g. for adding instrumentation.

    transform

    the modification of the current blocking execution context

  9. def transformCompute(transform: (ExecutionContext) => ExecutionContext): IORuntimeBuilder

    Modifies the execution underlying execution context.

    Modifies the execution underlying execution context. Useful in case you want to use the default compute but add extra logic to execute, e.g. for adding instrumentation.

    transform

    the modification of the current compute execution context