Package org.jboss.cache.optimistic

Source Code of org.jboss.cache.optimistic.LocalPessimisticCLTest

/*
* 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();
    }
}
TOP

Related Classes of org.jboss.cache.optimistic.LocalPessimisticCLTest

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.