示例#1
0
        public void ForceUnlock(TKey key)
        {
            var keyData = ToData(key);
            var request = MapForceUnlockCodec.EncodeRequest(Name, keyData, _lockReferenceIdGenerator.GetNextReferenceId());

            Invoke(request, keyData);
        }
        public void ForceUnlock(K key)
        {
            var keyData = ToData(key);
            var request = MapForceUnlockCodec.EncodeRequest(GetName(), keyData);

            Invoke(request, keyData);
        }
示例#3
0
        private async Task ForceUnlockAsync(TKey key, CancellationToken cancellationToken)
        {
            var keyData = ToSafeData(key);

            var refId = _lockReferenceIdSequence.GetNext();

            var requestMessage = MapForceUnlockCodec.EncodeRequest(Name, keyData, refId);
            var task           = Cluster.Messaging.SendToKeyPartitionOwnerAsync(requestMessage, keyData, cancellationToken);

#if HZ_OPTIMIZE_ASYNC
            return(task);
#else
            await task.CAF();
#endif
        }