Package org.infinispan.manager

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



               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

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

               context.reset();
            }
           
            debug("Started lock manager for \"%s\" container", containerName);
           
            container.addListener(entry);
           
            lockManagers.put(containerName, entry);
         }
        
         String cacheName = cache.getName();
View Full Code Here

                    context.reset();
                }

                debug("Started lock manager for \"%s\" container", containerName);

                container.addListener(entry);

                lockManagers.put(containerName, entry);
            }

            String cacheName = cache.getName();
View Full Code Here

        this.sessionCache.addListener(this);

        if (this.jvmRouteHandler != null) {
            EmbeddedCacheManager container = this.sessionCache.getCacheManager();

            container.addListener(this.jvmRouteHandler);

            String jvmRoute = this.manager.getJvmRoute();

            if (jvmRoute != null) {
                this.jvmRouteHandler.getCache().putIfAbsent(container.getAddress(), jvmRoute);
View Full Code Here

        this.sessionCache.addListener(this);

        if (this.jvmRouteHandler != null) {
            EmbeddedCacheManager container = this.sessionCache.getCacheManager();

            container.addListener(this.jvmRouteHandler);

            String jvmRoute = this.manager.getJvmRoute();

            if (jvmRoute != null) {
                this.jvmRouteHandler.getCache().putIfAbsent(container.getAddress(), jvmRoute);
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

        this.sessionCache.addListener(this);

        if (this.jvmRouteHandler != null) {
            EmbeddedCacheManager container = this.sessionCache.getCacheManager();

            container.addListener(this.jvmRouteHandler);

            String jvmRoute = this.manager.getJvmRoute();

            if (jvmRoute != null) {
                this.jvmRouteHandler.getCache().putIfAbsent(container.getAddress(), jvmRoute);
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.