Package org.jboss.cache

Examples of org.jboss.cache.Cache.start()


         c = new UnitTestCacheFactory().createCache(false);
         c.getConfiguration().setNodeLockingScheme(nls);
         c.getConfiguration().setLockParentForChildInsertRemove(set);
         if (nls.isVersionedScheme())
            c.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
         c.start();
         assert c.getRoot().isLockForChildInsertRemove() == set;
      }
      finally
      {
         TestingUtil.killCaches(c);
View Full Code Here


      c.setCacheMode(CacheMode.REPL_ASYNC);
      Cache cache2 = null;
      try
      {
         cache2 = createCache(c);
         cache2.start();
         Cache[] caches = new Cache[]{wrapper.getCache(), cache2};
         TestingUtil.blockUntilViewsReceived(caches, 5000);

         Address addr = wrapper.getLocalAddress();
         assertNotNull("Got an Address", addr);
View Full Code Here

        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
       
        Fqn regionFqn = getRegionFqn("test/test", "test");
View Full Code Here

    Cache cache = factory.createCache(
        "/opt/configurations/cache-configuration.xml", false);
    Configuration config = cache.getConfiguration();
    config.setClusterName("Cluster Test");
    cache.create();
    cache.start();

    return cache;
  }

  private Cache createCacheUseClasspathXML() {
View Full Code Here

    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());
   
    if(cache.getCacheStatus().equals(CacheStatus.STARTED)) {
      System.out.println("Yes");
    }
View Full Code Here

         {
            if (cache.getCacheStatus() != CacheStatus.CREATED)
            {
               cache.create();
            }
            cache.start();
         }
      }
   }
  
   private void releaseEagerStartCaches()
View Full Code Here

        cache = cm.getCache(cacheName, true);

        listener = new MyListener();
        cache.addCacheListener(listener);

        cache.start();
      }

      caches.add(cache);
      System.out.println(cacheName);
    } catch (Exception e) {
View Full Code Here

        assertEquals("Cache is REPL_SYNC", "REPL_SYNC", remoteCache.getConfiguration().getCacheModeString());
       
        JChannelFactory channelFactory = new JChannelFactory();
        channelFactory.setMultiplexerConfig(SharedCacheInstanceManager.DEF_JGROUPS_RESOURCE);
        remoteCache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
        remoteCache.start();
       
        // Make sure we stop the remoteCache
        registerCache(remoteCache);
       
        Fqn regionFqn = getRegionFqn("test/test", "test");
View Full Code Here

         c = new UnitTestCacheFactory().createCache(false, getClass());
         c.getConfiguration().setNodeLockingScheme(nls);
         c.getConfiguration().setLockParentForChildInsertRemove(set);
         if (nls.isVersionedScheme())
            c.getConfiguration().setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
         c.start();
         assert c.getRoot().isLockForChildInsertRemove() == set;
      }
      finally
      {
         TestingUtil.killCaches(c);
View Full Code Here

   {     
      int kBytesCached = (bytesPerCharacter * numNodes * (payloadSize + keySize)) / 1024;
      System.out.println("Bytes to be cached: " + NumberFormat.getIntegerInstance().format(kBytesCached) + " kb");

      Cache c = new DefaultCacheFactory().createCache(false); // default LOCAL cache
      c.start();
      for (int i = 0; i < numNodes; i++)
      {
         switch (payloadType)
         {
            case STRINGS:
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.