///
import { NetStream, ICommandItem } from "./types";
import Deque = require("denque");
import { EventEmitter } from "events";
import SubscriptionSet from "./SubscriptionSet";
export interface IDataHandlerOptions {
stringNumbers: boolean;
dropBufferSupport: boolean;
}
interface ICondition {
select: number;
auth: string;
subscriber: false | SubscriptionSet;
}
interface IDataHandledable extends EventEmitter {
stream: NetStream;
status: string;
condition: ICondition;
commandQueue: Deque;
disconnect(reconnect: boolean): void;
recoverFromFatalError(commandError: Error, err: Error, options: any): void;
handleReconnection(err: Error, item: ICommandItem): void;
}
interface IParserOptions {
stringNumbers: boolean;
dropBufferSupport: boolean;
}
export default class DataHandler {
private redis;
constructor(redis: IDataHandledable, parserOptions: IParserOptions);
private returnFatalError;
private returnError;
private returnReply;
private handleSubscriberReply;
private handleMonitorReply;
private shiftCommand;
}
export {};