public void insert()
throws IOException
{
BTree btree;
RecordManager recman;
long start, finish;
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 );
start = System.currentTimeMillis();
for (int i = 0; i < _numberOfObjects; i++) {
btree.insert( new Long( i ), new Integer( i ), false );
}
recman.commit();
finish = System.currentTimeMillis();
System.out.println( "It took " + (finish - start) + " ms to insert "