Examples of BSkipList


Examples of net.metanotion.io.block.index.BSkipList

      //bf.metaIndex.delete();
      bf.makeIndex("foo", new NullBytes(), new NullBytes());


      BSkipList b = bf.getIndex("foo", new NullBytes(), new NullBytes());
      System.out.println(bf.allocPage());

      bf.close();
      raif.close();
    } catch (Exception e) {
View Full Code Here

Examples of net.metanotion.io.block.index.BSkipList

    }
//    if(mounted != 0) { throw new CorruptFileException(); }
    if(fileLen != file.length()) { throw new CorruptFileException(); }
    mount();

    metaIndex = new BSkipList(spanSize, this, 2, new StringBytes(), new IntBytes());
  }
View Full Code Here

Examples of net.metanotion.io.block.index.BSkipList

  }

  public BSkipList getIndex(String name, Serializer key, Serializer val) throws IOException {
    Integer page = (Integer) metaIndex.get(name);
    if (page == null) { return null; }
    BSkipList bsl = new BSkipList(spanSize, this, page.intValue(), key, val);
    openIndices.put(name, bsl);
    return bsl;
  }
View Full Code Here

Examples of net.metanotion.io.block.index.BSkipList

  public BSkipList makeIndex(String name, Serializer key, Serializer val) throws IOException {
    if(metaIndex.get(name) != null) { throw new IOException("Index already exists"); }
    int page = allocPage();
    metaIndex.put(name, new Integer(page));
    BSkipList.init(this, page, spanSize);
    BSkipList bsl = new BSkipList(spanSize, this, page, key, val);
    openIndices.put(name, bsl);
    return bsl;
  }
View Full Code Here

Examples of net.metanotion.io.block.index.BSkipList

  public void delIndex(String name) throws IOException {
    Integer page = (Integer) metaIndex.remove(name);
    if (page == null) { return; }
    NullBytes nb = new NullBytes();
    BSkipList bsl = new BSkipList(spanSize, this, page.intValue(), nb, nb);
    bsl.delete();
  }
View Full Code Here

Examples of net.metanotion.io.block.index.BSkipList

    Set oi = openIndices.keySet();
    Iterator i = oi.iterator();
    Object k;
    while(i.hasNext()) {
      k = i.next();
      BSkipList bsl = (BSkipList) openIndices.get(k);
      bsl.close();
    }

    // Unmount.
    file.seek(BlockFile.OFFSET_MOUNTED);
    file.writeShort(0);
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.