Package org.jboss.cache

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


      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


   {
      TreeCache cache1 = (TreeCache) createCache("cache1", false, false, false, false, false);
  
      cache1.setBuddyReplicationConfig(getBuddyConfig());
     
      cache1.startService();
     
      TreeCache cache2 = (TreeCache) createCache("cache2", false, false, false);
     
      // Pause to give caches time to see each other
      TestingUtil.blockUntilViewsReceived(new TreeCacheMBean[] { cache1, cache2 }, 60000);
View Full Code Here

   {
      TreeCache c = new TreeCache();
      c.setCacheMode(TreeCache.INVALIDATION_ASYNC); // only use sync.
      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      c.setNodeLockingScheme("OPTIMISTIC");
      c.startService();
      return c;
   }

   protected void pause()
   {
View Full Code Here

    public void testConcurrentReadsLocal() throws Exception
    {
        TreeCache cache = createCacheUnstarted();
        cache.setCacheMode("INVALIDATION_ASYNC");
        cache.startService();
       
        Processor[] processors = new Processor[NUM_THREADS];
        for (int i=0; i<NUM_THREADS; i++)
        {
            processors[i] = new Processor(cache, "Processor-" + i);
View Full Code Here

        TreeCache cache1 = createUnstartedCache( false );
        TreeCache cache2 = createUnstartedCache( false );
        cache1.setCacheMode(TreeCache.INVALIDATION_ASYNC);
        cache2.setCacheMode(TreeCache.INVALIDATION_ASYNC);
        cache1.startService();
        cache2.startService();

        Fqn fqn = Fqn.fromString("/a/b");
        cache1.put(fqn, "key", "value");
        TestingUtil.sleepThread(500)// give it time to broadcast the evict call
        // test that this has NOT replicated, but rather has been invalidated:
View Full Code Here

    public void testBlockingProblem() throws Exception {

        TreeCache cache = new TreeCache();
        cache.setCacheLoader(new TestSlowCacheLoader());
        cache.startService();

        long begin = System.currentTimeMillis();
        Collection threads = new ArrayList();

        /*
 
View Full Code Here

      TreeCache c=new TreeCache("test", null, 10000);
      c.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
      c.setLockAcquisitionTimeout(500);
      c.setIsolationLevel(level);
      c.createService();
      c.startService();
      return c;
   }


View Full Code Here

      TreeCache c=new TreeCache("test", null, 10000);
      c.setTransactionManagerLookupClass("org.jboss.cache.JBossTransactionManagerLookup");
      c.setLockAcquisitionTimeout(500);
      c.setIsolationLevel(level);
      c.createService();
      c.startService();
      return c;
   }


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

      TreeCache c=new TreeCache();
      c.setCacheMode(mode);
      c.setIsolationLevel(level);
      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      c.createService();
      c.startService();
      return c;
   }

   Transaction startTransaction() {
      DummyTransactionManager mgr=DummyTransactionManager.getInstance();
View Full Code Here

       final int threads = 10, loops = 100;
       TreeCache cache = null;
       try
       {
          cache = new TreeCache();
          cache.startService();
          final DataNode root = cache.getRoot();
          final List exceptions = new ArrayList();
          final List timeouts = new ArrayList();

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.