Examples of treeMap()


Examples of jdbm.RecordManager.treeMap()

        try {
            RecordManager recman =
                    RecordManagerFactory.createRecordManager(indexPath,
                            new Properties());
            PrimaryTreeMap<String, String> tree =
                    recman.treeMap(IndexerConstants.INDEX_TREE_KEY);
            tree.inverseHashView(IndexerConstants.INVERSE_KEY);

            // clear out tree data since we're rebuilding the index
            tree.clear();
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

        try {
            RecordManager recman =
                    RecordManagerFactory.createRecordManager(indexPath,
                            new Properties());
            PrimaryTreeMap<String, SkinnyUUID> tree =
                    recman.treeMap(IndexerConstants.INDEX_TREE_KEY,
                            new SkinnyUUIDSerializer());
            tree.inverseHashView(IndexerConstants.INVERSE_KEY);

            // clear out tree data since we're rebuilding the index
            tree.clear();
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

        if (tmap != null) {
            return;
        }
        final RecordManager rm = createRecordManager(indexPath);
        if (valueSerializer == null) {
            tmap = rm.treeMap(IndexerConstants.INDEX_TREE_KEY);
        } else {
            tmap = rm.treeMap(IndexerConstants.INDEX_TREE_KEY, valueSerializer);
        }
        if (tmap.isEmpty()) {
            rm.close();
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

        }
        final RecordManager rm = createRecordManager(indexPath);
        if (valueSerializer == null) {
            tmap = rm.treeMap(IndexerConstants.INDEX_TREE_KEY);
        } else {
            tmap = rm.treeMap(IndexerConstants.INDEX_TREE_KEY, valueSerializer);
        }
        if (tmap.isEmpty()) {
            rm.close();
            throw new IOException("tree map is empty");
        }
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

        try {
            indexPath = tempFolder.newFolder();
            RecordManager recman = RecordManagerFactory.createRecordManager(
                    indexPath.getAbsolutePath(), new Properties());
            PrimaryTreeMap<String, String> tree =
                    recman.treeMap(IndexerConstants.INDEX_TREE_KEY);
            tree.inverseHashView(IndexerConstants.INVERSE_KEY);
            tree.put(key, value);
            recman.commit();
            recman.close();
        } catch (IOException e) {
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

            value = new SkinnyUUID(UUID.randomUUID());

            RecordManager recman = RecordManagerFactory.createRecordManager(
                    indexPath.getAbsolutePath(), new Properties());
            PrimaryTreeMap<String, SkinnyUUID> tree =
                    recman.treeMap(IndexerConstants.INDEX_TREE_KEY,
                            new SkinnyUUIDSerializer());
            tree.inverseHashView(IndexerConstants.INVERSE_KEY);
            tree.put(key, value);
            recman.commit();
            recman.close();
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

            this.uuids = new ArrayList<SkinnyUUID>();
            RecordManager recman = RecordManagerFactory.createRecordManager(
                    indexPath.getAbsolutePath(), new Properties());

            PrimaryTreeMap<String, SkinnyUUID> tree =
                    recman.treeMap(IndexerConstants.INDEX_TREE_KEY,
                            new SkinnyUUIDSerializer());
            tree.inverseHashView(IndexerConstants.INVERSE_KEY);

            for (int i = 0; i < numToTest; i++) {
                SkinnyUUID uuid = new SkinnyUUID(UUID.randomUUID());
View Full Code Here

Examples of jdbm.RecordManager.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

Examples of jdbm.RecordManager.treeMap()

    assertTrue("file is too big, compression failed", fileSize<1000);
  }
 
  public void testCornersLimitsLong() throws IOException{
    RecordManager recman = newRecordManager();
    PrimaryTreeMap<Long, String> map = recman.treeMap("aa");
    ArrayList<Long> ll = new ArrayList<Long>();
    for(Long i = Long.MIN_VALUE;i<Long.MIN_VALUE+1000;i++){
      map.put(i, "");
      ll.add(i);
    }
View Full Code Here

Examples of jdbm.RecordManager.treeMap()

  }

 
  public void testCornersLimitsInt() throws IOException{
    RecordManager recman = newRecordManager();
    PrimaryTreeMap<Integer, String> map = recman.treeMap("aa");
    ArrayList<Integer> ll = new ArrayList<Integer>();
    for(Integer i = Integer.MIN_VALUE;i<Integer.MIN_VALUE+1000;i++){
      map.put(new Integer(i), "");
      ll.add(new Integer(i));
    }
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.