Ejemplo n.º 1
0
        public virtual ICollection <TValue> Remove(object key)
        {
            var keyData = ToData(key);
            var request = TransactionalMultiMapRemoveCodec.EncodeRequest(Name, GetTransactionId(), GetThreadId(),
                                                                         keyData);

            var result = Invoke(request, m => TransactionalMultiMapRemoveCodec.DecodeResponse(m).Response);

            return(ToList <TValue>(result));
        }
        public async Task <IReadOnlyList <TValue> > RemoveAsync(TKey key)
        {
            var keyData         = ToData(key);
            var requestMessage  = TransactionalMultiMapRemoveCodec.EncodeRequest(Name, TransactionId, ContextId, keyData);
            var responseMessage = await Cluster.Messaging.SendToMemberAsync(requestMessage, TransactionClientConnection).CAF();

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

            return(new ReadOnlyLazyList <TValue>(response, SerializationService));
        }