Package org.qi4j.api.metrics

Examples of org.qi4j.api.metrics.MetricsCounterFactory


    private MetricsCounter getCounter()
    {
        if( metrics != null )
        {
            MetricsCounterFactory metricsFactory = metrics.createFactory( MetricsCounterFactory.class );
            return metricsFactory.createCounter( getClass(), "UnitOfWork Counter" );
        }
        return new DefaultMetric();
    }
View Full Code Here


    }

    @Override
    protected MetricsCounterFactory createMetricsCounterFactory()
    {
        return new MetricsCounterFactory()
        {
            @Override
            public MetricsCounter createCounter( Class<?> origin, String name )
            {
                Counter counter = Metrics.newCounter( origin, name, app.name() );
View Full Code Here

{
    @Test
    public void givenMetricsProviderWithoutSupportForCounterWhenRequestingCounterExpectDefaultNullImplementation()
    {
        MetricsProvider underTest = new MetricsProviderAdapter();
        MetricsCounterFactory factory = underTest.createFactory( MetricsCounterFactory.class );
        MetricsCounter test = factory.createCounter( getClass(), "test" );
        test.increment();
        test.decrement();
    }
View Full Code Here

TOP

Related Classes of org.qi4j.api.metrics.MetricsCounterFactory

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.