Examples of ReplicationConfig


Examples of org.jboss.metadata.web.jboss.ReplicationConfig

      PassivationConfig pcfg = new PassivationConfig();
      pcfg.setUseSessionPassivation(Boolean.valueOf(passivation));
      pcfg.setPassivationMaxIdleTime(new Integer(maxIdle));
      pcfg.setPassivationMinIdleTime(new Integer(minIdle));
      webMetaData.setPassivationConfig(pcfg);
      ReplicationConfig repCfg = new ReplicationConfig();
      repCfg.setReplicationGranularity(granularity);
      repCfg.setReplicationTrigger(trigger);
      repCfg.setReplicationFieldBatchMode(Boolean.valueOf(batchMode));
      repCfg.setMaxUnreplicatedInterval(Integer.valueOf(maxUnreplicated));
      webMetaData.setReplicationConfig(repCfg);
      return webMetaData;
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

      PassivationConfig pcfg = new PassivationConfig();
      pcfg.setUseSessionPassivation(passivation);
      pcfg.setPassivationMaxIdleTime(maxIdle);
      pcfg.setPassivationMinIdleTime(minIdle);
      webMetaData.setPassivationConfig(pcfg);
      ReplicationConfig repCfg = new ReplicationConfig();
      repCfg.setReplicationGranularity(ReplicationGranularity.SESSION);
      repCfg.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
      repCfg.setUseJK(useJK);
      webMetaData.setReplicationConfig(repCfg);
      return webMetaData;
   }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        Integer minIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMinIdleTime() : null;
        this.passivationMinIdleTime = (minIdleTime != null) && this.passivate ? minIdleTime.intValue() : -1;
        Integer maxIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMaxIdleTime() : null;
        this.passivationMaxIdleTime = (maxIdleTime != null) && this.passivate ? maxIdleTime.intValue() : -1;

        ReplicationConfig config = metaData.getReplicationConfig();
        this.replicationConfig = (config != null) ? config : new ReplicationConfig();

        if (this.replicationConfig.getReplicationGranularity() == ReplicationGranularity.FIELD) {
            this.replicationConfig.setReplicationGranularity(ReplicationGranularity.SESSION);
        }
View Full Code Here

Examples of org.jboss.metadata.web.jboss.ReplicationConfig

        Integer minIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMinIdleTime() : null;
        this.passivationMinIdleTime = (minIdleTime != null) && this.passivate ? minIdleTime.intValue() : -1;
        Integer maxIdleTime = (passivationConfig != null) ? passivationConfig.getPassivationMaxIdleTime() : null;
        this.passivationMaxIdleTime = (maxIdleTime != null) && this.passivate ? maxIdleTime.intValue() : -1;

        ReplicationConfig config = metaData.getReplicationConfig();
        this.replicationConfig = (config != null) ? config : new ReplicationConfig();

        if (this.replicationConfig.getReplicationGranularity() == ReplicationGranularity.FIELD) {
            throw new IllegalArgumentException("FIELD replication-granularity is no longer supported");
        }
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

        FSUtils.delTree(new File(conf0.getDbLogDir()));
        FSUtils.delTree(new File(conf1.getDbLogDir()));
        FSUtils.delTree(new File(conf2.getDbLogDir()));
       
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server0.test", conf0).getTempDir()));
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server1.test", conf1).getTempDir()));
        FSUtils.delTree(new File(
                new ReplicationConfig("config/replication_server2.test", conf2).getTempDir()));
    }
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

     * @throws Exception
     */
    @Before
    public void setUp() throws Exception {
       
        config = new ReplicationConfig("config/replication_server0.test", conf0);
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        // registers heartbeat operation at the handler
        Map<Integer, Operation> ops = new HashMap<Integer, Operation>();
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        config = new ReplicationConfig("config/replication_server0.test", conf0);
       
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        client = new RPCNIOSocketClient(config.getSSLOptions(), RQ_TIMEOUT, CON_TIMEOUT);
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

    private final String logDirFile = "logDir.file";
    private final String logTestString = "log";
           
    @Before
    public void setUpBefore() throws Exception {  
        conf = new ReplicationConfig("config/replication_server0.test", TestParameters.conf0);
        FSUtils.delTree(new File(conf.getBabuDBConfig().getBaseDir()));
        FSUtils.delTree(new File(conf.getBabuDBConfig().getDbLogDir()));
        FSUtils.delTree(new File(conf.getTempDir()));
        fileIO = new FileIO(conf);
    }
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

    /**
     * @throws java.lang.Exception
     */
    @Before
    public void setUp() throws Exception {
        config = new ReplicationConfig("config/replication_server0.test", conf0);
        dispatcher = new RequestDispatcher(config);
        dispatcher.setLifeCycleListener(this);
       
        Map<Integer, Operation> testOps = new HashMap<Integer, Operation>();
        testOps.put(operationId, operation);
View Full Code Here

Examples of org.xtreemfs.babudb.config.ReplicationConfig

    @Override
    public BabuDBInternal start(BabuDBInternal babuDB, String configPath)
            throws BabuDBException {
       
        // load the plugins configuration
        ReplicationConfig configuration;
        try {
            configuration = new ReplicationConfig(configPath, babuDB.getConfig());
        } catch (IOException ioe) {
            throw new BabuDBException(ErrorCode.REPLICATION_FAILURE,
                    "Replication configuration is broken.", ioe.getCause());
        }
       
        // replay the backup, if available
        try {
            new FileIO(configuration).replayBackupFiles();
        } catch (IOException io) {
            Logging.logMessage(Logging.LEVEL_ERROR, this, "Could not retrieve" +
                " the slave backup files, because: ", io.getMessage());
        }
       
        // initialize the replication services
        ReplicationManager replMan;
        try {
            replMan = new ReplicationManager(babuDB, configuration);          
        } catch (Exception e) {
            if (e.getMessage() == null) Logging.logError(Logging.LEVEL_ERROR, this, e);
            throw new BabuDBException(ErrorCode.REPLICATION_FAILURE,
                    e.getMessage(), e.getCause());
        }
       
        // initialize the BabuDB proxy interface
        return new BabuDBProxy(babuDB, replMan, configuration.getReplicationPolicy());
    }
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.