UNPKG

@aaswe/codebase-ai

Version:

AI-Assisted Software Engineering (AASWE) - Rich codebase context for IDE LLMs

96 lines 3.14 kB
/** * Hybrid Storage Manager * * Coordinates between Neo4j, RDF files, in-memory storage, and caching * with intelligent query routing, synchronization, and health monitoring. */ import { EventEmitter } from 'events'; import { HybridStorageManagerInterface, HybridStorageConfig, StorageLayerHealth, QueryContext, QueryResult, QueryPlan, SyncOperation, SyncResult, ConflictResolution, CacheMetrics, HybridStorageMetrics } from './types'; export declare class HybridStorageManager extends EventEmitter implements HybridStorageManagerInterface { private config; private storageLayers; private cacheManager; private queryRouter; private isInitialized; private healthCheckTimer; private metricsCollectionTimer; private syncTimer; private pendingSyncOperations; private metrics; constructor(config: HybridStorageConfig); /** * Initialize the hybrid storage manager */ initialize(): Promise<void>; /** * Execute a query with intelligent routing */ query<T = any>(query: string, context?: QueryContext): Promise<QueryResult<T>>; /** * Plan a query execution strategy */ planQuery(query: string, context?: QueryContext): Promise<QueryPlan>; /** * Create data across appropriate storage layers */ create(data: any, context?: QueryContext): Promise<QueryResult<any>>; /** * Update data across appropriate storage layers */ update(id: string, data: any, context?: QueryContext): Promise<QueryResult<any>>; /** * Delete data from appropriate storage layers */ delete(id: string, context?: QueryContext): Promise<QueryResult<boolean>>; /** * Synchronize data across storage layers */ sync(operation: SyncOperation): Promise<SyncResult>; /** * Synchronize all pending operations */ syncAll(): Promise<SyncResult[]>; /** * Resolve a data conflict */ resolveConflict(conflict: ConflictResolution): Promise<boolean>; /** * Invalidate cache entries */ invalidateCache(pattern?: string): Promise<void>; /** * Get cache metrics */ getCacheMetrics(): Promise<CacheMetrics>; /** * Get health status of all storage layers */ getHealthStatus(): Promise<StorageLayerHealth[]>; /** * Get comprehensive metrics */ getMetrics(): Promise<HybridStorageMetrics>; /** * Shutdown the hybrid storage manager */ shutdown(): Promise<void>; private setupStorageLayers; private setupEventHandlers; private initializeMetrics; private setupHealthChecks; private setupMetricsCollection; private setupSynchronization; private generateCacheKey; private isCacheable; private shouldCacheResult; private calculateResultSize; private determineCacheTTL; private mapCacheStrategy; private determineTargetLayers; private invalidateRelatedCache; private scheduleSyncOperation; private getTargetLayersForSync; private updateQueryMetrics; } export default HybridStorageManager; //# sourceMappingURL=HybridStorageManager.d.ts.map