예제 #1
0
        public TValue Remove(object key)
        {
            var keyData       = ToData(key);
            var request       = ReplicatedMapRemoveCodec.EncodeRequest(GetName(), keyData);
            var clientMessage = Invoke(request, keyData);

            return(ToObject <TValue>(ReplicatedMapRemoveCodec.DecodeResponse(clientMessage).response));
        }
예제 #2
0
        public async Task <TValue> RemoveAsync(TKey key)
        {
            var keyData         = ToSafeData(key);
            var requestMessage  = ReplicatedMapRemoveCodec.EncodeRequest(Name, keyData);
            var responseMessage = await Cluster.Messaging.SendToKeyPartitionOwnerAsync(requestMessage, keyData).CfAwait();

            var response = ReplicatedMapRemoveCodec.DecodeResponse(responseMessage).Response;

            return(ToObject <TValue>(response));
        }