Package org.jboss.cache

Examples of org.jboss.cache.CacheFactory


    return cache;
  }

  private Cache createCacheUseDefault() {

    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache();

    return cache;
  }
View Full Code Here


public class MyListenerTest {
 
  public void test() {
   
    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache(false);
    MyListener myListener = new MyListener();
    cache.addCacheListener(myListener);
    System.out.println(cache.getCacheStatus());
    cache.start();
    System.out.println(cache.getCacheStatus());
View Full Code Here

   @Test(enabled = false)
   public static void main(String[] args)
   {
      Configuration localConfig = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC);
      localConfig.setExposeManagementStatistics(true);
      CacheFactory cacheFactory = new DefaultCacheFactory();
      Cache cache = cacheFactory.createCache(localConfig);
      JmxRegistrationManager regManager = new JmxRegistrationManager(cache);
      while (true){}
   }
View Full Code Here

    @Create
    public void create() {
        log.debug("Starting JBoss Cache");

        try {
            CacheFactory factory = new DefaultCacheFactory();
            cache = factory.createCache(getConfigurationAsStream());

            cache.create();
            cache.start();
        } catch (Exception e) {
            //log.error(e, e);
View Full Code Here

    @Create
    public void create() {
        log.debug("Starting JBoss Cache");

        try {
            CacheFactory factory = new DefaultCacheFactory();
            cache = factory.createCache(getConfigurationAsStream());

            cache.create();
            cache.start();
        } catch (Exception e) {
            //log.error(e, e);
View Full Code Here

    @Create
    public void create() {
        log.debug("Starting JBoss Cache");

        try {
            CacheFactory factory = new DefaultCacheFactory();
            cache = factory.createCache(getConfigurationAsStream());

            cache.create();
            cache.start();
        } catch (Exception e) {
            //log.error(e, e);
View Full Code Here

   public JBossCacheAttributeStoreWrapper(AttributeStore attributeStore, InputStream cacheConfigInputStream)
   {
      this.attributeStore = attributeStore;

      CacheFactory factory = new DefaultCacheFactory();

      this.cache = factory.createCache(cacheConfigInputStream);

      this.cache.start();

   }
View Full Code Here

   protected final Cache cache;

   public IdentityStoreCacheProviderImpl(InputStream cacheConfigInputStream)
   {
      CacheFactory factory = new DefaultCacheFactory();

      this.cache = factory.createCache(cacheConfigInputStream);

      this.cache.start();

   }
View Full Code Here

   static boolean notificationsReceived = true;

   @BeforeMethod
   public void setUp() throws CloneNotSupportedException
   {
      CacheFactory cf = new DefaultCacheFactory();
      c1 = cf.createCache(false);

      c1.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      c1.getConfiguration().setBuddyReplicationConfig(brc);

      c2 = cf.createCache(c1.getConfiguration().clone(), false);
      c3 = cf.createCache(c1.getConfiguration().clone(), false);

      c1.start();
      c2.start();
      c3.start();
View Full Code Here

   private Configuration configuration;

   @BeforeMethod
   public void setUp() throws Exception
   {
      CacheFactory cf = new DefaultCacheFactory();

      Cache cache = cf.createCache(false);
      cr = TestingUtil.extractComponentRegistry(cache);
      configuration = cache.getConfiguration();
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.CacheFactory

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.