Ejemplo n.º 1
0
        private void UnLockResource(Transaction context, MyLM.LockMode mode, RID rId)
        {
            LockableID id = new LockableID(
                ResourceLockPrefix, new LockableID(rId.ToString()));

            this.UnLock(context, mode, id);
        }
Ejemplo n.º 2
0
        private void UnLockReservation(Transaction context, MyLM.LockMode mode, Customer rId)
        {
            LockableID id = new LockableID(
                ReservationLockPrefix, new LockableID(rId.ToString()));

            this.Lock(context, mode, id);
        }
Ejemplo n.º 3
0
        private void UnLockPage(Transaction context, MyLM.LockMode mode, int page)
        {
            LockableID id = new LockableID(
                PageLockPrefix, new LockableID(page.ToString()));

            this.UnLock(context, mode, id);
        }
Ejemplo n.º 4
0
        private void UnLock(Transaction context, MyLM.LockMode mode, LockableID id)
        {
            switch (mode)
            {
            case MyLM.LockMode.Read:
            {
                this.lockManager
                .UnlockRead(context, id);
            }
            break;

            case MyLM.LockMode.Write:
            {
                this.lockManager
                .UnlockWrite(context, id);
            }
            break;

            default:
                throw new Exception("Invalid lock mode requested");
            }
        }