Examples of Bin


Examples of com.sleepycat.je.tree.BIN

    }

    private void removeCursorBIN()
  throws DatabaseException {

  BIN abin = latchBIN();
  if (abin != null) {
      abin.removeCursor(this);
      abin.releaseLatch();
  }
    }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

                        latchBIN();
                    }
                    binToBeRemoved = bin;
                    bin = null;

                    BIN newBin;

                    /*
                     * SR #12736
                     * Prune away oldBin. Assert has intentional side effect
                     */
                    assert TestHookExecute.doHookIfSet(testHook);

                    if (forward) {
                        newBin = database.getTree().getNextBin
                            (binToBeRemoved, null);
                    } else {
                        newBin = database.getTree().getPrevBin
                            (binToBeRemoved, null);
                    }
                    if (newBin == null) {
                        result.status = OperationStatus.NOTFOUND;
                        break;
                    } else {
                        if (forward) {
                            index = -1;
                        } else {
                            index = newBin.getNEntries();
                        }
                        addCursor(newBin);
                        /* Ensure that setting bin is under newBin's latch */
                        bin = newBin;
                        alreadyLatched = true;
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

  DataWalker dw = new DataWalker(bins) {
    void perData(String foundKey, String foundData)
        throws DatabaseException {
                    CursorImpl cursorImpl = DbTestProxy.dbcGetCursorImpl(cursor);
        BIN lastBin = cursorImpl.getBIN();
        DBIN lastDupBin = cursorImpl.getDupBIN();
        if (rnd.nextInt(10) < 8) {
      cursor.delete();
        }
                    dataMap.put(lastBin, lastBin);
                    dataMap.put(lastDupBin, lastDupBin);
    }
      };
  dw.setIgnoreDataMap(true);
  dw.walkData();
  dw.close();
  Enumeration e = bins.keys();
  while (e.hasMoreElements()) {
      BIN b = (BIN) e.nextElement();
      assertFalse(b.getCursorSet().size() > 0);
  }
    }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

    private boolean checkForInsertion(GetMode getMode,
                                      CursorImpl origCursor,
                                      CursorImpl dupCursor)
        throws DatabaseException {

        BIN origBIN = origCursor.getBIN();
        BIN dupBIN = dupCursor.getBIN();
        DBIN origDBIN = origCursor.getDupBIN();

        /* If fetchTarget returns null below, a deleted LN was cleaned. */

        boolean forward = true;
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

    private long getFile(Cursor cursor)
        throws DatabaseException {

        CursorImpl impl = DbTestProxy.dbcGetCursorImpl(cursor);
        int index;
        BIN bin = impl.getDupBIN();
        if (bin != null) {
            index = impl.getDupIndex();
        } else {
            bin = impl.getBIN();
            assertNotNull(bin);
            index = impl.getIndex();
        }
        assertNotNull(bin.getTarget(index));
        long lsn = bin.getLsn(index);
        assertTrue(lsn != DbLsn.NULL_LSN);
        long file = DbLsn.getFileNumber(lsn);
        assert file > lastFileSeen;
        lastFileSeen = file;
        return file;
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

     */
    private long getLsn(Cursor cursor)
        throws DatabaseException {

        CursorImpl impl = DbTestProxy.dbcGetCursorImpl(cursor);
        BIN bin;
        int index;
        if (dups) {
            bin = impl.getDupBIN();
            index = impl.getDupIndex();
            if (bin == null) {
                bin = impl.getBIN();
                index = impl.getIndex();
                assertNotNull(bin);
            }
        } else {
            assertNull(impl.getDupBIN());
            bin = impl.getBIN();
            index = impl.getIndex();
            assertNotNull(bin);
        }
        assertTrue(index >= 0);
        long lsn = bin.getLsn(index);
        assertTrue(lsn != DbLsn.NULL_LSN);
        return lsn;
    }
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

     */
    private static VLSN getVLSN(Cursor cursor, LogManager logManager)
        throws Exception {

        CursorImpl cursorImpl = DbInternal.getCursorImpl(cursor);
        BIN bin = cursorImpl.getBIN();
        int index = cursorImpl.getIndex();
        DBIN dbin = cursorImpl.getDupBIN();
        int dupIndex = cursorImpl.getDupIndex();

        final long lsn =
            (dbin != null) ? dbin.getLsn(dupIndex) : bin.getLsn(index);

        WholeEntry entry = logManager.getLogEntryAllowInvisible(lsn);

        VLSN vlsn = entry.getHeader().getVLSN();
        if (vlsn == null) {
View Full Code Here

Examples of com.sleepycat.je.tree.BIN

       
        /* Make a child reference as a candidate for insertion. */
        ChildReference newLNRef =
      new ChildReference(null, location.lnKey, logLsn);

        BIN parentBIN = location.bin;
        int entryIndex = parentBIN.insertEntry1(newLNRef);

        if ((entryIndex & IN.INSERT_SUCCESS) == 0) {

            /*
       * Entry may have been a duplicate. Insertion was not successful.
       */
            entryIndex &= ~IN.EXACT_MATCH;

            boolean canOverwrite = false;
            if (parentBIN.isEntryKnownDeleted(entryIndex)) {
                canOverwrite = true;
            } else {

                /*
                 * Read the LN that's in this slot to check for deleted
                 * status.  No need to lock, since this is recovery.  If
                 * fetchTarget returns null, a deleted LN was cleaned.
                 */
                LN currentLN = (LN) parentBIN.fetchTarget(entryIndex);

                if (currentLN == null || currentLN.isDeleted()) {
                    canOverwrite = true;
                }

                /*
     * Evict the target again manually, to reduce memory
     * consumption while the evictor is not running.
                 */
    parentBIN.updateEntry(entryIndex, null);
            }

            if (canOverwrite) {
                parentBIN.updateEntry(entryIndex, null, logLsn,
                                      location.lnKey);
                parentBIN.clearKnownDeleted(entryIndex);
                location.index = entryIndex;
                return true;
            } else {
                return false;
            }
View Full Code Here

Examples of htsjdk.samtools.Bin

            final long readerStartOffset = position();

            int maxChunkCount = 0;

            while(currentBinInLowestLevel < GATKBAMIndex.MAX_BINS && currentLocus != null) {
                final Bin bin = new Bin(referenceSequence,currentBinInLowestLevel);
                final int binStart = index.getFirstLocusInBin(bin);
                final int binStop = index.getLastLocusInBin(bin);

                // In required, pull bin iterator ahead to the point of the next GenomeLoc.
                if(binStop < currentLocus.getStart()) {
View Full Code Here

Examples of jscicalc.pobject.Bin

     * @param applet The <em>controller</em> object.
     */
    public BinButton( CalculatorApplet applet ){
  //super( applet );
  this.applet = applet;
  this.pobject = new Bin();
  setText();
  tooltip = pobject.tooltip();
  shortcut = pobject.shortcut();
  setTextSize();
  setToolTipText();
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.