class Azu::ComponentRegistry

Overview

Thread-safe component registry with pooling support

Defined in:

azu/spark.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(max_pool_size : Int32 = 50) #

[View source]

Instance Method Detail

def cleanup_all : Nil #

Thread-safe component cleanup on close


[View source]
def cleanup_disconnected(gc_interval : Time::Span) : Nil #

Thread-safe iteration with cleanup


[View source]
def delete(id : String) : Component | Nil #

Thread-safe component removal


[View source]
def get(id : String) : Component | Nil #

Thread-safe component retrieval


[View source]
def get_from_pool(type : String, & : -> Component) : Component #

Get component from pool or create new one


[View source]
def register(id : String, component : Component) : Nil #

Thread-safe component registration


[View source]
def size : Int32 #

Get current component count (for monitoring)


[View source]