Examples of latch()


Examples of com.sleepycat.je.tree.BIN.latch()

    public BIN latchBIN()
        throws DatabaseException {

        while (bin != null) {
            BIN waitingOn = bin;
            waitingOn.latch(cacheMode);
            if (bin == waitingOn) {
                return bin;
            }
            waitingOn.releaseLatch();
        }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

             * BINs
             */
            BIN bin = new BIN(database,
                              new byte[] {3,2,1},
                              8, 5);
            bin.latch();
            bin.insertEntry(new ChildReference(null,
                                               new byte[] {1,0,1,0},
                                               DbLsn.makeLsn(212, 200)));
            bin.insertEntry(new ChildReference(null,
                                               new byte[] {1,1,1,0},
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

             * delta.
             */
            BIN binDeltaBin =
    new BIN(DbInternal.dbGetDatabaseImpl(db), key, 10, 1);
            maxNodeId = binDeltaBin.getNodeId();
            binDeltaBin.latch();
            ChildReference newEntry =
                new ChildReference(null, key, DbLsn.makeLsn(0, 0));
            assertTrue(binDeltaBin.insertEntry(newEntry));

            lsn = binDeltaBin.logProvisional(logManager, in); // full
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

    public static void logBINAndIN(Environment env, Cursor cursor)
        throws DatabaseException {

        BIN bin = getBIN(cursor);
        Tree tree = bin.getDatabase().getTree();
        bin.latch();
        SearchResult result = tree.getParentINForChildIN(bin, true, true);
        assert result.parent != null;
        result.parent.releaseLatch();
        assert result.exactParentFound;
        IN in = result.parent;
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

    public BIN latchBIN()
        throws DatabaseException {

  while (bin != null) {
      BIN waitingOn = bin;
      waitingOn.latch();
      if (bin == waitingOn) {
    return bin;
      }
      waitingOn.releaseLatch();
  }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

    public DBIN latchDBIN()
        throws DatabaseException {

  while (dupBin != null) {
      BIN waitingOn = dupBin;
      waitingOn.latch();
      if (dupBin == waitingOn) {
    return dupBin;
      }
      waitingOn.releaseLatch();
  }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

    public BIN latchBIN()
        throws DatabaseException {

  while (bin != null) {
      BIN waitingOn = bin;
      waitingOn.latch();
      if (bin == waitingOn) {
    return bin;
      }
      waitingOn.releaseLatch();
  }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN.latch()

    public DBIN latchDBIN()
        throws DatabaseException {

  while (dupBin != null) {
      BIN waitingOn = dupBin;
      waitingOn.latch();
      if (dupBin == waitingOn) {
    return dupBin;
      }
      waitingOn.releaseLatch();
  }
View Full Code Here

Examples of com.sleepycat.je.tree.DBIN.latch()

            DBIN dbin = new DBIN(database,
                                 new byte[] {3,2,1},
                                 8,
                                 new byte[] {1,2,3},
                                 5);
            dbin.latch();
            dbin.insertEntry(new ChildReference(null,
                                                new byte[] {1,0,1,0},
                                                DbLsn.makeLsn(212, 200)));
            dbin.insertEntry(new ChildReference(null,
                                                new byte[] {1,1,1,0},
View Full Code Here

Examples of com.sleepycat.je.tree.DIN.latch()

             */
            boolean lnIsDupCountLN = ln.containsDuplicates();
            long treeLsn;
      if (lnIsDupCountLN) {
    parentDIN = (DIN) bin.fetchTarget(index);
    parentDIN.latch(false);
                ChildReference dclRef = parentDIN.getDupCountLNRef();
                treeLsn = dclRef.getLsn();
      } else {
                treeLsn = bin.getLsn(index);
      }
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.