예제 #1
0
        public bool ContainsKey(object key)
        {
            var keyData = ToData(key);
            var request = ReplicatedMapContainsKeyCodec.EncodeRequest(GetName(), keyData);

            return(Invoke(request, keyData, m => ReplicatedMapContainsKeyCodec.DecodeResponse(m).response));
        }
예제 #2
0
        public async Task <bool> ContainsKeyAsync(TKey key)
        {
            var keyData         = ToSafeData(key);
            var requestMessage  = ReplicatedMapContainsKeyCodec.EncodeRequest(Name, keyData);
            var responseMessage = await Cluster.Messaging.SendToKeyPartitionOwnerAsync(requestMessage, keyData).CfAwait();

            return(ReplicatedMapContainsKeyCodec.DecodeResponse(responseMessage).Response);
        }