Examples of TreeCache


Examples of org.jboss.cache.TreeCache

      cache.stop();
   }

   protected void setUp() throws Exception
   {
      cache = new TreeCache();
      cache.setNodeLockingScheme("OPTIMISTIC");
      cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      cache.startService();
      tm = cache.getTransactionManager();
   }
View Full Code Here

Examples of org.jboss.cache.TreeCache

    protected void setUp() throws Exception
    {
        // force a tear down if the test runner didn't run one before (happens in IDEA)
        if (cache1 != null || cache2 != null) tearDown();

        cache1 = new TreeCache("test", null, 1000);
        cache1.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
        cache1.setNodeLockingScheme( nodeLockingScheme );
        cache1.setCacheMode( cacheMode );
        cache1.startService();

        cache2 = new TreeCache("test", null, 1000);
        cache2.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
        cache2.setNodeLockingScheme(nodeLockingScheme);
        cache2.setCacheMode(cacheMode);
        cache2.startService();
View Full Code Here

Examples of org.jboss.cache.TreeCache

   protected TreeCacheMBean createCache(String cacheID) throws Exception
   {
      if (caches.get(cacheID) != null)
      throw new IllegalStateException(cacheID + " already created");
     
      TreeCacheMBean tree=new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, configFile);
     
      tree.createService();
      tree.startService();
     
      caches.put(cacheID, tree);
     
      return tree;
   }
View Full Code Here

Examples of org.jboss.cache.TreeCache

      }
   }
  
   protected void stopCache(String id)
   {
      TreeCache cache = (TreeCache) caches.get(id);
      if (cache != null)
      {
         try {
            cache.stopService();
            cache.destroyService();
            caches.remove(id);
         }
         catch (Exception e) {
            System.out.println("Exception stopping cache " + e.getMessage());
            e.printStackTrace(System.out);
View Full Code Here

Examples of org.jboss.cache.TreeCache

   }

   TreeCache createCache(IsolationLevel level) throws Exception
   {
      TreeCache cache = new TreeCache();
      PropertyConfigurator config = new PropertyConfigurator();
      config.configure(cache, "META-INF/replAsync-service.xml");
      cache.setIsolationLevel(level);
      System.out.println("cache isolation level is " + cache.getIsolationLevel());
      return cache;
   }
View Full Code Here

Examples of org.jboss.cache.TreeCache

public class LocalPessimisticTest extends OptimisticPerfTestBase
{
    protected void configure() throws Exception
    {
        testName = "localPessimisticTest";
        cache = new TreeCache();
        cache.setCacheMode(TreeCache.LOCAL);
        cache.startService();
    }
View Full Code Here

Examples of org.jboss.cache.TreeCache

  
   private void startCache() throws Exception
   {
      if (cache_ == null)
      {
         cache_ = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache_, configFile_);
        
         cache_.create();
         cache_.start();
View Full Code Here

Examples of org.jboss.cache.TreeCache

public class LocalTest extends OptimisticPerfTestBase
{
    protected void configure() throws Exception
    {
        testName = "localTest";
        cache = new TreeCache();
        cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
        cache.setNodeLockingScheme("OPTIMISTIC");
        cache.setCacheMode(TreeCache.LOCAL);
        cache.setLockAcquisitionTimeout(2000l);
        System.out.println("TO " + cache.getLockAcquisitionTimeout());
View Full Code Here

Examples of org.jboss.cache.TreeCache

public class LocalPessimisticCLTest extends OptimisticPerfTestBase
{
    protected void configure() throws Exception
    {
        testName = "localPessimisticCLTest";
        cache = new TreeCache();
        cache.setCacheMode(TreeCache.LOCAL);
        cache.setCacheLoaderClass("org.jboss.cache.loader.FileCacheLoader");
        Properties p = new Properties();
        p.put("location", "/tmp/JBossCache-perf/" + testName);
        cache.setCacheLoaderConfig(p);
View Full Code Here

Examples of org.jboss.cache.TreeCache

public class LocalCLTest extends OptimisticPerfTestBase
{
    protected void configure() throws Exception
    {
        testName = "localCLTest";
        cache = new TreeCache();
        cache.setLockAcquisitionTimeout(2000l);
        cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
        cache.setNodeLockingScheme("OPTIMISTIC");
        cache.setCacheMode(TreeCache.LOCAL);
        cache.setCacheLoaderClass("org.jboss.cache.loader.FileCacheLoader");
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.