Package org.xtreemfs.babudb.api.database

Examples of org.xtreemfs.babudb.api.database.Database.lookup()


        }
       
        for (int i = 0; i < 1000; i++) {
           
            byte[] v0 = db.lookup(0, (i + "").getBytes(), null).get();
            byte[] v1 = db.lookup(1, (i + "").getBytes(), null).get();
            byte[] v2 = db.lookup(2, (i + "").getBytes(), null).get();
           
            assertNull(v0);
            assertNull(v1);
            assertNull(v2);
View Full Code Here


       
        for (int i = 0; i < 1000; i++) {
           
            byte[] v0 = db.lookup(0, (i + "").getBytes(), null).get();
            byte[] v1 = db.lookup(1, (i + "").getBytes(), null).get();
            byte[] v2 = db.lookup(2, (i + "").getBytes(), null).get();
           
            assertNull(v0);
            assertNull(v1);
            assertNull(v2);
        }
View Full Code Here

                }
            }
        });
       
        Database db = database.getDatabaseManager().getDatabase("test");
        byte[] result = db.lookup(0, "Yagga".getBytes(), null).get();
        assertNotNull(result);
        String value = new String(result);
        assertEquals(value, "Brabbel");
       
        result = db.lookup(1, "Brabbel".getBytes(), null).get();
View Full Code Here

        byte[] result = db.lookup(0, "Yagga".getBytes(), null).get();
        assertNotNull(result);
        String value = new String(result);
        assertEquals(value, "Brabbel");
       
        result = db.lookup(1, "Brabbel".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blupp");
       
        result = db.lookup(2, "Blupp".getBytes(), null).get();
View Full Code Here

        result = db.lookup(1, "Brabbel".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blupp");
       
        result = db.lookup(2, "Blupp".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blahh");
       
        database.shutdown();
View Full Code Here

                fail("May not be executed if database is not empty.");
            }
        });
       
        db = database.getDatabaseManager().getDatabase("test");
        result = db.lookup(0, "Yagga".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Brabbel");
       
        result = db.lookup(1, "Brabbel".getBytes(), null).get();
View Full Code Here

        result = db.lookup(0, "Yagga".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Brabbel");
       
        result = db.lookup(1, "Brabbel".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blupp");
       
        result = db.lookup(2, "Blupp".getBytes(), null).get();
View Full Code Here

        result = db.lookup(1, "Brabbel".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blupp");
       
        result = db.lookup(2, "Blupp".getBytes(), null).get();
        assertNotNull(result);
        value = new String(result);
        assertEquals(value, "Blahh");
       
        database.shutdown();
View Full Code Here

        assertNotNull(db);
        assertEquals("test", db.getName());
        assertEquals(3, db.getComparators().length);
       
        // check if the records are there
        byte[] value = db.lookup(0, "hello".getBytes(), null).get();
        assertEquals("world", new String(value));
       
        value = db.lookup(1, "key".getBytes(), null).get();
        assertEquals("value", new String(value));
       
View Full Code Here

       
        // check if the records are there
        byte[] value = db.lookup(0, "hello".getBytes(), null).get();
        assertEquals("world", new String(value));
       
        value = db.lookup(1, "key".getBytes(), null).get();
        assertEquals("value", new String(value));
       
        // create and execute a second transaction
        txn = dbMan.createTransaction();
        txn.createDatabase("test2", 1);
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.