Examples of StoredClassCatalog


Examples of com.sleepycat.bind.serial.StoredClassCatalog

        false);

    /*
     * Instantiate the class catalog
     */
    classCatalog = new StoredClassCatalog(catalogDB);

    /*
     * Create the binding
     */
    keyBinding = new SerialBinding(classCatalog, KClass);
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        // Create the Serial class catalog.  This holds the serialized class
        // format for all database records of serial format.
        //
        Database catalogDb = env.openDatabase(null, CLASS_CATALOG, null,
                                              dbConfig);
        javaCatalog = new StoredClassCatalog(catalogDb);

        // Open the Berkeley DB database for the part, supplier and shipment
        // stores.  The stores are opened with no duplicate keys allowed.
        //
        partDb = env.openDatabase(null, PART_STORE, null, dbConfig);
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        try {
            // Open the environment and databases
            openEnv();

            // Get our class catalog (used to serialize objects)
            StoredClassCatalog classCatalog =
                new StoredClassCatalog(myClassDb);

            // Start the threads
            DBWriter[] threadArray;
            threadArray = new DBWriter[NUMTHREADS];
            for (int i = 0; i < NUMTHREADS; i++) {
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        config.setReadOnly(true);
        db = DbCompat.testOpenDatabase(env, null, file, null, config);

        /* Expect exception when creating the catalog. */
        try {
            new StoredClassCatalog(db);
            fail();
        } catch (IllegalStateException e) { }
        db.close();
    }
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

    }

    private void createDatabase()
        throws Exception {

        catalog = new StoredClassCatalog(openDb("catalog.db"));
        factory = new TupleSerialFactory(catalog);
        assertSame(catalog, factory.getCatalog());

        store1 = openDb("store1.db");
        store2 = openDb("store2.db");
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        SharedTestUtils.printTestName(getName());
        env = testEnv.open(makeTestName(testEnv), false);
        runner = new TransactionRunner(env);

        catalog = new StoredClassCatalog(openDb(CATALOG_FILE, false));
        catalog2 = new StoredClassCatalog(openDb("catalog2.db", true));

        SerialBinding keyBinding = new SerialBinding(catalog,
                                                  String.class);
        SerialBinding valueBinding = new SerialBinding(catalog,
                                                    TestSerial.class);
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        SharedTestUtils.printTestName(getName());
        env = testEnv.open(StoredClassCatalogTest.makeTestName(testEnv));
        runner = new TransactionRunner(env);

        catalog = new StoredClassCatalog(openDb(CATALOG_FILE));

        SerialBinding keyBinding = new SerialBinding(catalog, String.class);
        SerialBinding valueBinding =
      new SerialBinding(catalog, TestSerial.class);
        store = openDb(STORE_FILE);
View Full Code Here

Examples of com.sleepycat.bind.serial.StoredClassCatalog

        log.debug("opened je environment at {0}", envLocation);
        return env;
    }

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

Examples of com.sleepycat.bind.serial.StoredClassCatalog

      dbConfig.setTransactional(true);
      dbConfig.setAllowCreate(true);

      Database catalogDb = env.openDatabase(null, CLASS_CATALOG, dbConfig);

      javaCatalog = new StoredClassCatalog(catalogDb);

      EntryBinding storedEntryKeyBinding =
            new SerialBinding(javaCatalog, Object.class);
      EntryBinding storedEntryValueBinding =
            new InternalCacheEntryBinding(new TestObjectStreamMarshaller());
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();
   }
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.