Package com.sleepycat.bdb

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


        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

    }

    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

    }

    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

        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

        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

        int dbFlags = Db.DB_AUTO_COMMIT;
        if (create)
            dbFlags |= Db.DB_CREATE;

        // catalog is needed for serial data format (java serialization)
        catalog = new StoredClassCatalog(env, "catalog.db", null, dbFlags);

        // use Integer tuple format and binding for keys
        TupleFormat keyFormat = new TupleFormat();
        TupleBinding keyBinding =
            TupleBinding.getPrimitiveBinding(Integer.class, keyFormat);
View Full Code Here

        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, PartKey.class);
View Full Code Here

        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.  Note that
        // entity (combined key/value) classes are used for the value
        // formats--for details see the bindings in the SampleViews class.
View Full Code Here

        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, PartKey.class);
View Full Code Here

TOP

Related Classes of com.sleepycat.bdb.StoredClassCatalog

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.