Class: Tasker::Registry::BaseRegistry
- Inherits:
-
Object
- Object
- Tasker::Registry::BaseRegistry
- Includes:
- Concerns::StructuredLogging
- Defined in:
- lib/tasker/registry/base_registry.rb
Overview
Base class for all registry systems in Tasker
Provides common functionality including thread-safe operations, structured logging, health checks, and statistics interfaces. All registry classes should inherit from this base class.
Direct Known Subclasses
HandlerFactory, SubscriberRegistry, Telemetry::PluginRegistry
Constant Summary
Constants included from Concerns::StructuredLogging
Concerns::StructuredLogging::CORRELATION_ID_KEY
Instance Method Summary collapse
-
#all_items ⇒ Hash
Get all items in the registry.
-
#clear! ⇒ void
Clear all items from the registry.
-
#initialize ⇒ BaseRegistry
constructor
A new instance of BaseRegistry.
-
#stats ⇒ Hash
Get comprehensive statistics for this registry.
Methods included from Concerns::StructuredLogging
#correlation_id, #correlation_id=, #log_exception, #log_orchestration_event, #log_performance_event, #log_step_event, #log_structured, #log_task_event, #with_correlation_id
Constructor Details
#initialize ⇒ BaseRegistry
Returns a new instance of BaseRegistry.
17 18 19 20 21 22 |
# File 'lib/tasker/registry/base_registry.rb', line 17 def initialize @mutex = Mutex.new @telemetry_config = Tasker::Configuration.configuration.telemetry @registry_name = self.class.name.demodulize.underscore @created_at = Time.current end |
Instance Method Details
#all_items ⇒ Hash
Get all items in the registry
164 165 166 |
# File 'lib/tasker/registry/base_registry.rb', line 164 def all_items raise NotImplementedError, 'Subclasses must implement #all_items' end |
#clear! ⇒ void
This method returns an undefined value.
Clear all items from the registry
172 173 174 |
# File 'lib/tasker/registry/base_registry.rb', line 172 def clear! raise NotImplementedError, 'Subclasses must implement #clear!' end |
#stats ⇒ Hash
Get comprehensive statistics for this registry
156 157 158 |
# File 'lib/tasker/registry/base_registry.rb', line 156 def stats raise NotImplementedError, 'Subclasses must implement #stats' end |