final class IORuntimeBuilder extends IORuntimeBuilderPlatform
Builder object for creating custom IORuntime
s. Useful for creating IORuntime based on
the default one but with some wrappers around execution contexts or custom shutdown hooks.
- Source
- IORuntimeBuilder.scala
- Alphabetic
- By Inheritance
- IORuntimeBuilder
- IORuntimeBuilderPlatform
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new IORuntimeBuilder(customCompute: Option[(ExecutionContext, () => Unit)] = None, computeTransform: (ExecutionContext) => ExecutionContext = identity, customBlocking: Option[(ExecutionContext, () => Unit)] = None, blockingTransform: (ExecutionContext) => ExecutionContext = identity, customConfig: Option[IORuntimeConfig] = None, customScheduler: Option[(Scheduler, () => Unit)] = None, extraShutdownHooks: List[() => Unit] = Nil, builderExecuted: Boolean = false, failureReporter: (Throwable) => Unit = _.printStackTrace())
- Attributes
- protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- var blockingTransform: (ExecutionContext) => ExecutionContext
- Attributes
- protected
- def build(): IORuntime
- var builderExecuted: Boolean
- Attributes
- protected
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- var computeTransform: (ExecutionContext) => ExecutionContext
- Attributes
- protected
- var customBlocking: Option[(ExecutionContext, () => Unit)]
- Attributes
- protected
- var customCompute: Option[(ExecutionContext, () => Unit)]
- Attributes
- protected
- var customConfig: Option[IORuntimeConfig]
- Attributes
- protected
- var customScheduler: Option[(Scheduler, () => Unit)]
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- var extraShutdownHooks: List[() => Unit]
- Attributes
- protected
- var failureReporter: (Throwable) => Unit
- Attributes
- protected
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def platformSpecificBuild: IORuntime
- Attributes
- protected
- Definition Classes
- IORuntimeBuilderPlatform
- 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
- 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
- def setConfig(config: IORuntimeConfig): IORuntimeBuilder
Provide custom IORuntimeConfig for created IORuntime
Provide custom IORuntimeConfig for created IORuntime
- config
the runtime configuration
- def setFailureReporter(f: (Throwable) => Unit): IORuntimeBuilder
- def setScheduler(scheduler: Scheduler, shutdown: () => Unit): IORuntimeBuilder
Override the default scheduler
Override the default scheduler
- scheduler
the custom scheduler
- shutdown
Scheduler shutdown hook
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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
- 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
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()