public override bool RetainAll <TE>(ICollection <TE> c)
        {
            var values  = ToDataList(c);
            var request = SetCompareAndRetainAllCodec.EncodeRequest(GetName(), values);

            return(Invoke(request, m => SetCompareAndRetainAllCodec.DecodeResponse(m).response));
        }
Esempio n. 2
0
        public override async Task <bool> RetainAllAsync <TItem>(ICollection <TItem> items)
        {
            var itemsData       = ToSafeData(items);
            var requestMessage  = SetCompareAndRetainAllCodec.EncodeRequest(Name, itemsData);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CAF();

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