Package org.jboss.cache

Examples of org.jboss.cache.RegionRegistry


   {
      CacheMarshallerTestBaseTL tl = threadLocal.get();
      CacheMarshaller200 cm200 = new CacheMarshaller200();
      tl.c.setUseRegionBasedMarshalling(true);
      RegionManagerImpl rmi = new RegionManagerImpl();
      rmi.injectDependencies(null, tl.c, null, null, null, new RegionRegistry());
      cm200.injectDependencies(rmi, tl.c, getClass().getClassLoader());
      cm200.init();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      cm200.objectToObjectStream("Hello World", oos, Fqn.fromString("/hello"));
View Full Code Here


   EvictionRegionConfig config = new EvictionRegionConfig(null, new NullEvictionAlgorithmConfig());

   public void testCreateRegion()
   {
      RegionManager regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      regionManager.setUsingEvictions(true);
      regionManager.getRegion(DEFAULT_REGION, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_B_C, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_B, true).setEvictionRegionConfig(config);
      regionManager.getRegion(AOP, true).setEvictionRegionConfig(config);
View Full Code Here

   public void testCreateRegion2()
   {

      RegionManager regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      regionManager.setUsingEvictions(true);
      regionManager.getRegion(A_B_C, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_B, true).setEvictionRegionConfig(config);
      regionManager.getRegion(DEFAULT_REGION, true).setEvictionRegionConfig(config);
View Full Code Here

   }

   public void testNoDefaultRegion()
   {
      RegionManager regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      regionManager.setUsingEvictions(true);
      regionManager.getRegion(A_B_C, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_B, true).setEvictionRegionConfig(config);

      regionManager.getRegion(Fqn.fromString("/a"), Region.Type.EVICTION, false);
View Full Code Here

   }

   public void testGetRegion()
   {
      RegionManager regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      regionManager.setUsingEvictions(true);
      regionManager.getRegion(DEFAULT_REGION, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_BC, true).setEvictionRegionConfig(config);
      regionManager.getRegion(A_B, true).setEvictionRegionConfig(config);
View Full Code Here

   {
      Fqn A_B_C_D_E = Fqn.fromString("/a/b/c/d/e/");
      Fqn A_B_C_D = Fqn.fromString("/a/b/c/d/");

      RegionManager rm = new RegionManagerImpl();
      ((RegionManagerImpl) rm).injectDependencies(null, null, null, null, null, new RegionRegistry());
      rm.setUsingEvictions(true);
      rm.getRegion(DEFAULT_REGION, true).setEvictionRegionConfig(config);
      rm.getRegion(A_B_C_D_E, true).setEvictionRegionConfig(config);
      rm.getRegion(A_B_C_D, true).setEvictionRegionConfig(config);
      rm.getRegion(A_B_C, true).setEvictionRegionConfig(config);
View Full Code Here

      c.setEvictionConfig(new EvictionConfig());
      EvictionRegionConfig erc = new EvictionRegionConfig(fqn, config);
      c.getEvictionConfig().addEvictionRegionConfig(erc);
      CacheSPI mockCache = EasyMock.createNiceMock(CacheSPI.class);
      EasyMock.replay(mockCache);
      ((RegionManagerImpl) regionManager).injectDependencies(mockCache, c, null, null, null, new RegionRegistry());
      Region r = regionManager.getRegion(fqn, Region.Type.EVICTION, true);
      r.setEvictionRegionConfig(erc);

      ((RegionManagerImpl) regionManager).start();
      return (EvictionAlgorithm) TestingUtil.extractField(r, "evictionAlgorithm");
View Full Code Here

   @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
      algorithm = new LRUAlgorithm();
      regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      Region r = regionManager.getRegion("/a/b", true);//.setEvictionPolicy(new DummyEvictionConfiguration());
      r.setEvictionRegionConfig(new EvictionRegionConfig(r.getFqn(), new LRUAlgorithmConfig()));
   }
View Full Code Here

   @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
      RegionManagerImpl rmi = new RegionManagerImpl();
      rmi.injectDependencies(null, new Configuration(), null, null, null, new RegionRegistry());
      regionManager = rmi;
   }
View Full Code Here

   @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
      regionManager = new RegionManagerImpl();
      ((RegionManagerImpl) regionManager).injectDependencies(null, null, null, null, null, new RegionRegistry());
      FIFOAlgorithmConfig config = new FIFOAlgorithmConfig();
      config.setMaxNodes(0);
      algo = (FIFOAlgorithm) createAndAssignToRegion("/a/b", regionManager, config);
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.RegionRegistry

Copyright © 2018 www.massapicom. 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.