import { Delta } from '@signalk/server-api';
export interface BackpressureTransport {
    readonly id: string;
    getBufferLength(): number;
    write(delta: Delta): void;
    destroy(): void;
}
export interface BackpressureOptions {
    enterThreshold: number;
    exitThreshold: number;
    maxBufferSize: number;
    maxBufferCheckTime: number;
    beforeWrite?: (delta: Delta) => void;
}
export interface BackpressureThresholds {
    enterThreshold: number;
    exitThreshold: number;
    maxBufferSize: number;
    maxBufferCheckTime: number;
}
export declare function parseBackpressureThresholds(configFallbacks?: {
    maxSendBufferSize?: number;
    maxSendBufferCheckTime?: number;
}): BackpressureThresholds;
export declare class BackpressureManager {
    private active;
    private readonly accumulator;
    private since;
    private bufferSizeExceeded;
    private readonly transport;
    private readonly options;
    constructor(transport: BackpressureTransport, options: BackpressureOptions);
    onDrain(): void;
    send(delta: Delta): void;
    flush(): void;
    assertBufferSize(knownBufferLength?: number): void;
    clear(): void;
    get isActive(): boolean;
    get accumulatorSize(): number;
}
//# sourceMappingURL=BackpressureManager.d.ts.map