private void OnEnter(Message msg, Protocols.EnterKey enter)
        {
            LockInfo info = new LockInfo();

            info.RequestMessage = msg;
            info.Key            = enter.Key;
            info.Owner          = enter.Owner;
            info.Type           = ProcessType.Enter;
            mLockInfoQueue.Enqueue(info);
        }
        public IDisposable Enter(string key)
        {
            string owner = mID + "_" + System.Threading.Thread.CurrentThread.ManagedThreadId;

            Protocols.EnterKey enter = new Protocols.EnterKey();
            enter.Owner = owner;
            enter.Key   = key;
            Protocols.LockResult result = Subscriber.Publish <Protocols.LockResult>(DMonitoCenter.SMART_DLOCKCENTER, enter, TimeOut);
            if (!result.Success)
            {
                throw new DLockExecption(result.StatusMessage);
            }
            return(new Locker {
                Key = key, Owner = owner, Moitor = this
            });
        }