当前位置: 首页>>代码示例>>C#>>正文


C# IClientMessage类代码示例

本文整理汇总了C#中IClientMessage的典型用法代码示例。如果您正苦于以下问题:C# IClientMessage类的具体用法?C# IClientMessage怎么用?C# IClientMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IClientMessage类属于命名空间,在下文中一共展示了IClientMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的IClientMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。