461462463464465466467468469470471
public BIN latchBIN() throws DatabaseException { while (bin != null) { BIN waitingOn = bin; waitingOn.latch(cacheMode); if (bin == waitingOn) { return bin; } waitingOn.releaseLatch(); }
170171172173174175176177178179180
* 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},
275276277278279280281282283284285
* 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
400401402403404405406407408409410
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;
416417418419420421422423424425426
public BIN latchBIN() throws DatabaseException { while (bin != null) { BIN waitingOn = bin; waitingOn.latch(); if (bin == waitingOn) { return bin; } waitingOn.releaseLatch(); }
453454455456457458459460461462463
public DBIN latchDBIN() throws DatabaseException { while (dupBin != null) { BIN waitingOn = dupBin; waitingOn.latch(); if (dupBin == waitingOn) { return dupBin; } waitingOn.releaseLatch(); }
451452453454455456457458459460461
488489490491492493494495496497498
218219220221222223224225226227228
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},
685686687688689690691692693694695
*/ 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); }