@Override public ReplicationGranularity getGranularity() { return ((this.replicationConfig != null) && (this.replicationConfig.getReplicationGranularity() != null)) ? this.replicationConfig.getReplicationGranularity() : ReplicationGranularity.SESSION; }
@Override public ReplicationGranularity getGranularity() { return ((this.replicationConfig != null) && (this.replicationConfig.getReplicationGranularity() != null)) ? this.replicationConfig.getReplicationGranularity() : ReplicationGranularity.SESSION; }
@Override public ReplicationGranularity getGranularity() { return ((this.replicationConfig != null) && (this.replicationConfig.getReplicationGranularity() != null)) ? this.replicationConfig.getReplicationGranularity() : ReplicationGranularity.SESSION; }
@Override public <T extends OutgoingDistributableSessionData> org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager) { Cache<String, Map<Object, Object>> sessionCache = this.sessionCacheSource.getCache(manager); SharedLocalYieldingClusterLockManager lockManager = this.lockManagerSource.getLockManager(sessionCache); TransactionManager tm = sessionCache.getAdvancedCache().getTransactionManager(); if (!(tm instanceof BatchModeTransactionManager)) { throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null")); } BatchingManager batchingManager = new BatchingManagerImpl(tm); SessionAttributeMarshaller marshaller = this.marshallerFactory.createMarshaller(manager); SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), marshaller); return new DistributedCacheManager<T>(manager, new AtomicMapCache<String, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, this.invoker); }
setReplicationGranularity(replicationConfig_.getReplicationGranularity());
if (repCfg.getSnapshotInterval() == null) repCfg.setSnapshotInterval(new Integer(this.snapshotInterval)); if (repCfg.getReplicationGranularity() == null) repCfg.setReplicationGranularity(this.replicationGranularity); if (repCfg.getReplicationTrigger() == null)
@Override public <T extends OutgoingDistributableSessionData> org.jboss.as.clustering.web.DistributedCacheManager<T> getDistributedCacheManager(LocalDistributableSessionManager manager) throws ClusteringNotSupportedException { @SuppressWarnings("unchecked") Registry<String, Void> jvmRouteRegistry = this.registry.getValue(); @SuppressWarnings("unchecked") AdvancedCache<String, Map<Object, Object>> cache = this.cache.getValue().getAdvancedCache(); if (!cache.getCacheConfiguration().invocationBatching().enabled()) { ServiceName cacheServiceName = this.getCacheServiceName(manager.getReplicationConfig()); throw new ClusteringNotSupportedException(MESSAGES.failedToConfigureWebApp(cacheServiceName.getParent().getSimpleName(), cacheServiceName.getSimpleName())); } BatchingManager batchingManager = new TransactionBatchingManager(cache.getTransactionManager()); SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), this.marshallerFactory.createMarshaller(manager)); return new DistributedCacheManager<T>(manager, new AtomicMapCache<String, Object, Object>(cache), jvmRouteRegistry, this.lockManager.getOptionalValue(), storage, batchingManager, this.invoker, this.affinityFactory.getValue()); }