Package jdbm.recman

Examples of jdbm.recman.BaseRecordManager.treeMap()


 
  public void testExpand() throws IOException{
    long init = Long.MAX_VALUE - size*2;
    String file = newTestFile();
    RecordManager recman = new BaseRecordManager(file);
    PrimaryTreeMap<Long, String> map = recman.treeMap("aa");
    for(long i = init; i<init+size;i++){
      map.put(i, "");     
    }
    recman.commit();
    recman.defrag();
View Full Code Here


 
  public void testStrings() throws IOException{
    long init = Long.MAX_VALUE - size*2;
    String file = newTestFile();
    RecordManager recman = new BaseRecordManager(file);
    PrimaryTreeMap<String, String> map = recman.treeMap("aa");
    for(long i = init; i<init+size/10;i++){
      map.put("aaaaa"+i, "");     
    }
    recman.commit();
    recman.defrag();   
View Full Code Here

    }
    recman.commit();
    recman.defrag();   
    recman.close();
    recman = new BaseRecordManager(file);
    map = recman.treeMap("aa");
    for(long i = init; i<init+size/10;i++){
      assertTrue(map.containsKey("aaaaa"+i));     
    }

    long fileSize = new File(file+".dbr.0").length()/1024;
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.