import type { Readable } from 'node:stream';
import { PassThrough } from 'node:stream';
import type * as RDF from '@rdfjs/types';
import type { IQuadSink } from '../io/IQuadSink';
import type { IQuadMatcher } from '../quadmatcher/IQuadMatcher';
import { FragmentationStrategyStreamAdapter } from './FragmentationStrategyStreamAdapter';
import type { IFragmentationStrategy } from './IFragmentationStrategy';
/**
 * A fragmentation strategy that delegates all but the listed exceptions to a given strategy.
 * The exceptions are handled via matchers, that can delegate to another strategy.
 */
export declare class FragmentationStrategyException extends FragmentationStrategyStreamAdapter {
    private readonly strategy;
    private readonly exceptions;
    private state;
    constructor(strategy: IFragmentationStrategy, exceptions: FragmentationStrategyExceptionEntry[]);
    fragment(quadStream: RDF.Stream & Readable, quadSink: IQuadSink): Promise<void>;
    protected handleQuad(quad: RDF.Quad): Promise<void>;
}
export interface IStreamState {
    strategyStream: PassThrough;
    strategyPromise: Promise<void>;
    exceptionStreams: PassThrough[];
    exceptionPromises: Promise<void>[];
}
export declare class FragmentationStrategyExceptionEntry {
    readonly matcher: IQuadMatcher;
    readonly strategy: IFragmentationStrategy;
    constructor(matcher: IQuadMatcher, strategy: IFragmentationStrategy);
}
