public TValue Get(object key) { var keyData = ToData(key); var request = ReplicatedMapGetCodec.EncodeRequest(GetName(), keyData); var result = Invoke(request, keyData); var value = ToObject <TValue>(ReplicatedMapGetCodec.DecodeResponse(result).response); return(value); }
public async Task <TValue> GetAsync(TKey key) { var keyData = ToSafeData(key); var requestMessage = ReplicatedMapGetCodec.EncodeRequest(Name, keyData); var responseMessage = await Cluster.Messaging.SendToKeyPartitionOwnerAsync(requestMessage, keyData).CfAwait(); var response = ReplicatedMapGetCodec.DecodeResponse(responseMessage).Response; return(ToObject <TValue>(response)); }