Examples of openDatabase()


Examples of com.sleepycat.je.Environment.openDatabase()

        Transaction txn = exampleEnv.beginTransaction(null, null);
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setTransactional(true);
        dbConfig.setAllowCreate(true);
        dbConfig.setSortedDuplicates(true);
        Database exampleDb = exampleEnv.openDatabase(txn,
                                                     "simpleDb",
                                                     dbConfig);
        txn.commit();

        /*
 
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

        Transaction txn = exampleEnv.beginTransaction(null, null);
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setTransactional(true);
        dbConfig.setAllowCreate(true);
        dbConfig.setSortedDuplicates(true);
        Database exampleDb = exampleEnv.openDatabase(txn,
                                                     "bindingsDb",
                                                     dbConfig);


        /*
 
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

         * descriptions redundantly in each record.
         */
        DatabaseConfig catalogConfig = new DatabaseConfig();
        catalogConfig.setTransactional(true);
        catalogConfig.setAllowCreate(true);
        Database catalogDb = exampleEnv.openDatabase(txn,
                                                     "catalogDb",
                                                     catalogConfig);
        StoredClassCatalog catalog = new StoredClassCatalog(catalogDb);

        /*
 
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

        Environment env = new Environment(envHomeDirectory, envConfig);

        /* Create the database object. */
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setAllowCreate(true);
        Database db = env.openDatabase(null, DB_NAME, dbConfig);

        /* Create the sequence oject. */
        SequenceConfig config = new SequenceConfig();
        config.setAllowCreate(true);
        DatabaseEntry key =
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

        Transaction txn = exampleEnv.beginTransaction(null, null);
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setTransactional(true);
        dbConfig.setAllowCreate(true);
        Database exampleDb =
      exampleEnv.openDatabase(txn, "bindingsDb", dbConfig);

        /*
         * In our example, the database record is composed of an integer key
         * and and instance of the MyData class as data.
         *        
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

         */
        DatabaseConfig catalogConfig = new DatabaseConfig();
        catalogConfig.setTransactional(true);
        catalogConfig.setAllowCreate(true);
        Database catalogDb =
      exampleEnv.openDatabase(txn, "catalogDb", catalogConfig);
        StoredClassCatalog catalog = new StoredClassCatalog(catalogDb);
       
        /*
         * Create a tuple binding for Integer key objects.  Tuples,
         * unlike serialized Java objects, have a well defined sort
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

    this.file.mkdirs();
    this.pool = this.poolFactory.createPool(this);
    Environment env = this.pool.take();
    try
    {
      env.openDatabase(null, STATE, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOCATION, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOKER, new DatabaseConfig().setAllowCreate(true)).close();
    }
    finally
    {
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

    this.pool = this.poolFactory.createPool(this);
    Environment env = this.pool.take();
    try
    {
      env.openDatabase(null, STATE, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOCATION, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOKER, new DatabaseConfig().setAllowCreate(true)).close();
    }
    finally
    {
      this.pool.release(env);
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

    Environment env = this.pool.take();
    try
    {
      env.openDatabase(null, STATE, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOCATION, new DatabaseConfig().setAllowCreate(true)).close();
      env.openDatabase(null, INVOKER, new DatabaseConfig().setAllowCreate(true)).close();
    }
    finally
    {
      this.pool.release(env);
    }
View Full Code Here

Examples of com.sleepycat.je.Environment.openDatabase()

                break;
            case DBSTATS:
                DatabaseConfig dbConfig = new DatabaseConfig();
                dbConfig.setReadOnly(true);
                DbInternal.setUseExistingConfig(dbConfig, true);
                Database db = env.openDatabase(null, dbName, dbConfig);
                try {
                    System.out.println(db.getStats(new StatsConfig()));
                } finally {
                    db.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.