/*
 * 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 LocalPessimisticCLTest extends OptimisticPerfTestBase
{
    protected void configure() throws Exception
    {
        testName = "localPessimisticCLTest";
        cache = new TreeCache();
        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 LocalPessimisticCLTest().runTests();
    }
}
