Package com.sleepycat.je.latch

Examples of com.sleepycat.je.latch.Latch.acquire()


    void demote(long nodeId, Locker locker)
        throws DatabaseException {
       
  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            demoteInternal(nodeId, locker, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here


    boolean isLocked(Long nodeId)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return isLockedInternal(nodeId, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

    boolean isOwner(Long nodeId, Locker locker, LockType type)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return isOwnerInternal(nodeId, locker, type, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

    boolean isWaiter(Long nodeId, Locker locker)
        throws DatabaseException {
       
  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return isWaiterInternal(nodeId, locker, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

    int nWaiters(Long nodeId)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return nWaitersInternal(nodeId, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

    int nOwners(Long nodeId)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return nOwnersInternal(nodeId, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

    Locker getWriteOwnerLocker(Long nodeId)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return getWriteOwnerLockerInternal(nodeId, lockTableIndex);
        } finally {
            latch.release();
        }
View Full Code Here

          MemoryBudget mb)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return validateOwnershipInternal
    (nodeId, locker, type, flushFromWaiters, mb, lockTableIndex);
        } finally {
            latch.release();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.