Package com.sleepycat.db

Examples of com.sleepycat.db.Environment


  config.setMessageHandler(new LoggingMessageHandler());
  config.setRunRecovery(true);
  config.setTransactional(true);
  config.setTxnWriteNoSync(!flushToDisk);
  try {
      env = new Environment(new File(directory), config);
  } catch (FileNotFoundException e) {
      throw new DbDatabaseException(
    "DataStore directory does not exist: " + directory);
  } catch (DatabaseException e) {
      throw convertException(e, false);
View Full Code Here


        envConfig.setAllowCreate(true);
        envConfig.setThreaded(true);
        dbConfig.setAllowCreate(true);
        dbConfig.setType(DatabaseType.BTREE);

        env = new Environment(dbHome, envConfig);

        Transaction txn = null;

        try {
            txn = env.beginTransaction(null, null);
View Full Code Here

        envConfig.setAllowCreate(true);
        envConfig.setThreaded(true);
        dbConfig.setAllowCreate(true);
        dbConfig.setType(DatabaseType.BTREE);

        env = new Environment(dbHome, envConfig);

        Transaction txn = null;

        try {
            txn = env.beginTransaction(null, null);
View Full Code Here

        envConfig.setAllowCreate(true);
        envConfig.setThreaded(true);
        dbConfig.setAllowCreate(true);
        dbConfig.setType(DatabaseType.BTREE);

        env = new Environment(dbHome, envConfig);

        Transaction txn = null;

        try {
            txn = env.beginTransaction(null, null);
View Full Code Here

    private void open()
        throws IOException, DatabaseException {

        EnvironmentConfig envConfig = TestEnv.BDB.getConfig();
        envConfig.setAllowCreate(true);
        env = new Environment(envHome, envConfig);

        openCatalog();
    }
View Full Code Here

        try {
            EnvironmentConfig envConfig = new EnvironmentConfig();
            StoreConfig storeConfig = new StoreConfig();

            // Open the environment and entity store
            envmnt = new Environment(envHome, envConfig);
            store = new EntityStore(envmnt, "EntityStore", storeConfig);
        } catch (FileNotFoundException fnfe) {
            System.err.println("setup(): " + fnfe.toString());
            System.exit(-1);
        }
View Full Code Here

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(true);
        envConfig.setInitializeCache(true);
        envConfig.setInitializeLocking(true);
        env = new Environment(new File(homeDirectory), envConfig);

        // Set the Berkeley DB config for opening all stores.
        //
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setTransactional(true);
View Full Code Here

        envConfig.setAllowCreate(true);
        storeConfig.setAllowCreate(true);

        try {
            // Open the environment and entity store
            envmnt = new Environment(envHome, envConfig);
            store = new EntityStore(envmnt, "EntityStore", storeConfig);
        } catch (FileNotFoundException fnfe) {
            System.err.println("setup(): " + fnfe.toString());
            System.exit(-1);
        }
View Full Code Here

    void openEnv()
        throws IOException, DatabaseException {

        EnvironmentConfig config = TestEnv.TXN.getConfig();
        config.setAllowCreate(true);
        env = new Environment(envHome, config);
    }
View Full Code Here

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(true);
        envConfig.setInitializeCache(true);
        envConfig.setInitializeLocking(true);
        env = new Environment(new File(homeDirectory), envConfig);

        // Set the Berkeley DB config for opening all stores.
        //
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setTransactional(true);
View Full Code Here

TOP

Related Classes of com.sleepycat.db.Environment

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.