本文整理汇总了C#中IClientMessage类的典型用法代码示例。如果您正苦于以下问题:C# IClientMessage类的具体用法?C# IClientMessage怎么用?C# IClientMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IClientMessage类属于命名空间,在下文中一共展示了IClientMessage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ClientListenerInvocation
public ClientListenerInvocation(IClientMessage message, DistributedEventHandler handler,
DecodeStartListenerResponse responseDecoder, string memberUuid)
: base(message, memberUuid)
{
_responseDecoder = responseDecoder;
_handler = handler;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:7,代码来源:ClientListenerInvocation.cs
示例2: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
byte status;
status = clientMessage.GetByte();
parameters.status = status;
Address address = null;
bool address_isNull = clientMessage.GetBoolean();
if (!address_isNull)
{
address = AddressCodec.Decode(clientMessage);
parameters.address = address;
}
string uuid = null;
bool uuid_isNull = clientMessage.GetBoolean();
if (!uuid_isNull)
{
uuid = clientMessage.GetStringUtf8();
parameters.uuid = uuid;
}
string ownerUuid = null;
bool ownerUuid_isNull = clientMessage.GetBoolean();
if (!ownerUuid_isNull)
{
ownerUuid = clientMessage.GetStringUtf8();
parameters.ownerUuid = ownerUuid;
}
byte serializationVersion;
serializationVersion = clientMessage.GetByte();
parameters.serializationVersion = serializationVersion;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:32,代码来源:ClientAuthenticationCustomCodec.cs
示例3: InvokeOnKeyOwner
public override IFuture<IClientMessage> InvokeOnKeyOwner(IClientMessage request, object key)
{
var partitionService = (ClientPartitionService) Client.GetClientPartitionService();
var partitionId = partitionService.GetPartitionId(key);
var owner = partitionService.GetPartitionOwner(partitionId);
return Invoke(new ClientInvocation(request, partitionId), owner);
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:7,代码来源:ClientSmartInvocationService.cs
示例4: StartListening
public string StartListening(IClientMessage request, DistributedEventHandler handler,
DecodeStartListenerResponse responseDecoder, object key = null)
{
try
{
IFuture<IClientMessage> task;
if (key == null)
{
task = _client.GetInvocationService()
.InvokeListenerOnRandomTarget(request, handler, responseDecoder);
}
else
{
task = _client.GetInvocationService()
.InvokeListenerOnKeyOwner(request, key, handler, responseDecoder);
}
var clientMessage = ThreadUtil.GetResult(task);
var registrationId = responseDecoder(clientMessage);
RegisterListener(registrationId, request.GetCorrelationId());
return registrationId;
}
catch (Exception e)
{
throw ExceptionUtil.Rethrow(e);
}
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:26,代码来源:ClientListenerService.cs
示例5: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
bool response ;
response = clientMessage.GetBoolean();
parameters.response = response;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:TransactionalMapIsEmptyCodec.cs
示例6: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
long response;
response = clientMessage.GetLong();
parameters.response = response;
return parameters;
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:RingbufferAddAllCodec.cs
示例7: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
string response = null;
response = clientMessage.GetStringUtf8();
parameters.response = response;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:MultiMapAddEntryListenerToKeyCodec.cs
示例8: InvokeListenerOnPartition
public override IFuture<IClientMessage> InvokeListenerOnPartition(IClientMessage request, int partitionId,
DistributedEventHandler handler,
DecodeStartListenerResponse responseDecoder)
{
var partitionService = (ClientPartitionService) Client.GetClientPartitionService();
var owner = partitionService.GetPartitionOwner(partitionId);
return Invoke(new ClientListenerInvocation(request, handler, responseDecoder, partitionId), owner);
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:ClientSmartInvocationService.cs
示例9: InvokeListenerOnKeyOwner
public override IFuture<IClientMessage> InvokeListenerOnKeyOwner(IClientMessage request, object key, DistributedEventHandler handler,
DecodeStartListenerResponse responseDecoder)
{
var partitionService = (ClientPartitionService)Client.GetClientPartitionService();
var partitionId = partitionService.GetPartitionId(key);
return SendToOwner(new ClientListenerInvocation(request, handler, responseDecoder, partitionId));
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:8,代码来源:ClientNonSmartInvocationService.cs
示例10: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
SimpleEntryView<IData, IData> dataEntryView = null;
var dataEntryView_isNull = clientMessage.GetBoolean();
if (!dataEntryView_isNull)
{
dataEntryView = EntryViewCodec.Decode(clientMessage);
parameters.dataEntryView = dataEntryView;
}
return parameters;
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:12,代码来源:MapGetEntryViewCodec.cs
示例11: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IData response = null;
var response_isNull = clientMessage.GetBoolean();
if (!response_isNull)
{
response = clientMessage.GetData();
parameters.response = response;
}
return parameters;
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:12,代码来源:TransactionalMapGetCodec.cs
示例12: Decode
public static Address Decode(IClientMessage clientMessage)
{
var host = clientMessage.GetStringUtf8();
var port = clientMessage.GetInt();
try
{
return new Address(host, port);
}
catch (SocketException)
{
return null;
}
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:13,代码来源:AddressCodec.cs
示例13: Decode
public static StackTraceElement Decode(IClientMessage clientMessage)
{
var declaringClass = clientMessage.GetStringUtf8();
var methodName = clientMessage.GetStringUtf8();
var fileName_notNull = clientMessage.GetBoolean();
string fileName = null;
if (fileName_notNull)
{
fileName = clientMessage.GetStringUtf8();
}
var lineNumber = clientMessage.GetInt();
return new StackTraceElement(declaringClass, methodName, fileName, lineNumber);
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:13,代码来源:StackTraceElementCodec.cs
示例14: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
IList<IData> list = null;
int list_size = clientMessage.GetInt();
list = new List<IData>();
for (int list_index = 0; list_index<list_size; list_index++) {
IData list_item;
list_item = clientMessage.GetData();
list.Add(list_item);
}
parameters.list = list;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:14,代码来源:MultiMapRemoveCodec.cs
示例15: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<KeyValuePair<IData,IData>> entrySet = null;
int entrySet_size = clientMessage.GetInt();
entrySet = new HashSet<KeyValuePair<IData,IData>>();
for (int entrySet_index = 0; entrySet_index<entrySet_size; entrySet_index++) {
KeyValuePair<IData,IData> entrySet_item;
entrySet_item = clientMessage.GetMapEntry();
entrySet.Add(entrySet_item);
}
parameters.entrySet = entrySet;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:14,代码来源:MultiMapEntrySetCodec.cs
示例16: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
ResponseParameters parameters = new ResponseParameters();
ISet<IData> set = null;
int set_size = clientMessage.GetInt();
set = new HashSet<IData>();
for (int set_index = 0; set_index<set_size; set_index++) {
IData set_item;
set_item = clientMessage.GetData();
set.Add(set_item);
}
parameters.set = set;
return parameters;
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:14,代码来源:TransactionalMapKeySetCodec.cs
示例17: DecodeResponse
public static ResponseParameters DecodeResponse(IClientMessage clientMessage)
{
var parameters = new ResponseParameters();
IList<DistributedObjectInfo> infoCollection = null;
var infoCollection_size = clientMessage.GetInt();
infoCollection = new List<DistributedObjectInfo>();
for (var infoCollection_index = 0; infoCollection_index < infoCollection_size; infoCollection_index++)
{
DistributedObjectInfo infoCollection_item;
infoCollection_item = DistributedObjectInfoCodec.Decode(clientMessage);
infoCollection.Add(infoCollection_item);
}
parameters.infoCollection = infoCollection;
return parameters;
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:15,代码来源:ClientGetDistributedObjectsCodec.cs
示例18: Decode
public static Member Decode(IClientMessage clientMessage)
{
Address address = AddressCodec.Decode(clientMessage);
string uuid = clientMessage.GetStringUtf8();
bool liteMember = clientMessage.GetBoolean();
int attributeSize = clientMessage.GetInt();
IDictionary<string, string> attributes = new Dictionary<string, string>();
for (int i = 0; i < attributeSize; i++)
{
string key = clientMessage.GetStringUtf8();
string value = clientMessage.GetStringUtf8();
attributes[key] = value;
}
return new Member(address, uuid, attributes, liteMember);
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:15,代码来源:MemberCodec.cs
示例19: Handle
public static void Handle(IClientMessage clientMessage, HandleDistributedObject handleDistributedObject)
{
int messageType = clientMessage.GetMessageType();
if (messageType == EventMessageConst.EventDistributedObject)
{
string name = null;
name = clientMessage.GetStringUtf8();
string serviceName = null;
serviceName = clientMessage.GetStringUtf8();
string eventType = null;
eventType = clientMessage.GetStringUtf8();
handleDistributedObject(name, serviceName, eventType);
return;
}
Hazelcast.Logging.Logger.GetLogger(typeof(AbstractEventHandler)).Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
}
开发者ID:hasancelik,项目名称:hazelcast-csharp-client,代码行数:16,代码来源:ClientAddDistributedObjectListenerCodec.cs
示例20: Handle
public static void Handle(IClientMessage clientMessage, HandleMember handleMember,
HandleMemberSet handleMemberSet, HandleMemberAttributeChange handleMemberAttributeChange)
{
var messageType = clientMessage.GetMessageType();
if (messageType == EventMessageConst.EventMember)
{
IMember member = null;
member = MemberCodec.Decode(clientMessage);
int eventType;
eventType = clientMessage.GetInt();
handleMember(member, eventType);
return;
}
if (messageType == EventMessageConst.EventMemberSet)
{
IList<IMember> members = null;
var members_size = clientMessage.GetInt();
members = new List<IMember>();
for (var members_index = 0; members_index < members_size; members_index++)
{
IMember members_item;
members_item = MemberCodec.Decode(clientMessage);
members.Add(members_item);
}
handleMemberSet(members);
return;
}
if (messageType == EventMessageConst.EventMemberAttributeChange)
{
string uuid = null;
uuid = clientMessage.GetStringUtf8();
string key = null;
key = clientMessage.GetStringUtf8();
int operationType;
operationType = clientMessage.GetInt();
string value = null;
var value_isNull = clientMessage.GetBoolean();
if (!value_isNull)
{
value = clientMessage.GetStringUtf8();
}
handleMemberAttributeChange(uuid, key, operationType, value);
return;
}
Logger.GetLogger(typeof (AbstractEventHandler))
.Warning("Unknown message type received on event handler :" + clientMessage.GetMessageType());
}
开发者ID:ihsandemir,项目名称:hazelcast-csharp-client,代码行数:47,代码来源:ClientAddMembershipListenerCodec.cs
注:本文中的IClientMessage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论