export class EventBuffer { /** * Creates an event buffer that can hold feature-processed events. * @param {Number} maxPayloadSize The maximum size of the payload that can be stored in this buffer. * @param {Object} [featureAgg] - the feature aggregate instance */ constructor(maxPayloadSize?: number, featureAgg?: Object); maxPayloadSize: number; featureAgg: Object | undefined; get length(): number; isEmpty(): boolean; get(): any[]; byteSize(): number; wouldExceedMaxSize(incomingSize: any): boolean; /** * Add feature-processed event to our buffer. If this event would cause our total raw size to exceed the set max payload size, it is dropped. * @param {any} event - any primitive type or object * @param {number} [evaluatedSize] - the evalated size of the event, if already done so before storing in the event buffer * @returns {Boolean} true if successfully added; false otherwise */ add(event: any, evaluatedSize?: number): boolean; /** * Merges events in the buffer that match the given criteria. * @param {Function} matcher - A function that takes an event and returns true if it should be merged. * @param {Object} data - The data to merge into the matching events. * @returns {boolean} true if a match was found and merged; false otherwise. */ merge(matcher: Function, data: Object): boolean; /** * Wipes the main buffer * @param {Object} [opts] - options for clearing the buffer * @param {Number} [opts.clearBeforeTime] - timestamp before which all events should be cleared * @param {String} [opts.timestampKey] - the key in the event object that contains the timestamp to compare against `clearBefore` * @param {Number} [opts.clearBeforeIndex] - index before which all events should be cleared * @returns {void} */ clear(opts?: { clearBeforeTime?: number | undefined; timestampKey?: string | undefined; clearBeforeIndex?: number | undefined; }): void; /** * Backup the buffered data and clear the main buffer */ save(): void; /** * Wipes the backup buffer */ clearSave(): void; /** * Prepend the backup buffer back into the main buffer */ reloadSave(): void; #private; } //# sourceMappingURL=event-buffer.d.ts.map