Пример #1
0
        public ISet <TKey> KeySet()
        {
            var request = ReplicatedMapKeySetCodec.EncodeRequest(GetName());
            var result  = InvokeOnPartition(request, _targetPartitionId, m => ReplicatedMapKeySetCodec.DecodeResponse(m).response);

            return(new ReadOnlyLazySet <TKey>(result, GetContext().GetSerializationService()));
        }
Пример #2
0
        public async Task <IReadOnlyCollection <TKey> > GetKeysAsync()
        {
            var requestMessage  = ReplicatedMapKeySetCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, _partitionId).CfAwait();

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

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