Examples of EnvironmentConfig


Examples of com.sleepycat.je.EnvironmentConfig

        throws Exception {

        DbSpace space = new DbSpace();
        space.parseArgs(argv);

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setReadOnly(true);
        Environment env = new Environment(space.envHome, envConfig);
        space.initEnv(DbInternal.getEnvironmentImpl(env));

        try {
            space.print(System.out);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

    void openEnv()
        throws Exception {

        if (env == null) {
            EnvironmentConfig envConfig = new EnvironmentConfig();
            envConfig.setReadOnly(openReadOnly);
            env = new Environment(envHome, envConfig);
        }
    }
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

      transactional = cache.getTransactionManager() != null;

      try
      {
         /* Open the environment, creating it if it doesn't exist. */
         EnvironmentConfig envConfig = new EnvironmentConfig();
         envConfig.setAllowCreate(true);
         envConfig.setTransactional(true);
         envConfig.setLockTimeout(1000 * cache.getConfiguration().getLockAcquisitionTimeout()); // these are in nanos
         if (log.isTraceEnabled()) log.trace("Creating JE environment with home dir " + homeDir);
         env = new Environment(homeDir, envConfig);
         if (log.isDebugEnabled()) log.debug("Created JE environment " + env + " for cache loader " + this);
         /* Open cache and catalog databases. */
         openDatabases();
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

        /* Create a single replicator */
        Durability durability = new Durability(SyncPolicy.NO_SYNC,
                                               SyncPolicy.NO_SYNC,
                                               ReplicaAckPolicy.NONE);

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setAllowCreate(false);
        envConfig.setTransactional(true);
        envConfig.setDurability(durability);

        ReplicationConfig repConfig = new ReplicationConfig();
        repConfig.setConfigParam
            (ReplicationConfig.ENV_CONSISTENCY_TIMEOUT, "1 min");
        repConfig.setGroupName(groupName);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

        if (helpers != null) {
            repConfig.setHelperHosts(helpers);
        }

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(createEnv);
        ReplicatedEnvironment repEnv =
            new ReplicatedEnvironment(envHome, repConfig, envConfig);
        RepNode repNode = RepInternal.getRepImpl(repEnv).getRepNode();

        System.err.println("Handle created:" + repEnv +
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

     *
     * @return the group as currently defined by the environment
     */
    public static RepGroupImpl getGroup(final File envDir) {

        EnvironmentConfig envConfig = new EnvironmentConfig();
        envConfig.setReadOnly(true);
        envConfig.setTransactional(true);
        envConfig.setAllowCreate(false);
        Environment env = new Environment(envDir, envConfig);
        DatabaseConfig dbConfig = new DatabaseConfig();
        dbConfig.setReadOnly(true);
        dbConfig.setTransactional(true);
        dbConfig.setAllowCreate(false);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

        } catch (IllegalArgumentException e) {
            e.printStackTrace();
            printUsage("Host and Port pair for this node is illegal.");
        }

        envConfig = new EnvironmentConfig();
        envConfig.setAllowCreate(true);
        envConfig.setTransactional(true);

        repConfig = new ReplicationConfig();
        repConfig.setNodeName(nodeName);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

    }

    private CurrentTransaction(Environment env) {
        envRef = new WeakReference<Environment>(env);
        try {
            EnvironmentConfig config = env.getConfig();
            txnMode = config.getTransactional();
            lockingMode = DbCompat.getInitializeLocking(config);
            if (txnMode || lockingMode) {
                writeLockMode = LockMode.RMW;
            } else {
                writeLockMode = LockMode.DEFAULT;
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

    public StoredClassCatalog(Database database)
        throws DatabaseException, IllegalArgumentException {

        db = database;
        DatabaseConfig dbConfig = db.getConfig();
        EnvironmentConfig envConfig = db.getEnvironment().getConfig();

        writeLockMode = (DbCompat.getInitializeLocking(envConfig) ||
                         envConfig.getTransactional()) ? LockMode.RMW
                                                       : LockMode.DEFAULT;
        cdbMode = DbCompat.getInitializeCDB(envConfig);
        txnMode = dbConfig.getTransactional();

        if (!DbCompat.isTypeBtree(dbConfig)) {
View Full Code Here

Examples of com.sleepycat.je.EnvironmentConfig

                ("Environment home cannot be null");
        }
        this.environmentHome = environmentHome;
        this.canConfigure = canConfigure;
        if (canConfigure) {
            openConfig = new EnvironmentConfig();
        }
    }
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.