Examples of activateRegion()


Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

      assertNull("/a/b name transferred against policy", cache2.get("/a/b", "name"));
      assertNull("/a/b age transferred against policy", cache2.get("/a/b", "age"));
      assertNull("/a/c name transferred against policy", cache2.get("/a/c", "name"));
      assertNull("/a/c age transferred against policy", cache2.get("/a/c", "age"));
     
      cache2.activateRegion("/a/b");    

     
      Map ab = loader.get(A_B);
      assertNotNull("Loader transferred /a/b", ab);
      assertEquals("Incorrect name from loader for /a/b", JOE, ab.get("name"));
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

     
      cache1.put("/a/d", "name", JANE);
     
      assertNull("/a/d name transferred against policy", cache2.get("/a/d", "name"));
     
      cache2.activateRegion("/a/c");    
     
      ab = loader.get(A_B);
      assertNotNull("Loader still has /a/b", ab);
      assertEquals("Incorrect name from loader for /a/b", JOE, ab.get("name"));
      assertEquals("Incorrect age from loader for /a/b", TWENTY, ab.get("age"));
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

      assertEquals("Incorrect age for /a/b", TWENTY, cache2.get("/a/b", "age"));
      assertEquals("Incorrect name for /a/c", BOB, cache2.get("/a/c", "name"));
      assertEquals("Incorrect age for /a/c", FORTY, cache2.get("/a/c", "age"));
      assertNull("/a/d name transferred against policy", cache2.get("/a/d", "name"));
     
      cache2.activateRegion("/a/d");        
     
      ab = loader.get(A_B);
      assertNotNull("Loader still has /a/b", ab);     
      assertEquals("Incorrect name from loader for /a/b", JOE, ab.get("name"));
      assertEquals("Incorrect age from loader for /a/b", TWENTY, ab.get("age"));
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

                                          false, false); // don't start
      ClassLoader cl1 = getClassLoader();
      cache1.registerClassLoader("/a", cl1);
      startCache(cache1);
     
      cache1.activateRegion("/a");
     
      Object ben = createBen(cl1);
     
      cache1.put("/a/b", "person", ben);
     
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

      assertNull("/a/b not transferred to cache", cache2.get("/a/b", "person"));
     
      ClassLoader cl2 = getClassLoader();
     
//      cache2.registerClassLoader("/a", cl2);
      cache2.activateRegion("/a");    
     
      assertEquals("Correct state from loader for /a/b", ben.toString(), loader.get(A_B).get("person").toString());
     
      assertEquals("Correct state from cache for /a/b", ben.toString(), cache2.get("/a/b", "person").toString());
     
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

  
   public void testLoadEntireStateAfterStart() throws Exception
   {
      TreeCacheMBean cache1 = createCache("cache1", false, true, true);
     
      cache1.activateRegion("/");
     
      cache1.put("/a/b", "name", JOE);
      cache1.put("/a/b", "age", TWENTY);
      cache1.put("/a/c", "name", BOB);
      cache1.put("/a/c", "age", FORTY);
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

      assertNull("/a/b name transferred against policy", cache2.get("/a/b", "name"));
      assertNull("/a/b age transferred against policy", cache2.get("/a/b", "age"));
      assertNull("/a/c name transferred against policy", cache2.get("/a/c", "name"));
      assertNull("/a/c age transferred against policy", cache2.get("/a/c", "age"));
     
      cache2.activateRegion("/");    
     
      assertEquals("Incorrect name from loader for /a/b", JOE, loader.get(A_B).get("name"));
      assertEquals("Incorrect age from loader for /a/b", TWENTY, loader.get(A_B).get("age"));
      assertEquals("Incorrect name from loader for /a/c", BOB, loader.get(A_C).get("name"));
      assertEquals("Incorrect age from loader for /a/c", FORTY, loader.get(A_C).get("age"));
View Full Code Here

Examples of org.jboss.cache.TreeCacheMBean.activateRegion()

             // Activate cacheA
            for (int i = 0; i < count; i++)
            {
//              System.out.println("Activating /" + names[i] + " on A");
               cacheA.activateRegion("/" + names[i]);
               // Stop the stressor so we don't pollute cacheA's state
               // with too many messages sent after activation -- we want
               // to compare transferred state with the sender
               stressors[i].stopPuts();
               System.out.println("Run " + x + "-- /" + names[i] + " activated on A");
View Full Code Here

Examples of org.jboss.cache.aop.PojoCache.activateRegion()

   public void testPartialStateTransfer() throws Exception
   {
      log.info("Enter testPartialStateTransfer");
     
      PojoCache cache1 = createCache("cache1", false, true, false);
      cache1.activateRegion("/a");

      cache1.putObject(A_B_1, joe);
      cache1.putObject(A_B_2, jane);

      PojoCache cache2 = createCache("cache2", false, true, false);
View Full Code Here

Examples of org.jboss.cache.aop.PojoCache.activateRegion()

      {cache1, cache2}, 60000);
     
      assertNull("/a/b/1 not transferred per policy", cache2.getObject(A_B_1));
      assertNull("/a/b/2 not transferred per policy", cache2.getObject(A_B_2));

      cache2.activateRegion("/a/b");
     
      Person ab1  = (Person) cache2.getObject(A_B_1);
      Person ab2 = (Person) cache2.getObject(A_B_2);
      assertEquals("Name for /a/b/1 is Joe", joe.getName(), ab1.getName());
      assertEquals("City for /a/b/1 is Anytown", joe.getAddress().getCity(), ab1.getAddress().getCity());
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.