Ejemplo n.º 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()));
        }
Ejemplo n.º 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));
        }