Package org.jboss.cache.api.nodevalidity

Source Code of org.jboss.cache.api.nodevalidity.ReplicatedPessNodeValidityTest

package org.jboss.cache.api.nodevalidity;

import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
import org.testng.annotations.Test;

/**
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 2.1.0
*/
@Test(groups = {"functional"})
public class ReplicatedPessNodeValidityTest extends NodeValidityTestBase
{
   protected Cache<String, String> createObserver()
   {
      return newCache();
   }

   protected Cache<String, String> createModifier()
   {
      return newCache();
   }

   protected Cache<String, String> newCache()
   {
      CacheFactory<String, String> f = new DefaultCacheFactory();
      Cache<String, String> cache = f.createCache(false);
      cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
      optimisticConfiguration(cache.getConfiguration());
      cache.start();
      return cache;
   }
}
TOP

Related Classes of org.jboss.cache.api.nodevalidity.ReplicatedPessNodeValidityTest

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.