/**
 * Resource pool implementation for bulkhead pattern
 */
import { BulkheadConfig, ResourcePoolMetrics, ResilienceEvent, MarineEnvironmentStatus } from '../types';
import { OperationalContextType } from '../types/marine-constants';
/**
 * Resource request with priority and context
 */
export interface ResourceRequest {
    id: string;
    priority: 'critical' | 'normal' | 'low';
    operationalContext: OperationalContextType;
    requestedAt: Date;
    timeoutMs: number;
    marineSystemType: 'navigation' | 'safety' | 'comfort' | 'maintenance';
}
/**
 * Resource allocation result
 */
export interface ResourceAllocation {
    granted: boolean;
    resourceId?: string;
    waitTime: number;
    queuePosition?: number;
    estimatedWaitTime?: number;
    reason?: string;
}
/**
 * Resource pool for marine bulkhead pattern
 */
export declare class ResourcePool {
    private config;
    private metrics;
    private activeResources;
    private requestQueue;
    private eventListeners;
    private marineEnvironment?;
    private nextResourceId;
    constructor(config: BulkheadConfig);
    /**
     * Request a resource from the pool
     */
    requestResource(request: Omit<ResourceRequest, 'id' | 'requestedAt'>): Promise<ResourceAllocation>;
    /**
     * Release a resource back to the pool
     */
    releaseResource(resourceId: string): boolean;
    /**
     * Update marine environment for adaptive behavior
     */
    updateMarineEnvironment(environment: MarineEnvironmentStatus): void;
    /**
     * Get current pool metrics
     */
    getMetrics(): ResourcePoolMetrics;
    /**
     * Get current pool status
     */
    getStatus(): {
        config: BulkheadConfig;
        metrics: ResourcePoolMetrics;
        activeResources: {
            resourceId: string;
            priority: "critical" | "normal" | "low";
            marineSystemType: "navigation" | "safety" | "comfort" | "maintenance";
            allocatedAt: Date;
            powerConsumption: number;
        }[];
        queuedRequests: {
            id: string;
            priority: "critical" | "normal" | "low";
            marineSystemType: "navigation" | "safety" | "comfort" | "maintenance";
            waitTime: number;
        }[];
    };
    /**
     * Add event listener
     */
    onEvent(listener: (event: ResilienceEvent) => void): void;
    /**
     * Force release all resources (emergency/maintenance)
     */
    forceReleaseAll(reason?: string): void;
    /**
     * Check if resource can be allocated immediately
     */
    private canAllocateImmediately;
    /**
     * Allocate a resource
     */
    private allocateResource;
    /**
     * Check if request should be queued
     */
    private shouldQueue;
    /**
     * Queue a request
     */
    private queueRequest;
    /**
     * Process queued requests
     */
    private processQueue;
    /**
     * Insert request by priority
     */
    private insertRequestByPriority;
    /**
     * Remove request from queue
     */
    private removeFromQueue;
    /**
     * Estimate power consumption for request
     */
    private estimatePowerConsumption;
    /**
     * Estimate system health impact
     */
    private estimateSystemHealthImpact;
    /**
     * Get maximum power allowance based on marine environment
     */
    private getMaxPowerAllowance;
    /**
     * Estimate wait time for queue position
     */
    private estimateWaitTime;
    /**
     * Adjust pool capacity based on marine conditions
     */
    private adjustPoolCapacity;
    /**
     * Update metrics
     */
    private updateMetrics;
    /**
     * Update resource-specific metrics
     */
    private updateResourceMetrics;
    /**
     * Emit resilience event
     */
    private emitEvent;
    /**
     * Initialize metrics
     */
    private initializeMetrics;
}
//# sourceMappingURL=ResourcePool.d.ts.map