Package org.jboss.cache

Examples of org.jboss.cache.TreeCache.createService()


   {
      TreeCache cache = new TreeCache();
      cache.setCacheMode(TreeCache.LOCAL);
      cache.setCacheLoaderConfiguration(getCacheLoaderConfig("location="+getTempDir()));
      cache.setUseInterceptorMbeans(true);
      cache.createService();
      cache.startService();
      return cache;
   }
  
   private ActivationInterceptor getActivationInterceptor(TreeCache cache)
View Full Code Here


   {
      TreeCache cache = new TreeCache();
      cache.setCacheMode(TreeCache.LOCAL);
      cache.setCacheLoaderConfiguration(getCacheLoaderConfig("location="+getTempDir()));
      cache.setUseInterceptorMbeans(true);
      cache.createService();
      cache.startService();
      return cache;
   }
  
   private CacheLoaderInterceptor getCacheLoaderInterceptor(TreeCache cache)
View Full Code Here

      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, "META-INF/replSync-service.xml"); // read in generic replAsync xml
      tree.setClusterName(name);
      // Use marshaller
      tree.setUseRegionBasedMarshalling(true);
      tree.createService();
      tree.startService();
      return tree;
   }

   public void tearDown() throws Exception {
View Full Code Here

      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(cache, "META-INF/invalidationSync-service.xml");
      cache.setCacheMode(TreeCache.INVALIDATION_SYNC);
      cache.setUseInterceptorMbeans(true);
      cache.setClusterName(clusterName);
      cache.createService();
      cache.startService();
      return cache;
   }
  
   private InvalidationInterceptor getInvalidationInterceptor(TreeCache cache)
View Full Code Here

      config.configure(cache, "META-INF/replSync-service.xml");
      cache.setUseRegionBasedMarshalling(false);
      cache.setCacheMode(TreeCache.REPL_SYNC);
      cache.setUseInterceptorMbeans(true);
      cache.setClusterName(clusterName);
      cache.createService();
      cache.startService();
      return cache;
   }
  
   private TxInterceptor getTxInterceptor(TreeCache cache)
View Full Code Here

      if (optimistic)
      {
          cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
          cache.setNodeLockingScheme("OPTIMISTIC");
      }
      cache.createService();
      // start the cache after the listener has been registered
      //cache.startService();
      return cache;
   }
View Full Code Here

    private TreeCache createLocalCache() throws Exception
    {
        TreeCache cache = createCacheUnstarted(false);
        cache.setCacheLoaderConfiguration(getCacheLoaderConfig(getTempDir()));

        cache.createService();
        cache.startService();
        return cache;
    }

    public void testPassivationLocal() throws Exception
View Full Code Here

    protected TreeCache createCacheWithListener(TreeCacheListener listener) throws Exception
    {
        TreeCache cache = createCacheUnstarted();
        cache.addTreeCacheListener(listener);
        cache.createService();
        cache.startService();
        return cache;
    }

    /**
 
View Full Code Here

    protected TreeCache createCacheWithLoader(boolean passivationEnabled) throws Exception
    {
        TreeCache cache = createCacheUnstarted();
        cache.setCacheLoaderConfiguration(getCacheLoaderConfig(true, getTempDir(), passivationEnabled));
        cache.createService();
        cache.startService();
        return cache;
    }

View Full Code Here


    protected TreeCache createCache() throws Exception
    {
        TreeCache cache = createCacheUnstarted();
        cache.createService();
        cache.startService();
        return cache;
    }

    protected void destroyCache(TreeCache c)
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.