Package com.sleepycat.bind.serial

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


        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

      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

      /* 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

        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

      /* 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

      /* 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

    throws DatabaseException {
        int count = 0;

        // open the source env history DB, copying entries to target env
        EnhancedEnvironment sourceEnv = setupCopyEnvironment(sourceDir, true);
        StoredClassCatalog sourceClassCatalog = sourceEnv.getClassCatalog();
        DatabaseConfig historyDbConfig = HISTORY_DB_CONFIG.toDatabaseConfig();
        historyDbConfig.setReadOnly(true);
        Database sourceHistoryDB = sourceEnv.openDatabase(
                null, URI_HISTORY_DBNAME, historyDbConfig);
        StoredSortedMap<String,Map> sourceHistoryMap = new StoredSortedMap<String,Map>(sourceHistoryDB,
View Full Code Here

    public static int populatePersistEnv(String sourcePath, File envFile)
        throws IOException {
        int count = 0;
        StoredSortedMap<String,Map> historyMap = null;
        EnhancedEnvironment targetEnv = null;
        StoredClassCatalog classCatalog = null;
        Database historyDB = null;

        if (envFile != null) {
            // set up target environment
            FileUtils.ensureWriteableDirectory(envFile);
View Full Code Here

        if (isRunning()) {
            return;
        }
        StoredSortedMap<String, Map> historyMap;
        try {
            StoredClassCatalog classCatalog = bdb.getClassCatalog();
            historyDb = bdb.openDatabase(getHistoryDbName(), historyDbConfig(), true);
            historyMap = new StoredSortedMap<String, Map>(
                        historyDb,
                        new StringBinding(),
                        new SerialBinding<Map>(classCatalog, Map.class),
View Full Code Here

TOP

Related Classes of com.sleepycat.bind.serial.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.