import { HandlerType, ProcessStreamResponse_Partitions_Partition } from '@sentio/protos'; /** * Type for partition handler functions that can process any data type */ export type PartitionHandler = (request: any) => Promise; /** * Generic manager for handling partition logic across all chain plugins. * Provides a unified interface for registering, storing, and processing partition handlers. * Chain-specific logic should remain in individual plugins. */ export declare class PartitionHandlerManager { private partitionHandlers; /** * Register a partition handler for a specific handler type and ID * @param handlerType The type of handler (e.g., HandlerType.ETH_LOG, HandlerType.APT_EVENT) * @param handlerId The unique ID for this handler instance * @param partitionHandler The partition handler function (optional) */ registerPartitionHandler(handlerType: HandlerType, handlerId: number, partitionHandler?: PartitionHandler): void; /** * Process partition logic for a specific handler type * @param handlerType The type of handler being processed * @param handlerIds Array of handler IDs to process * @param data The data to pass to partition handlers * @returns Record mapping handler IDs to partition results */ processPartitionForHandlerType(handlerType: HandlerType, handlerIds: number[], data: any): Promise>; /** * Clear all partition handlers (useful for testing or reinitialization) */ clear(): void; /** * Get all registered handler types * @returns Array of handler types that have registered partition handlers */ getRegisteredHandlerTypes(): HandlerType[]; /** * Get the number of registered handlers for a specific handler type * @param handlerType The handler type to check * @returns Number of registered handlers for this type */ getHandlerCount(handlerType: HandlerType): number; } //# sourceMappingURL=partition-handler-manager.d.ts.map