Package org.infinispan.manager

Examples of org.infinispan.manager.EmbeddedCacheManager.addListener()


               Cache<?, ?> cache = container.getCache(cacheName);
               cache.addListener(this);
               caches.add(cache);
            }
         }
         container.addListener(this);
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
      }
View Full Code Here


        
         if (entry == null)
         {
            entry = new LockManagerEntry(cache);
           
            container.addListener(this);
           
            this.lockManagers.put(clusterName, entry);
         }

         entry.addCache(cache.getName());
View Full Code Here


               CacheListener cl = new CacheListener();
               cache.addListener(cl);
               EmbeddedCacheManager cacheManager = cache.getCacheManager();
               cacheManager.addListener(cl);
               updateClusterTable(cacheManager.getMembers());

               lifespanSpinner.setValue(cache.getCacheConfiguration().expiration().lifespan());
               maxIdleSpinner.setValue(cache.getCacheConfiguration().expiration().maxIdle());
               cacheContentsSizeLabel.setText("Cache contains " + cache.size() + " entries");
View Full Code Here

   public void testViewChange() throws Exception {
      EmbeddedCacheManager cmA = TestCacheManagerFactory.createClusteredCacheManager();
      cmA.getCache();
      CountDownLatch barrier = new CountDownLatch(1);
      GetCacheManagerCheckListener listener = new GetCacheManagerCheckListener(barrier);
      cmA.addListener(listener);
      CacheContainer cmB = TestCacheManagerFactory.createClusteredCacheManager();
      cmB.getCache();
      try {
         barrier.await();
         assert listener.cacheContainer != null;
View Full Code Here


               CacheListener cl = new CacheListener();
               cache.addListener(cl);
               EmbeddedCacheManager cacheManager = cache.getCacheManager();
               cacheManager.addListener(cl);
               updateClusterTable(cacheManager.getMembers());

               lifespanSpinner.setValue(cache.getCacheConfiguration().expiration().lifespan());
               maxIdleSpinner.setValue(cache.getCacheConfiguration().expiration().maxIdle());
               cacheContentsSizeLabel.setText("Cache contains " + cache.size() + " entries");
View Full Code Here

        this.configureTransactions(defaultConfig);

        // create the cache manager
        EmbeddedCacheManager manager = new DefaultCacheManager(global, defaultConfig, false);
        manager.addListener(this);
        // Add named configurations
        for (Map.Entry<String, Configuration> entry: this.configuration.getConfigurations().entrySet()) {
            Configuration overrides = entry.getValue();
            Configuration configuration = defaults.getDefaultConfiguration(overrides.getCacheMode()).clone();
            configuration.applyOverrides(overrides);
View Full Code Here

     
      if (this.sessionCache.getConfiguration().getCacheMode().isDistributed())
      {
         EmbeddedCacheManager container = (EmbeddedCacheManager) this.sessionCache.getCacheManager();
        
         container.addListener(new ViewChangeListener(this.manager));
        
         String jvmRoute = this.manager.getJvmRoute();
        
         if (jvmRoute != null)
         {
View Full Code Here

        if (txSyncRegistry != null) {
            tx.transactionSynchronizationRegistryLookup(new TransactionSynchronizationRegistryProvider(txSyncRegistry));
        }

        EmbeddedCacheManager manager = new DefaultCacheManager(global, defaultConfig, false);
        manager.addListener(this);
        // Add named configurations
        for (Map.Entry<String, Configuration> entry: this.configuration.getConfigurations().entrySet()) {
            Configuration overrides = entry.getValue();
            Configuration configuration = defaults.getDefaultConfiguration(overrides.getCacheMode()).clone();
            configuration.applyOverrides(overrides);
View Full Code Here

     
      if (this.sessionCache.getConfiguration().getCacheMode().isDistributed())
      {
         EmbeddedCacheManager container = (EmbeddedCacheManager) this.sessionCache.getCacheManager();
        
         container.addListener(this);
        
         String jvmRoute = this.manager.getJvmRoute();
        
         if (jvmRoute != null)
         {
View Full Code Here

  
   private void start(CacheContainerRegistryEntry entry)
   {
      EmbeddedCacheManager container = entry.getContainer();
      container.start();
      container.addListener(entry);
     
      String jndiName = entry.getJndiName();
     
      if (jndiName != null)
      {
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.