Package org.jboss.cache

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


       final int threads = 10, loops = 100;
       TreeCache cache = null;
       try
       {
          cache = new TreeCache();
          cache.startService();
          cache.put("/test/node", null);
          final DataNode node = cache.get("/test/node");
          final List exceptions = new ArrayList();
          final List timeouts = new ArrayList();
View Full Code Here


      TreeCacheMBean tree=new TreeCache();
      PropertyConfigurator config=new PropertyConfigurator();
      config.configure(tree, "META-INF/replSync-service.xml");
     
      tree.createService();
      tree.startService();
     
      caches.put(cacheID, tree);
     
      return tree;
   }
View Full Code Here

   private TreeCache createCache() throws Exception
   {
      TreeCache c = new TreeCache();
      c.setCacheMode("REPL_SYNC");
      c.startService();
      return c;
   }

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

        cache.setCacheMode(TreeCache.REPL_SYNC);
        if (optimistic) cache.setNodeLockingScheme("OPTIMISTIC");
        cache.setClusterName("InvocationContextCleanupTest");
        cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
        cache.setLockAcquisitionTimeout(2000);
        cache.startService();
        return cache;
    }

    protected void tearDown()
    {
View Full Code Here

     
      // Call the hook that allows mux integration
      configureMultiplexer(tree);
     
      tree.createService();
      tree.startService();
     
      validateMultiplexer(tree);
     
      return tree;
   }
View Full Code Here

      cache.setSyncCommitPhase(true);
      cache.setSyncRollbackPhase(true);
      cache.setSyncReplTimeout(600000);
      cache.setLockAcquisitionTimeout(600000);
      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      cache.startService();
      return cache;
   }

   protected void tearDown()
   {
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("/a/b", "key", "value");
        Assert.assertEquals("value", cache1.get(fqn, "key"));
View Full Code Here

      caches.put(cacheID, tree);
     
      if (startCache)
      {
         tree.createService();
         tree.startService();
        
         validateMultiplexer(tree);
      }
     
      return tree;
View Full Code Here

     
      cache1.startService();
     
      cache1.put("/a/b/c", "key", "value");
     
      cache2.startService();
     
      RegionManager erm = cache2.getEvictionRegionManager();
      Region region = erm.getRegion(Fqn.ROOT);
      // We expect events for /a, /a/b and /a/b/c
      assertEquals("Saw the expected number of node events", 3, region.nodeEventQueueSize());
View Full Code Here

         cache1.put("/base/" + i, "key", "base" + i);
         if (i < 5)
             cache1.put("/org/jboss/test/data/" + i, "key", "data" + i);
      }
     
      cache2.startService();
     
      Set children = cache2.getChildrenNames("/org/jboss/test/data");
      assertNotNull("Data children transferred", children);
      assertEquals("All data children transferred", 5, children.size());
      children = cache2.getChildrenNames("/base");
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.