一款简单易用的基础网络通讯组件库。

DmtpRedisActor 类

DmtpRedisActor 类,实现了 IDmtpRedisActor 接口。 该类通过 Redis 操作,为分布式消息传输协议(Dmtp)提供演员(Actor)模型的实现。

Definition

命名空间: TouchSocket.Dmtp.Redis
程序集: TouchSocket.Dmtp (在 TouchSocket.Dmtp.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public class DmtpRedisActor : IDmtpRedisActor, 
	ICacheAsync<string, byte[]>, IActor
Inheritance
Object    DmtpRedisActor
Implements
ICacheAsyncString, Byte, IActor, IDmtpRedisActor

构造函数

DmtpRedisActor 初始化DmtpRedisActor类的新实例。

属性

Converter 序列化转换器。
DmtpActor 包含当前Actor的父容器。
ICache 实际储存缓存。
Timeout 超时设定。默认30000ms

方法

AddAsyncTValue 添加一个缓存项到缓存中,如果键已经存在,则不进行任何操作。 该方法用于异步地添加缓存项。
AddCacheAsync 添加缓存。当缓存存在时,不会添加成功。
ClearCacheAsync 清空所有缓存
ContainsCacheAsync 异步判断指定键的缓存是否存在且在生命周期内。
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
GetAsyncTValue 异步获取缓存的键值对。
GetCacheAsync 异步获取指定键的缓存条目。
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
InputReceivedData 处理收到的消息
MemberwiseCloneCreates a shallow copy of the current Object.
(继承自 Object。)
RemoveCacheAsync 异步移除缓存项。
SetAsyncTValue 设置缓存值 设置缓存,不管缓存存不存在,都会添加。
SetCacheAsync 设置缓存,不管缓存存不存在,都会添加。
SetProtocolFlags 设置处理协议标识的起始标识。
ToStringReturns a string that represents the current object.
(继承自 Object。)

扩展方法

Map
(由 Mapper 定义。)
Map
(由 Mapper 定义。)
MapTTarget
(由 Mapper 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

参见