OtaviaConfig

cc.otavia.core.config.OtaviaConfig
See theOtaviaConfig companion object
case class OtaviaConfig(name: String = ..., system: ActorSystemConfig = ..., buffer: BufferConfig = ..., scheduler: SchedulerConfig = ..., reactor: ReactorConfig = ..., channel: ChannelConfig = ..., timer: TimerConfig = ..., spinLock: SpinLockConfig = ..., priority: PriorityConfig = ..., moduleConfigs: Map[Class[_], ModuleConfig] = ...)

Immutable top-level configuration for an cc.otavia.core.system.ActorSystem.

Built once via OtaviaConfigBuilder and passed to the actor system at creation time. All config groups are immutable case classes with sensible defaults.

Configuration values follow a priority chain: explicit builder value > system property (-D) > hardcoded default.

Example usage:

val system = ActorSystem("my-app") { builder =>
  builder.actorThreadPoolSize(4)
    .pageSize(8)
    .ioRatio(60)
    .withModuleConfig(SslConfig(cacheBufferSize = 32768))
}

// Access config from anywhere
system.config.buffer.pageSize
system.config.scheduler.ioRatio

Value parameters

buffer

Buffer allocation configuration: page size, allocator cache sizes.

channel

Channel defaults: connect timeout, write watermarks, inflight limits.

name

Name of the actor system. Used for logging and identification. Default is "ActorSystem: ".

priority

Scheduling priority thresholds: mailbox sizes that trigger high priority.

reactor

NIO reactor configuration: worker count, selector tuning.

scheduler

Actor scheduling configuration: IO ratio, time budgets, work stealing thresholds.

spinLock

Spin lock tuning: spin/yield/park thresholds.

system

System-level configuration: thread pool sizing, memory/system monitors, GC behavior.

timer

Hashed wheel timer configuration: tick duration, wheel size.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def getModuleConfig[M <: ModuleConfig](clazz: Class[M]): Option[M]

Type-safe retrieval of a module config.

Type-safe retrieval of a module config.

Type parameters

M

The module config type.

Value parameters

clazz

The class of the module config to retrieve.

Attributes

Returns

Some containing the config if registered, None otherwise.

def moduleConfig[M <: ModuleConfig](clazz: Class[M])(default: => M): M

Type-safe retrieval of a module config with a default fallback.

Type-safe retrieval of a module config with a default fallback.

Type parameters

M

The module config type.

Value parameters

clazz

The class of the module config to retrieve.

default

Default value to return if not registered.

Attributes

Returns

The registered config, or the default if not found.

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product