Package org.jboss.metadata.web.jboss

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


   }
  
   @Override
   public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
   {
      ReplicationConfig config = manager.getReplicationConfig();
      String containerName = config.getCacheName();
      String templateCacheName = null;
     
      if ((containerName != null) && !containerName.isEmpty())
      {
         String[] parts = containerName.split(DELIMITER);
View Full Code Here


        return new DistributedCacheManager<T, SessionKeyImpl>(registry, manager, new AtomicMapCache<SessionKeyImpl, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, new SessionKeyFactoryImpl(manager), this.invoker);
    }

    @Override
    public Collection<ServiceName> getDependencies(JBossWebMetaData metaData) {
        ReplicationConfig config = metaData.getReplicationConfig();
        if (config == null) {
            config = new ReplicationConfig();
        }
        return Arrays.asList(this.sessionCacheServiceNameProvider.getServiceName(config), this.jvmRouteCacheServiceNameProvider.getServiceName(config));
    }
View Full Code Here

        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

*/
public class Util
{
   public static ReplicationGranularity getReplicationGranularity(LocalDistributableSessionManager localManager)
   {
      ReplicationConfig config = localManager.getReplicationConfig();
      return config.getReplicationGranularity();
  
View Full Code Here

      return config.getReplicationGranularity();
  
  
   public static String getCacheConfigName(LocalDistributableSessionManager localManager)
   {
      ReplicationConfig config = localManager.getReplicationConfig();
      return config.getCacheName();
   }
View Full Code Here

   }

   @Override
   public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
   {
      ReplicationConfig replConfig = manager.getReplicationConfig();
      String templateCacheName = replConfig.getCacheName();
     
      String containerName = null;
     
      if (templateCacheName != null)
      {
         String[] parts = templateCacheName.split(":");
        
         if (parts.length == 2)
         {
            containerName = parts[0];
            templateCacheName = parts[1];
         }
      }
     
      EmbeddedCacheManager container = this.registry.getCacheContainer(containerName);
     
      String hostName = manager.getHostName();
      String host = (hostName == null) || hostName.isEmpty() ? "localhost" : hostName;
     
      String context = manager.getContextName();
      String path = context.isEmpty() || context.equals("/") ? "ROOT" : context.startsWith("/") ? context.substring(1) : context;

      String cacheName = host + "/" + path;

      Cache<?, ?> templateCache = container.getCache();
      Configuration configuration = templateCache.getConfiguration().clone();
     
      Integer backups = replConfig.getBackups();
      ReplicationMode replMode = replConfig.getReplicationMode();
     
      CacheMode mode = configuration.getCacheMode();
     
      if (backups != null)
      {
View Full Code Here

    * @see org.jboss.web.tomcat.service.session.distributedcache.spi.DistributedCacheManager#start()
    */
   @Override
   public void start()
   {
      ReplicationConfig replConfig = this.manager.getReplicationConfig();
      String templateCacheName = replConfig.getCacheName();
     
      String containerName = null;
     
      if (templateCacheName != null)
      {
         String[] parts = templateCacheName.split(":");
        
         if (parts.length == 2)
         {
            containerName = parts[0];
            templateCacheName = parts[1];
         }
      }
     
      CacheContainer container = this.registry.getCacheContainer(containerName);
     
      String hostName = this.manager.getHostName();
      String host = (hostName == null) || hostName.isEmpty() ? "localhost" : hostName;
     
      String context = this.manager.getContextName();
      String path = context.isEmpty() || context.equals("/") ? "ROOT" : context.startsWith("/") ? context.substring(1) : context;

      String cacheName = host + "/" + path;

      Cache<?, ?> templateCache = container.getCache();
      Configuration configuration = templateCache.getConfiguration().clone();
     
      Integer backups = replConfig.getBackups();
      ReplicationMode replMode = replConfig.getReplicationMode();
     
      CacheMode mode = configuration.getCacheMode();
     
      if (backups != null)
      {
View Full Code Here

        return new DistributedCacheManager<T, SessionKeyImpl>(registry, manager, new AtomicMapCache<SessionKeyImpl, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, new SessionKeyFactoryImpl(manager), this.invoker);
    }

    @Override
    public Collection<ServiceName> getDependencies(JBossWebMetaData metaData) {
        ReplicationConfig config = metaData.getReplicationConfig();
        if (config == null) {
            config = new ReplicationConfig();
        }
        return Arrays.asList(this.sessionCacheServiceNameProvider.getServiceName(config), this.jvmRouteCacheServiceNameProvider.getServiceName(config));
    }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.jboss.ReplicationConfig

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.