Files
Yi.Admin/Yi.Framework.Net6/Yi.Framework.Core/Cache/CacheInvoker.cs

154 lines
4.3 KiB
C#
Raw Normal View History

2022-10-24 22:31:53 +08:00
using Microsoft.Extensions.Options;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Yi.Framework.Common.IOCOptions;
using CSRedis;
2022-10-26 20:01:18 +08:00
using static CSRedis.CSRedisClient;
2022-10-24 22:31:53 +08:00
2023-01-01 23:06:11 +08:00
namespace Yi.Framework.Core.Cache
2022-10-24 22:31:53 +08:00
{
public abstract class CacheInvoker
{
2023-01-01 23:06:11 +08:00
public virtual bool Exits(string key)
2022-10-26 20:01:18 +08:00
{
2023-01-01 23:06:11 +08:00
throw new NotImplementedException();
2022-10-26 20:01:18 +08:00
}
public virtual T Get<T>(string key)
{
throw new NotImplementedException();
}
2022-10-24 22:31:53 +08:00
2022-10-26 20:01:18 +08:00
public virtual bool Set<T>(string key, T data, TimeSpan time)
{
throw new NotImplementedException();
}
2022-10-24 22:31:53 +08:00
2022-10-26 20:01:18 +08:00
public virtual bool Set<T>(string key, T data)
2022-10-24 22:31:53 +08:00
{
2022-10-26 20:01:18 +08:00
throw new NotImplementedException();
}
2022-10-24 22:31:53 +08:00
2022-10-26 20:01:18 +08:00
public virtual long Del(string key)
{
throw new NotImplementedException();
2022-10-24 22:31:53 +08:00
}
2022-10-26 20:01:18 +08:00
public virtual bool HSet(string key, string fieId, object data)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual bool HSet(string key, string fieId, object data, TimeSpan time)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual T HGet<T>(string key, string field)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual long HDel(string key, params string[] par)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual long HLen(string key)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual Dictionary<string, string> HGetAll(string key)
{
throw new NotImplementedException();
}
/// <summary>
/// 简单发布
/// </summary>
/// <param name="channel"></param>
/// <param name="message"></param>
/// <returns></returns>
public virtual long Publish(string channel, string message)
{
throw new NotImplementedException();
}
/// <summary>
/// 简单订阅广播无持久化需要Publish写入队列
/// </summary>
/// <param name="channels"></param>
/// <returns></returns>
public virtual SubscribeObject Subscribe(params (string, Action<SubscribeMessageEventArgs>)[] channels)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
/// <summary>
/// 多端争抢模式订阅需要Lpush写入队列
/// </summary>
/// <param name="listKey"></param>
/// <param name="onMessage"></param>
/// <returns></returns>
public virtual SubscribeListObject SubscribeList(string listKey, Action<string> onMessage)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
/// <summary>
/// 多端非争抢模式订阅需要Lpush写入队列
/// </summary>
/// <param name="listKey"></param>
/// <param name="clientId"></param>
/// <param name="onMessage"></param>
/// <returns></returns>
public virtual SubscribeListBroadcastObject SubscribeListBroadcast(string listKey, string clientId, Action<string> onMessage)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual bool LSet(string key, long index, object value)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
/// <summary>
/// 列表插入头部
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="key"></param>
/// <param name="value"></param>
/// <returns></returns>
public virtual long LPush<T>(string key, params T[] value)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
/// <summary>
/// 列表弹出头部
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="key"></param>
/// <returns></returns>
public virtual T LPop<T>(string key)
2022-10-24 22:31:53 +08:00
{
throw new NotImplementedException();
}
2022-10-26 20:01:18 +08:00
public virtual string[] Keys(string pattern)
{
2023-01-01 23:06:11 +08:00
throw new NotImplementedException();
2022-10-26 20:01:18 +08:00
}
2022-10-24 22:31:53 +08:00
}
}