Package com.sleepycat.je.latch

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


    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

                                          MemoryBudget mb)
        throws DatabaseException {

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

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

            DatabaseImpl database)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return makeTimeoutMsgInternal(lockOrTxn, locker,
                                          nodeId, type, grantType,
                                          useLock, timeout, start, now,
            database);
View Full Code Here

  if (nid == -1) {
      nid = lock.getNodeId().longValue();
  }
  int lockTableIndex = getLockTableIndex(nid);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            return releaseAndFindNotifyTargetsInternal
    (nodeId, lock, locker, removeFromLocker, lockTableIndex);
        } finally {
            latch.release();
View Full Code Here

                  boolean demoteToRead)
        throws DatabaseException {

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

                          Locker [] destLockers)
        throws DatabaseException {

  int lockTableIndex = getLockTableIndex(nodeId);
  Latch latch = lockTableLatches[lockTableIndex];
        latch.acquire();
        try {
            transferMultipleInternal(nodeId, owningLocker,
             destLockers, 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.