Package dovetaildb.store

Examples of dovetaildb.store.VarPosition


    long byteOffset    = pages.getByteOffestForPage(page);
    long byteOffsetCap = pages.getByteOffestForPage(page+1);
    long intOffset     = pages.getIntOffestForPage(page);
    if (isSingleValued) {
      pageBi.putInt(intOffset, SINGLE_MASK);
      VarPosition vp = new VarPosition(byteOffset + 4);
      for(TermInDocRec rec : bucket) {
        pageBi.putVLong(vp, rec.docId, byteOffsetCap);
      }
      pageBi.putVLong(vp, 0, byteOffsetCap);
    } else {
      pageBi.putByte(byteOffset++, (byte)0);
      VarPosition vp = new VarPosition(byteOffset);
      for(TermInDocRec rec : bucket) {
        pageBi.putVLong(vp, rec.docId, byteOffsetCap);
        pageBi.putVLong(vp, rec.term.length, byteOffsetCap);
        byteOffsetCap -= rec.term.length;
        pageBi.putBytes(byteOffsetCap, rec.term.length, rec.term, 0);
View Full Code Here


    int parentTriePage = ret.parentPage;
    int firstLeafPage  = ret.page;
    int lastLeafPage   = this.getPrevLeafPage(firstLeafPage); // get last page
    rec.bump(termPrefixLen);

    VarPosition pos = getDocsStartForPage(lastLeafPage);
    VarPosition top = getDocsCapForPage(lastLeafPage);
    TermInDocRec cur  = null;
    TermInDocRec prev = null;
    boolean allSame = true;
    do {
      cur = readTermInDocRec(prev, pos, top);
View Full Code Here

  }
 
  private VarPosition getDocsStartForPage(int leafPage) {
    long offset = pages.getByteOffestForPage(leafPage);
    // link prev:4 + link next:4 + doc list
    return new VarPosition(offset+8);
  }
View Full Code Here

    long offset = pages.getByteOffestForPage(leafPage);
    // link prev:4 + link next:4 + doc list
    return new VarPosition(offset+8);
  }
  private VarPosition getDocsCapForPage(int leafPage) {
    return new VarPosition(pages.getByteOffestForPage(leafPage+1));
  }
View Full Code Here

TOP

Related Classes of dovetaildb.store.VarPosition

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.