Package com.sleepycat.je.latch

Examples of com.sleepycat.je.latch.Latch


                                    long now,
            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);
        } finally {
            latch.release();
        }
    }
View Full Code Here


  long nid = nodeId;
  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

                  Locker destLocker,
                  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 owningLocker,
                          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

     */
    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

TOP

Related Classes of com.sleepycat.je.latch.Latch

Copyright © 2018 www.massapicom. 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.