Package jdbm.helper

Examples of jdbm.helper.LongComparator


        Properties     props;
       
        props = new Properties();
        recman = RecordManagerFactory.createRecordManager( "TestInsertPref-" + System.currentTimeMillis(),
                                                           props);
        btree = BTree.createInstance( recman, new LongComparator() );
       
        // Note:  One can use specialized serializers for better performance / database size
        // btree = BTree.createInstance( recman, new LongComparator(),
        //                               LongSerializer.INSTANCE, IntegerSerializer.INSTANCE );
View Full Code Here


        RecordManager recman;
        BTree tree = null;

        try {
            recman = RecordManagerFactory.createRecordManager( "test" );
            tree = BTree.createInstance( recman, new LongComparator(), null, null, 32 );

            Hashtable hash = new Hashtable();

            for ( int i=0; i<ITERATIONS; i++) {
                Long random = new Long( random( 0, 64000 ) );
View Full Code Here

        _recman = RecordManagerFactory.createRecordManager( "primes", props );

        recid = _recman.getNamedObject( "primes" );
        if ( recid == 0 ) {
            System.out.println( "Creating a new primes B+Tree." );
            _primes = BTree.createInstance( _recman, new LongComparator() );
            _recman.setNamedObject( "primes", _primes.getRecid() );
        } else {
            _primes = BTree.load( _recman, recid );
            System.out.println( "B+Tree already contains " + _primes.size() + " primes." );
        }
View Full Code Here

        _recman = RecordManagerFactory.createRecordManager( "primes", props );

        recid = _recman.getNamedObject( "primes" );
        if ( recid == 0 ) {
            System.out.println( "Creating a new primes B+Tree." );
            _primes = BTree.createInstance( _recman, new LongComparator() );
            _recman.setNamedObject( "primes", _primes.getRecid() );
        } else {
            _primes = BTree.load( _recman, recid );
            System.out.println( "B+Tree already contains " + _primes.size() + " primes." );
        }
View Full Code Here

      java.util.Properties props = new java.util.Properties();
      props.put( RecordManagerOptions.CACHE_SIZE, "100" );
      props.put( RecordManagerOptions.DISABLE_TRANSACTIONS, "true" );
      recman = RecordManagerFactory.createRecordManager(results_file_name,props);
      results_file.delete();
      tree = BTree.createInstance(recman,new LongComparator());
    }
    catch ( java.io.IOException ioe ) {
      ioe.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of jdbm.helper.LongComparator

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.