Package jdbm

Examples of jdbm.RecordManager.commit()


        }

        tree.put( "Foo", "Bar" );
        tree.put( "Fo", "Fum" );

        recman.commit();

        tree.put( "Hello", "World" );

        recman.rollback();
View Full Code Here


        if ( root == 0 ) {
            // create a new one
            tree = HTree.createInstance( recman );
            root = tree.getRecid();
            recman.setNamedObject( "xyz", root );
            recman.commit();
        } else {
            tree = HTree.load( recman, root );
        }

        tree.put( "hello", "world" );
View Full Code Here

            tree = HTree.load( recman, root );
        }

        tree.put( "hello", "world" );
        tree.put( "goodnight", "gracie" );
        recman.commit();

        tree.put( "derek", "dick" );
        recman.rollback();

        assertTrue( tree.find( "derek" ) == null );
View Full Code Here

        if ( root == 0 ) {
            // create a new one
            tree = BTree.createInstance( recman );
            root = tree.getRecid();
            recman.setNamedObject( "xyz", root );
            recman.commit();
        } else {
            tree = BTree.load( recman, root );
        }

        tree.insert( "Foo", "Bar",true );
View Full Code Here

        }

        tree.insert( "Foo", "Bar",true );
        tree.insert( "Fo", "Fum",true );

        recman.commit();

        tree.insert( "Hello", "World",true );

        recman.rollback();
View Full Code Here

        if ( root == 0 ) {
            // create a new one
            tree = BTree.createInstance( recman );
            root = tree.getRecid();
            recman.setNamedObject( "xyz", root );
            recman.commit();
        } else {
            tree = BTree.load( recman, root );
        }

        tree.insert( "hello", "world",true );
View Full Code Here

            tree = BTree.load( recman, root );
        }

        tree.insert( "hello", "world",true );
        tree.insert( "goodnight", "gracie",true );
        recman.commit();

        tree.insert( "derek", "dick",true );
        recman.rollback();

        assertTrue( tree.find( "derek" ) == null );
View Full Code Here

        // put enough data into the tree so we definitely have multiple pages
        for (int count = 1; count <= 1000; count++){
            tree.insert("num" + count,new Integer(count),false);
            if (count % 100 == 0)
                recman.commit();
        }
        List<Long> out = new ArrayList<Long>();
        tree.dumpChildPageRecIDs(out);       
        assertTrue(out.size() > 0);
    }
View Full Code Here

               
        Map<Long, Long> map = recman.hashMap("custom", serializer, serializer);
       
        map.put(new Long(1), new Long(1));
        map.put(new Long(2), new Long(2));
        recman.commit();
        map.put(new Long(2), new Long(3));
        recman.commit();
                recman.close();
        }
View Full Code Here

       
        map.put(new Long(1), new Long(1));
        map.put(new Long(2), new Long(2));
        recman.commit();
        map.put(new Long(2), new Long(3));
        recman.commit();
                recman.close();
        }

}
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.