TimerConfig

cc.otavia.core.config.TimerConfig
case class TimerConfig(tickDurationMs: Long = ..., ticksPerWheel: Int = ...)

Hashed wheel timer configuration.

The timer uses a hashed wheel data structure for efficient timeout scheduling with O(1) add/cancel operations. Based on George Varghese and Tony Lauck's paper "Hashed and Hierarchical Timing Wheels".

Value parameters

tickDurationMs

Duration in milliseconds between timer ticks. The timer checks for expired timeouts on each tick. Smaller values provide better accuracy but increase CPU overhead. In most network applications, I/O timeouts do not need to be precise. Default is 100ms.

ticksPerWheel

Number of slots in the timing wheel (wheel size). Larger wheels can schedule more timeouts with less hash collisions but consume more memory. Must be a power of 2. Default is 512.

Attributes

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

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product