Package com.sleepycat.bind.serial

Examples of com.sleepycat.bind.serial.StoredClassCatalog


        if (isRunning()) {
            return;
        }
        StoredSortedMap<String,Map> historyMap;
        try {
            StoredClassCatalog classCatalog = bdb.getClassCatalog();
            BdbModule.BdbConfig dbConfig = HISTORY_DB_CONFIG;

            historyDb = bdb.openDatabase(getHistoryDbName(), dbConfig, true);
            historyMap =
                new StoredSortedMap<String,Map>(
View Full Code Here


    private transient Database cookieDb;
    private transient StoredSortedMap<byte[],Cookie> cookies;

    public void prepare() {
        try {
            StoredClassCatalog classCatalog = bdb.getClassCatalog();
            BdbModule.BdbConfig dbConfig = new BdbModule.BdbConfig();
            dbConfig.setTransactional(false);
            dbConfig.setAllowCreate(true);
            dbConfig.setSortedDuplicates(false);
            cookieDb = bdb.openDatabase(COOKIEDB_NAME, dbConfig,
View Full Code Here

            DatabaseConfig dbConfig = new DatabaseConfig();
            dbConfig.setAllowCreate(true);
            dbConfig.setReadOnly(this.getConfig().getReadOnly());
            try {
                classCatalogDB = openDatabase(null, "classCatalog", dbConfig);
                classCatalog = new StoredClassCatalog(classCatalogDB);
            } catch (DatabaseException e) {
                // TODO Auto-generated catch block
                throw new RuntimeException(e);
            }
        }
View Full Code Here

            return;
        }
        store = null;
        String dbName = PersistProcessor.URI_HISTORY_DBNAME;
        try {
            StoredClassCatalog classCatalog = bdb.getClassCatalog();
            BdbModule.BdbConfig dbConfig = PersistProcessor.HISTORY_DB_CONFIG;

            historyDb = bdb.openDatabase(dbName, dbConfig, true);
            SerialBinding sb = new SerialBinding(classCatalog, Map.class);
            StoredSortedMap historyMap = new StoredSortedMap(historyDb, new StringBinding(), sb, true);
View Full Code Here

        File env = new File(args[1]);
        FileUtils.ensureWriteableDirectory(env);
       
        // setup target environment
        EnhancedEnvironment targetEnv = PersistProcessor.setupCopyEnvironment(env);
        StoredClassCatalog classCatalog = targetEnv.getClassCatalog();
        Database historyDB = targetEnv.openDatabase(
                null,
                PersistProcessor.URI_HISTORY_DBNAME,
                PersistProcessor.HISTORY_DB_CONFIG.toDatabaseConfig());
        @SuppressWarnings({ "rawtypes", "unchecked" })
View Full Code Here

      entryCacheDB = entryCacheEnv.openDatabase(null,
              ENTRYCACHEDBNAME, entryCacheDBConfig);
      entryCacheClassDB =
        entryCacheEnv.openDatabase(null, INDEXCLASSDBNAME, entryCacheDBConfig);
      // Instantiate the class catalog
      classCatalog = new StoredClassCatalog(entryCacheClassDB);
      //This line causes an unchecked call error if the SuppressWarnings
      //annotation is removed at the beginning of this method.
      entryCacheDataBinding =
          new SerialBinding(classCatalog,
          FileSystemEntryCacheIndex.class);
View Full Code Here

          entryCacheDB = entryCacheEnv.openDatabase(null, ENTRYCACHEDBNAME,
            entryCacheDBConfig);
          entryCacheClassDB = entryCacheEnv.openDatabase(null,
            INDEXCLASSDBNAME, entryCacheDBConfig);
          // Instantiate the class catalog
          classCatalog = new StoredClassCatalog(entryCacheClassDB);
          //This line causes an unchecked call error if the SuppressWarnings
          //annotation is removed at the beginning of this method.
          entryCacheDataBinding = new SerialBinding(classCatalog,
            FileSystemEntryCacheIndex.class);
        }
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

        // Now open, or create and open, our databases
        // Open the vendors and inventory databases
        simpleDB = env.openDatabase(null, "SimpleDB", dbConfig);
       
        catalog = new StoredClassCatalog(simpleDB);
        SerialBinding<String> keyBinding =
          new SerialBinding<String>(catalog, String.class);

        SerialBinding<String> valBinding =
            new SerialBinding<String>(catalog, String.class);
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

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.