Examples of updateByteSize()


Examples of net.sf.joafip.btreeplus.entity.IPageRecordable.updateByteSize()

        btreePlusElementMgr.getLastRecordPositionInFile());

    NonTerminalPage nonTerminalPage = new NonTerminalPage(1, true);
    nonTerminalPage.setKey(0, new DataRecordIdentifier());
    pageRecordable = nonTerminalPage;
    pageRecordable.updateByteSize();
    assertNull(MUST_BE_NOT_STORED, pageRecordable.getPageRecord());
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    pageRecord = pageRecordable.getPageRecord();
    assertNotNull(MUST_BE_STORED, pageRecord);
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.IPageRecordable.updateByteSize()

  public void testFreePage() throws HeapException {
    btreePlusElementMgr.openTransaction();
    assertEquals("must not has free page", -1, getHeapHeader()
        .getPageNumberOfFirstFreePage());
    IPageRecordable pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.IPageRecordable.updateByteSize()

    IPageRecordable pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    final long pageNumber = pageRecordable.getPageRecord().getPageNumber();
    pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.IPageRecordable.updateByteSize()

    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    final long pageNumber = pageRecordable.getPageRecord().getPageNumber();
    pageRecordable = newLeafPage();
    pageRecordable.updateByteSize();
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    btreePlusElementMgr.closeTransaction();

    btreePlusElementMgr.openTransaction();
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.LeafPage.updateByteSize()

  public void testAppendPageRecordable() throws HeapException {
    btreePlusElementMgr.openTransaction();
    final LeafPage leafPage = new LeafPage(1, true);
    leafPage.setEntry(0, 0, new DataRecordIdentifier());
    leafPage.updateByteSize();
    IPageRecordable pageRecordable = leafPage;
    assertNull(MUST_BE_NOT_STORED, pageRecordable.getPageRecord());
    btreePlusElementMgr.appendPageRecordable(pageRecordable);
    pageRecordable.setValueIsChangedValueToSave();
    IPageRecord pageRecord = pageRecordable.getPageRecord();
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.LeafPage.updateByteSize()

  }

  private IPageRecordable newLeafPage() throws HeapException {
    final LeafPage pageRecordable = new LeafPage(1, true);
    pageRecordable.setEntry(0, 0, new DataRecordIdentifier());
    pageRecordable.updateByteSize();
    return pageRecordable;
  }

  public void testDataBlock() throws HeapException {
    TestDataBlockContext[] contextByBits = new TestDataBlockContext[PageConstant.NUMBER_OF_BLOCK_TYPE];
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.LeafPage.updateByteSize()

    appendPageRecordable(leafPage);
    // leafPage.setDataBlock(0, dataBlock);
    leafPage.setEntry(0, dataBlock.getPositionInFile(),
        dataRecordIdentifier);
    leafPage.setNext(-1L);
    leafPage.updateByteSize();
    leafPage.setValueIsChangedValueToSave();
    final long firstLeafPagePosition = leafPage.getPositionInFile();
    header.setRootPagePosition(firstLeafPagePosition);
    header.setFirstLeafPagePosition(firstLeafPagePosition);
  }
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.NonTerminalPage.updateByteSize()

    final NonTerminalPage nonTerminalPage = new NonTerminalPage(1, longKey);
    nonTerminalPage.setEntry(0, leftLeafPage.getPositionInFile(),
        leftLeafPage.getLastKey());
    nonTerminalPage.setEntry(1, rightLeafPage.getPositionInFile(), null);
    appendPageRecordable(nonTerminalPage);
    nonTerminalPage.updateByteSize();
    nonTerminalPage.setValueIsChangedValueToSave();
    header.setRootPagePosition(nonTerminalPage.getPositionInFile());
  }

  public void newRootNonTerminalPage(
View Full Code Here

Examples of net.sf.joafip.btreeplus.entity.NonTerminalPage.updateByteSize()

    nonTerminalPage.setEntry(0, leftNonTerminalPage.getPositionInFile(),
        middleKey);
    nonTerminalPage.setEntry(1, rightNonTerminalPage.getPositionInFile(),
        null);
    appendPageRecordable(nonTerminalPage);
    nonTerminalPage.updateByteSize();
    nonTerminalPage.setValueIsChangedValueToSave();
    header.setRootPagePosition(nonTerminalPage.getPositionInFile());
  }

  public IDataBlock createDataBlock(final byte[] data) throws HeapException {
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.