/*
* 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;
import java.util.Properties;
/**
* 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 LocalCLTest extends OptimisticPerfTestBase
{
protected void configure() throws Exception
{
testName = "localCLTest";
cache = new TreeCache();
cache.setLockAcquisitionTimeout(2000l);
cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.setNodeLockingScheme("OPTIMISTIC");
cache.setCacheMode(TreeCache.LOCAL);
cache.setCacheLoaderClass("org.jboss.cache.loader.FileCacheLoader");
Properties p = new Properties();
p.put("location", "/tmp/JBossCache-perf/" + testName);
cache.setCacheLoaderConfig(p);
cache.startService();
}
public static void main(String[] args) throws Exception
{
new LocalCLTest().runTests();
}
}