import { DrawQuotaItemExtra } from '../../deposit'; import { IRule } from './RuleCompile'; export declare class CacheManager { __Cache: Record; /** * 对指标排名 * 1: 静态排序 * 2: 动态排序 * 3: 静态+动态排序 * 4: rank排序 */ __SortCache: Record>; /** * 任意缓存 */ __AnyCache: Record; /** * 合并缓存管理器 * @param otherCache */ mergeCache(otherCache: CacheManager): void; /** * 计算出当前规则的缓存 * @param rule * @returns */ get(rule: IRule): { rule: IRule; result: DrawQuotaItemExtra; } | undefined; getById(ruleId: number | string): { rule: IRule; result: DrawQuotaItemExtra; } | undefined; /** * 对规则计算结果缓存 * @param rule * @param result * @returns */ set(rule: IRule, result: DrawQuotaItemExtra): DrawQuotaItemExtra; /** * 获得当前缓存的所有数据列表 * @returns */ getValues(): { rule: IRule; result: DrawQuotaItemExtra; }[]; getKeys(): string[]; /** * 对指标排名緩存 * @param mode 模式 * @param quotaIndex 期号 * @param ids 缓存的顺序 */ setSort(mode: 'static' | 'dynamic' | 'static_dynamic' | 'rank' | 'rrank', direction: 'asc' | 'desc' | 'normal', quotaIndex: number, ids: any[]): void; /** * 读取指标缓存 * @param mode * @param quotaIndex * @returns */ getSort(mode: 'static' | 'dynamic' | 'static_dynamic' | 'rank' | 'rrank', direction: 'asc' | 'desc' | 'normal', quotaIndex: number): (string | number)[]; /** * 对数字出现频率排名緩存 * @param mode 模式 * @param quotaIndex 期号 * @param ids 缓存的顺序 */ setTargetSort(mode: 'static' | 'dynamic' | 'rank' | 'static_dynamic', direction: 'asc' | 'desc' | 'normal', quotaIndex: number, targetKeys: any[]): void; /** * 读取数字出现频率排名緩存 * @param mode * @param quotaIndex * @returns */ getTargetSort(mode: 'static' | 'dynamic' | 'rank' | 'static_dynamic', direction: 'asc' | 'desc' | 'normal', quotaIndex: number): (string | number)[]; getStaticRule(): (string | number)[]; saveStaticRule(value: any): void; clear(): void; getAny(key: any): any; setAny(key: any, value: any): void; }