using FreeRedis; using JiShe.CollectBus.Common.Models; namespace JiShe.CollectBus.FreeRedisProvider { public interface IFreeRedisProvider { /// /// 获取客户端 /// /// RedisClient Instance { get; set; } /// /// 单个添加数据 /// /// /// 主数据存储Hash缓存Key /// 集中器索引Set缓存Key /// 集中器排序索引ZSET缓存Key /// 集中器采集频率分组全局索引ZSet缓存Key /// 表计信息 /// 可选时间戳 /// Task AddMeterCacheData( string redisCacheKey, string redisCacheFocusIndexKey, string redisCacheScoresIndexKey, string redisCacheGlobalIndexKey, T data, DateTimeOffset? timestamp = null) where T : DeviceCacheBasicModel; /// /// 批量添加数据 /// /// /// 主数据存储Hash缓存Key /// 集中器索引Set缓存Key /// 集中器排序索引ZSET缓存Key /// 集中器采集频率分组全局索引ZSet缓存Key /// 数据集合 /// 可选时间戳 /// Task BatchAddMeterData( string redisCacheKey, string redisCacheFocusIndexKey, string redisCacheScoresIndexKey, string redisCacheGlobalIndexKey, IEnumerable items, DateTimeOffset? timestamp = null) where T : DeviceCacheBasicModel; } }