Package org.jboss.cache

Examples of org.jboss.cache.Region.deactivate()


      // restart c1 so that it forces a state transfer from c2
      c1.destroy();
      c1.create();
      Region r = c1.getRegion(fqn.getParent(), true);
      r.registerContextClassLoader(getClass().getClassLoader());
      r.deactivate();
      c1.start();

      TestingUtil.blockUntilViewsReceived(60000, c1, c2);

      // assert that the state has been transferred to C1
View Full Code Here


      assertTrue("Should be active by default", region1.isActive());
      // make sure this newly created region is "recognised" as a marshalling region.
      assertTrue(caches.get(1).getRegionManager().getAllRegions(Region.Type.MARSHALLING).contains(region1));

      // now deactivate the region on cache 1.
      region1.deactivate();
      assertFalse("Should be have deactivated", region1.isActive());

      caches.get(0).put(f, "k", "v2");
      assertEquals("v2", caches.get(0).get(f, "k"));
      assertNull(caches.get(1).get(f, "k"));
View Full Code Here

      r.activate();

      cache.put(rootRegionName, "a key", "a value");
      cache.put(hereFqn, "another key", "another value");

      r.deactivate();
      r.unregisterContextClassLoader();

      cache.stop();

      cache.start();
View Full Code Here

           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
View Full Code Here

      cache1.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
      cache1.put(fqn, "name", JOE);

      assertEquals("Put should have been OK", JOE, cache1.get(fqn, "name"));

      regionA.deactivate();

      assertNull("Inactivation should have cleared region", cache1.get(fqn, "name"));
   }

   protected CacheSPI<Object, Object> createCache() throws Exception
View Full Code Here

      r.activate();

      cache.put(rootRegionName, "a key", "a value");
      cache.put(hereFqn, "another key", "another value");

      r.deactivate();
      r.unregisterContextClassLoader();

      cache.stop();

      cache.start();
View Full Code Here

         cache2 = createCache("nbst", false);
         cache2.getConfiguration().setUseRegionBasedMarshalling(true);
         region = cache2.getRegion(Fqn.fromString("/region1"), true);
         region.registerContextClassLoader(getClass().getClassLoader());
         cache2.start();
         region.deactivate();

         // Pause to give caches time to see each other
         TestingUtil.blockUntilViewsReceived(new CacheSPI[] { cache1, cache2 }, 60000);

         cache1.put("/region1/blah", "blah", "blah");
View Full Code Here

            // and enabling the stressors
            for (int i = 0; i < count; i++)
            {
               Region r = cacheA.getRegion(Fqn.fromString("/" + names[i]), true);
               r.registerContextClassLoader(getClass().getClassLoader());
               r.deactivate();
               stressors[i].startPuts();
            }

            // Release the semaphore to allow the threads to start work
            semaphore.release(count);
View Full Code Here

           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
View Full Code Here

           
         try {
            Region region = plainCache_.getRegion(pathFqn, false);
            if (region != null)
            {
               region.deactivate();
               region.unregisterContextClassLoader();
            }
         }
         catch (Exception e)
         {
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.