public bool IsLocked(K key)
        {
            var keyData = ToData(key);
            var request = MapIsLockedCodec.EncodeRequest(GetName(), keyData);
            var result  = Invoke(request, keyData);

            return(MapIsLockedCodec.DecodeResponse(result).response);
        }
示例#2
0
        private async Task <bool> IsLockedAsync(TKey key, CancellationToken cancellationToken)
        {
            var keyData = ToSafeData(key);

            var requestMessage  = MapIsLockedCodec.EncodeRequest(Name, keyData);
            var responseMessage = await Cluster.Messaging.SendToKeyPartitionOwnerAsync(requestMessage, keyData, cancellationToken).CAF();

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

            return(response);
        }