Examples of loadDataBase()


Examples of business.database.AppDatabaseBase.loadDatabase()

        saveRouteButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                AppDatabaseBase databaseHelper = new RoutesDatabaseHelper();
                boolean loadSuccess = databaseHelper.loadDatabase(RoutesDatabaseHelper.APPLICATION_DATABASE, RoutesDatabaseHelper.APPLICATION_DATABASE_PASSWORD, false);
                Logger.d("DB Load success " + loadSuccess);
            }
        });
    }
}
View Full Code Here

Examples of business.database.RoutesDatabaseHelper.loadDatabase()

        saveRouteButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                AppDatabaseBase databaseHelper = new RoutesDatabaseHelper();
                boolean loadSuccess = databaseHelper.loadDatabase(RoutesDatabaseHelper.APPLICATION_DATABASE, RoutesDatabaseHelper.APPLICATION_DATABASE_PASSWORD, false);
                Logger.d("DB Load success " + loadSuccess);
            }
        });
    }
}
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                   
                    Assert.assertEquals(firstZxid, f.fzk.getLastProcessedZxid());
                   
                    // Make sure the data was recorded in the filesystem ok
                    ZKDatabase zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    long lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data1", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(firstZxid, lastZxid);

                    // Propose an update
                    long proposalZxid = ZxidUtils.makeZxid(1, 1000);
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                    watcher.waitForChange();
                    Assert.assertEquals("data2", new String(f.fzk.getZKDatabase().getData("/foo", stat, null)));
                   
                    // check and make sure the change is persisted
                    zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data2", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(proposalZxid, lastZxid);
                } finally {
                    recursiveDelete(tmpDir);
                }
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                   
                    Assert.assertEquals(createSessionZxid, f.fzk.getLastProcessedZxid());
                   
                    // Make sure the data was recorded in the filesystem ok
                    ZKDatabase zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    zkDb2.loadDataBase();
                    LOG.info("zkdb2 sessions:" + zkDb2.getSessions());
                    Assert.assertNotNull(zkDb2.getSessionWithTimeOuts().get(4L));
                } finally {
                    recursiveDelete(tmpDir);
                }
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                   
                    Assert.assertEquals(firstZxid, f.fzk.getLastProcessedZxid());
                   
                    // Make sure the data was recorded in the filesystem ok
                    ZKDatabase zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    long lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data1", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(firstZxid, lastZxid);

                    // Propose an update
                    long proposalZxid = ZxidUtils.makeZxid(1, 1000);
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                    watcher.waitForChange();
                    Assert.assertEquals("data2", new String(f.fzk.getZKDatabase().getData("/foo", stat, null)));
                   
                    // check and make sure the change is persisted
                    zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data2", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(proposalZxid, lastZxid);
                } finally {
                    recursiveDelete(tmpDir);
                }
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                   
                    Assert.assertEquals(firstZxid, f.fzk.getLastProcessedZxid());
                   
                    // Make sure the data was recorded in the filesystem ok
                    ZKDatabase zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    long lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data1", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(firstZxid, lastZxid);

                    // Propose an update
                    long proposalZxid = ZxidUtils.makeZxid(1, 1000);
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                    watcher.waitForChange();
                    Assert.assertEquals("data2", new String(f.fzk.getZKDatabase().getData("/foo", stat, null)));
                   
                    // check and make sure the change is persisted
                    zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data2", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(proposalZxid, lastZxid);
                } finally {
                    recursiveDelete(tmpDir);
                }
View Full Code Here

Examples of org.apache.zookeeper.server.ZKDatabase.loadDataBase()

                   
                    Assert.assertEquals(firstZxid, f.fzk.getLastProcessedZxid());
                   
                    // Make sure the data was recorded in the filesystem ok
                    ZKDatabase zkDb2 = new ZKDatabase(new FileTxnSnapLog(logDir, snapDir));
                    long lastZxid = zkDb2.loadDataBase();
                    Assert.assertEquals("data1", new String(zkDb2.getData("/foo", stat, null)));
                    Assert.assertEquals(firstZxid, lastZxid);

                    // Propose an update
                    long proposalZxid = ZxidUtils.makeZxid(1, 1000);
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.