/** * Event Queue Manager * Manages priority-based event processing queue that integrates with the configuration priority system */ import { BaseQueueManager } from './BaseQueueManager'; import type { QueueOperation, QueueConfig, ConfigUpdateStrategy, DebuggerConfigSource, EventQueueOperation } from '@plyaz/types/api'; import { PRIORITY_LEVEL } from '@plyaz/types/api'; import { EventManager } from '../events/EventManager'; /** * Priority mapping from config priority to queue priority */ export declare class ConfigPriorityMapper { /** * Map configuration scope to queue priority */ static scopeToPriority(scope: 'global' | 'client' | 'request' | 'temporary'): (typeof PRIORITY_LEVEL)[keyof typeof PRIORITY_LEVEL]; /** * Map configuration update strategy to queue priority */ static strategyToPriority(strategy: ConfigUpdateStrategy): (typeof PRIORITY_LEVEL)[keyof typeof PRIORITY_LEVEL]; /** * Map configuration source to queue priority */ static sourceToPriority(source: DebuggerConfigSource): (typeof PRIORITY_LEVEL)[keyof typeof PRIORITY_LEVEL]; /** * Calculate combined priority from multiple factors * Takes the highest priority from all factors */ static calculateCombinedPriority(scope?: 'global' | 'client' | 'request' | 'temporary', strategy?: ConfigUpdateStrategy, source?: DebuggerConfigSource, explicitPriority?: number): (typeof PRIORITY_LEVEL)[keyof typeof PRIORITY_LEVEL]; } /** * Event Queue Manager * Provides priority-based event processing with integration to configuration priority system */ export declare class EventQueueManager extends BaseQueueManager { private readonly eventManager; private readonly processingCallbacks; constructor(config?: QueueConfig & { eventManager?: EventManager; }); /** * Create queue operation from EventQueueOperation */ protected createQueueOperation(operation: EventQueueOperation): QueueOperation; /** * Queue an event with automatic priority calculation */ queueEvent(eventType: string, eventData: TEventData, options?: { scope?: 'global' | 'client' | 'request' | 'temporary'; configSource?: DebuggerConfigSource; updateStrategy?: ConfigUpdateStrategy; explicitPriority?: number; correlationId?: string; metadata?: Record; }): Promise; /** * Register a processing callback for a specific event type */ registerProcessor(eventType: string, processor: (operation: EventQueueOperation) => Promise): void; /** * Remove a processing callback */ unregisterProcessor(eventType: string): void; /** * Process a single operation (implementing abstract method) */ protected processOperation(operation: EventQueueOperation): Promise; /** * Process a queue operation (for QueueProcessor interface) */ private processQueueOperation; /** * Process a single event operation */ private processEventOperation; /** * Default event processing when no specific processor is registered */ private defaultEventProcessing; /** * Handle processing errors with retry logic */ private handleProcessingError; /** * Setup automatic processing based on queue configuration */ private setupAutomaticProcessing; /** * Process a batch of operations */ private processBatch; /** * Process the next operation in the queue */ private processNext; /** * Generate a unique operation ID */ private generateOperationId; /** * Get queue statistics specific to events */ getEventStats(): { totalEvents: number; eventsByType: Record; eventsByPriority: Record<(typeof PRIORITY_LEVEL)[keyof typeof PRIORITY_LEVEL], number>; eventsByScope: Record; averageProcessingTime: number; processedCount: number; errorCount: number; }; } /** * Get or create the default event queue manager instance * @returns The default event queue manager */ export declare function getDefaultEventQueue(): EventQueueManager; /** * Get or create the config event queue manager instance * @returns The config event queue manager */ export declare function getConfigEventQueue(): EventQueueManager; /** * Get or create the network event queue manager instance * @returns The network event queue manager */ export declare function getNetworkEventQueue(): EventQueueManager; //# sourceMappingURL=EventQueueManager.d.ts.map