@Override public boolean isReplicationEnabled() { return replicationProperties.isReplicationEnabled(); }
public RecoveryManager(INCServiceContext serviceCtx, ITransactionSubsystem txnSubsystem) { this.serviceCtx = serviceCtx; this.txnSubsystem = txnSubsystem; this.appCtx = txnSubsystem.getApplicationContext(); logMgr = (LogManager) txnSubsystem.getLogManager(); ReplicationProperties repProperties = appCtx.getReplicationProperties(); replicationEnabled = repProperties.isReplicationEnabled(); localResourceRepository = (PersistentLocalResourceRepository) appCtx.getLocalResourceRepository(); cachedEntityCommitsPerJobSize = txnSubsystem.getTransactionProperties().getJobRecoveryMemorySize(); checkpointManager = txnSubsystem.getCheckpointManager(); }
ReplicationProperties repProp = new ReplicationProperties(PropertiesAccessor.getInstance(ccServiceCtx.getAppConfig())); INcLifecycleCoordinator lifecycleCoordinator = createNcLifeCycleCoordinator(repProp.isReplicationEnabled()); ExternalLibraryUtils.setUpExternaLibraries(libraryManager, false); componentProvider = new StorageComponentProvider();
public TransactionSubsystem(INcApplicationContext appCtx, IRecoveryManagerFactory recoveryManagerFactory) { this.appCtx = appCtx; this.id = appCtx.getServiceContext().getNodeId(); this.txnProperties = appCtx.getTransactionProperties(); this.transactionManager = new TransactionManager(this); this.lockManager = new ConcurrentLockManager(txnProperties.getLockManagerShrinkTimer()); final ReplicationProperties repProperties = appCtx.getReplicationProperties(); final boolean replicationEnabled = repProperties.isReplicationEnabled(); final CheckpointProperties checkpointProperties = new CheckpointProperties(txnProperties, id); if (LOGGER.isInfoEnabled()) { LOGGER.log(Level.INFO, "Checkpoint Properties: " + checkpointProperties); } checkpointManager = CheckpointManagerFactory.create(this, checkpointProperties); final Checkpoint latestCheckpoint = checkpointManager.getLatest(); if (latestCheckpoint != null) { transactionManager.ensureMaxTxnId(latestCheckpoint.getMaxTxnId()); } this.logManager = replicationEnabled ? new LogManagerWithReplication(this) : new LogManager(this); this.recoveryManager = recoveryManagerFactory.createRecoveryManager(appCtx.getServiceContext(), this); if (txnProperties.isCommitProfilerEnabled()) { ecp = new EntityCommitProfiler(this, this.txnProperties.getCommitProfilerReportInterval()); ((ExecutorService) appCtx.getThreadExecutor()).submit(ecp); } }
this.ncServiceContext); if (replicationProperties.isReplicationEnabled()) { replicationManager = new ReplicationManager(this, replicationProperties);