Package net.anotheria.moskito.integration.ehcache

Examples of net.anotheria.moskito.integration.ehcache.EhcacheStats


        Thread.sleep(5500);

        /* if there is no MoSKito WebUI embedded in your application, stats can be accessed in a way like this */
        IProducerRegistryAPI registryAPI = new ProducerRegistryAPIFactory().createProducerRegistryAPI();
        OnDemandStatsProducer<EhcacheStats> producer = (OnDemandStatsProducer<EhcacheStats>) registryAPI.getProducer("browser-cache");
        EhcacheStats stats =  producer.getStats("cumulated");
        System.out.println(stats.toStatsString(null, TimeUnit.MILLISECONDS));

        /* first 100 accesses will not result in hits because we don't have this pages in cache yet */
        assertEquals(9900, stats.getHits().getValueAsLong());
    }
View Full Code Here

TOP

Related Classes of net.anotheria.moskito.integration.ehcache.EhcacheStats

Copyright © 2018 www.massapicom. 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.