import { BatchOption, SendTimeoutOption, CancelableOption, ComplexTypesOption, CancelablePromise, ResponseTimeoutOption, ReturnDataTypeOption, DataType } from "ziron-client";
export interface BrokerClientPoolOptions {
    poolSize: number;
    uri: string;
    joinTokenSecret: string;
    clusterVersion: number;
}
export default class BrokerClientPool {
    readonly brokerId?: string;
    readonly destroyed: boolean;
    get brokerUri(): string;
    private readonly _options;
    private readonly clientOptions;
    private clients;
    constructor(options: BrokerClientPoolOptions);
    private _fillPool;
    private _selectClient;
    private _handleClientConnect;
    private _handleClientError;
    private _handleClientPublish;
    private _buildSocketOptions;
    /**
     * @description
     * Do custom invokes on a selected socket.
     * Be careful only to use custom procedures.
     * @param procedure
     * @param data
     * @param options
     */
    invoke<RDT extends true | false | undefined, C extends boolean | undefined = undefined>(procedure: string, data?: any, options?: BatchOption & SendTimeoutOption & CancelableOption<C> & ResponseTimeoutOption & ComplexTypesOption & ReturnDataTypeOption<RDT>): C extends true ? CancelablePromise<RDT extends true ? [any, DataType] : any> : Promise<RDT extends true ? [any, DataType] : any>;
    /**
     * @description
     * Do custom transmits on a selected socket.
     * Be careful only to use custom receivers.
     * @param receiver
     * @param data
     * @param options
     */
    transmit<C extends boolean | undefined = undefined>(receiver: string, data?: any, options?: BatchOption & SendTimeoutOption & CancelableOption<C> & ComplexTypesOption): C extends true ? CancelablePromise<void> : Promise<void>;
    getSubscriptions(includePending?: boolean): string[];
    hasSubscribed(channel: string, includePending?: boolean): boolean;
    /**
     * @description
     * Returns if any client of the pool is connected to the broker.
     */
    isConnected(): boolean;
}
