Package dovetaildb.store

Examples of dovetaildb.store.MappedBytesInterface


    if (! homeDirFile.exists()) {
      homeDirFile.mkdirs();
    }
    super.setHomedir(homeDir);
    try {
      header = new MappedBytesInterface(openAsChannel("ddbhdr"));
      data = new MappedBytesInterface(openAsChannel("ddbdat"));
      if (header.getSize() == 0) {
        header.appendBytes(new byte[32]);
        writeHeader();
        MemoryTokenTable emptyRoot =
          new MemoryTokenTable(ArrayBytes.EMPTY_BYTES,
View Full Code Here


      }

      pages = new PagedFile(pagesFile);
      pageBi = pages.getBytesInterface();
     
      maxDocIdFile      = new MappedBytesInterface(openFile("maxdocid"));
      if (newIndex) {
        maxDocIdFile = maxDocIdFile.ensureSizeAtLeast(8);
        maxDocIdFile.putLong(0, 0);
       
        int pageLocation = writePlan(new PagePlan(), 0);
        if (pageLocation != 0)
          throw new RuntimeException("page location not at root - unexpected");

      }
      docIdToDoc        = new MappedBytesInterface(openFile("docidtodoc"));
      docFields         = new MappedBytesInterface(openFile("docfields"));
      overflowFieldData = new ChunkedMemoryMappedFile(openFile("overflow"));
     
      this.maxDocId = maxDocIdFile.getLong(0);
     
    } catch (FileNotFoundException e) {
View Full Code Here

TOP

Related Classes of dovetaildb.store.MappedBytesInterface

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.