/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.cache.optimistic;
import org.jboss.cache.TreeCache;
/**
* A simple test that runs through N loops of the test and measures time taken using a local, no cacheloader config.
*
* @author <a href="mailto:manik@jboss.org">Manik Surtani (manik@jboss.org)</a>
*/
public class LocalTest extends OptimisticPerfTestBase
{
protected void configure() throws Exception
{
testName = "localTest";
cache = new TreeCache();
cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.setNodeLockingScheme("OPTIMISTIC");
cache.setCacheMode(TreeCache.LOCAL);
cache.setLockAcquisitionTimeout(2000l);
System.out.println("TO " + cache.getLockAcquisitionTimeout());
cache.startService();
System.out.println("TO " + cache.getLockAcquisitionTimeout());
}
public static void main(String[] args) throws Exception
{
LocalTest test = new LocalTest();
test.runTests();
System.out.println(test.results);
}
}