Examples of StoredClassCatalog


Examples of com.sleepycat.bdb.StoredClassCatalog

        if (DbTestUtil.copyResource(getClass(), CATALOG_FILE, dir) &&
            DbTestUtil.copyResource(getClass(), STORE_FILE, dir)) {
            dataExists = true;
        }
        catalog = new StoredClassCatalog(env, CATALOG_FILE,
                                         null, openFlags);
        catalog2 = new StoredClassCatalog(env, "new_catalog.db", null,
                                          openFlags);

        SerialFormat keyFormat = new SerialFormat(catalog,
                                                  String.class);
        SerialFormat valueFormat = new SerialFormat(catalog,
View Full Code Here

Examples of com.sleepycat.bdb.StoredClassCatalog

        int openFlags = Db.DB_CREATE;
        if (testEnv.isTxnMode())
            openFlags |= Db.DB_AUTO_COMMIT;

        catalog = new StoredClassCatalog(env, "catalog.db", null, openFlags);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        int type = isSorted ? Db.DB_BTREE : Db.DB_HASH;
        Db db;
View Full Code Here

Examples of com.sleepycat.bdb.StoredClassCatalog

    }

    private void createDatabase()
        throws Exception {

        catalog = new StoredClassCatalog(env, "catalog.db", null,
                                         Db.DB_CREATE | Db.DB_AUTO_COMMIT);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        store = factory.newDataStore(openDb("store.db", false),
View Full Code Here

Examples of com.sleepycat.bdb.StoredClassCatalog

    }

    private void createDatabase()
        throws Exception {

        catalog = new StoredClassCatalog(env, "catalog.db", null, openFlags);
        factory = new TupleSerialDbFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        store1 = factory.newDataStore(openDb("store1.db"),
                                        MarshalledObject.class, null);
View Full Code Here

Examples of com.sleepycat.bdb.StoredClassCatalog

        int flags = Db.DB_CREATE | Db.DB_AUTO_COMMIT;

        // Create the Serial class catalog.  This holds the serialized class
        // format for all database records of format SerialFormat.
        //
        javaCatalog = new StoredClassCatalog(env, CLASS_CATALOG, null, flags);

        // Create the data formats.  In this example, all formats are
        // SerialFormat.
        //
        partKeyFormat = new SerialFormat(javaCatalog,
View Full Code Here

Examples of com.sleepycat.bdb.StoredClassCatalog

        int flags = Db.DB_CREATE | Db.DB_AUTO_COMMIT;

        // Create the Serial class catalog.  This holds the serialized class
        // format for all database records of format SerialFormat.
        //
        javaCatalog = new StoredClassCatalog(env, CLASS_CATALOG, null, flags);

        // Create the data formats.  In this example, all key formats are
        // TupleFormat and all value formats are SerialFormat.
        //
        partKeyFormat = new TupleFormat();
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

      /* Create/open the cache database and associated catalog database. */
      cacheDb = env.openDatabase(null, cacheDbName, dbConfig);
      catalogDb = env.openDatabase(null, catalogDbName, dbConfig);

      /* Use the catalog for the serial binding. */
      catalog = new StoredClassCatalog(catalogDb);
      serialBinding = new SerialBinding(catalog, null);

      /* Start with a fresh transaction map. */
      txnMap = new ConcurrentHashMap<Object, Transaction>();
   }
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        log.debugf("opened je environment at %s", envLocation);
        return env;
    }

    public StoredClassCatalog createStoredClassCatalog(Database catalogDb) throws DatabaseException {
        StoredClassCatalog catalog = new StoredClassCatalog(catalogDb);
        log.debugf("created stored class catalog from database %s", config.getCatalogDbName());
        return catalog;
    }
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

      env = new Environment(dataDir, envConfig);
    }
    DatabaseConfig dbConfig = new DatabaseConfig();
    dbConfig.setAllowCreate(true);
    dbConfig.setTransactional(true);
    classCatalog = new StoredClassCatalog(env.openDatabase(null,
        DATABASE_CLASS_NAME, dbConfig));
    keyBinding = new SerialBinding<IMetaData[]>(classCatalog, IMetaData[].class);
    dataBinding = new SerialBinding<ICache>(classCatalog, ICache.class);
    dbMain = env.openDatabase(null, DATABASE_MAIN_NAME, dbConfig);
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        this.environment = new Environment(this.dbHome.getFile(), envConfig);
        this.ticketDb = this.environment.openDatabase(null, "ticketDb",
            dbConfig);
        this.catalogDb = this.environment.openDatabase(null, "catalogDb",
            dbConfig);
        StoredClassCatalog catalog = new StoredClassCatalog(this.catalogDb);
        this.ticketBinding = new SerialBinding(catalog, Ticket.class);
    }
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.