Package org.jboss.cache.invalidation

Source Code of org.jboss.cache.invalidation.OptimisticAsyncInvalidationTest

package org.jboss.cache.invalidation;

import org.jboss.cache.TreeCache;
import org.jboss.cache.misc.TestingUtil;

/**
* Tests the edge cases defined in JBCACHE-806
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 1.4.0
*/
public class OptimisticAsyncInvalidationTest extends OptimisticSyncInvalidationTest
{
   protected TreeCache createCache() throws Exception
   {
      TreeCache c = new TreeCache();
      c.setCacheMode(TreeCache.INVALIDATION_ASYNC); // only use sync.
      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
      c.setNodeLockingScheme("OPTIMISTIC");
      c.startService();
      return c;
   }

   protected void pause()
   {
      TestingUtil.sleepThread(500);
   }

   public void testIncorrectInsertion()
   {
      // do nothing; in async mode we cannot guarantee than an invalidation is correct or contains stale data.
   }
}
TOP

Related Classes of org.jboss.cache.invalidation.OptimisticAsyncInvalidationTest

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.