Examples of StatisticsGatherer


Examples of com.volantis.cache.impl.stats.StatisticsGatherer

        this.clock = clock;
        entries = new CacheEntryList();
        removalListeners = new RemovalListenerList();

        purgeExcessEntriesAction = new PurgeExcessEntriesAction(this);
        gatherer = new StatisticsGatherer(clock);
    }
View Full Code Here

Examples of com.volantis.cache.impl.stats.StatisticsGatherer

        List groups = getGroupList();
        StatisticsSnapshot snapshot;
        if (groups == null) {
            snapshot = gatherer.getStatisticsSnapshot(this);
        } else {
            StatisticsGatherer combined = new StatisticsGatherer(gatherer);

            for (int i = 0; i < groups.size(); i++) {
                Group group = (Group) groups.get(i);
                StatisticsSnapshot nested = group.getStatisticsSnapshot();
                combined.addSnapshot(nested);
            }

            snapshot = combined.getStatisticsSnapshot(this);
        }
        return snapshot;
    }
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

    {
        super.setUp();
        BrokerTestHelper.setUp();

        _broker = BrokerTestHelper.createBrokerMock();
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        TaskExecutor executor = mock(TaskExecutor.class);
        when(executor.isTaskExecutorThread()).thenReturn(true);
        when(_broker.getTaskExecutor()).thenReturn(executor);

        _recovererProvider = new DefaultRecovererProvider(statisticsGatherer, _broker.getVirtualHostRegistry(),
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

    }

    public static VirtualHost createVirtualHost(VirtualHostConfiguration virtualHostConfiguration, VirtualHostRegistry virtualHostRegistry, org.apache.qpid.server.model.VirtualHost modelVHost)
            throws Exception
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        final VirtualHostFactory factory =
                        virtualHostConfiguration == null ? new StandardVirtualHostFactory()
                                                         : VirtualHostFactory.FACTORIES.get(virtualHostConfiguration.getType());
        VirtualHost host = factory.createVirtualHost(virtualHostRegistry,
                statisticsGatherer,
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

public class VirtualHostRecovererTest extends TestCase
{
    public void testCreate()
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getAttribute(Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD)).thenReturn(3000l);
        when(parent.getSecurityManager()).thenReturn(securityManager);
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

        assertEquals("Unexpected name", getName(), host.getName());
    }

    public void testCreateVirtualHostFromStoreConfigAtrributes()
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getAttribute(Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD)).thenReturn(3000l);
        when(parent.getSecurityManager()).thenReturn(securityManager);
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

        checkMandatoryAttributesAreValidated(mandatoryAttributes, attributes);
    }

    public void checkMandatoryAttributesAreValidated(String[] mandatoryAttributes, Map<String, Object> attributes)
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getSecurityManager()).thenReturn(securityManager);
        VirtualHostRecoverer recoverer = new VirtualHostRecoverer(statisticsGatherer);
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

                VirtualHost.class.getSimpleName(), AuthenticationProvider.class.getSimpleName(),
                GroupProvider.class.getSimpleName(), Plugin.class.getSimpleName(), Port.class.getSimpleName(),
                KeyStore.class.getSimpleName(), TrustStore.class.getSimpleName()};

        // mocking the required object
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        VirtualHostRegistry virtualHostRegistry = mock(VirtualHostRegistry.class);
        LogRecorder logRecorder = mock(LogRecorder.class);
        RootMessageLogger rootMessageLogger = mock(RootMessageLogger.class);
        TaskExecutor taskExecutor = mock(TaskExecutor.class);
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

    {
        super.setUp();
        BrokerTestHelper.setUp();

        _broker = BrokerTestHelper.createBrokerMock();
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        TaskExecutor executor = mock(TaskExecutor.class);
        when(executor.isTaskExecutorThread()).thenReturn(true);
        when(_broker.getTaskExecutor()).thenReturn(executor);

        _recovererProvider = new DefaultRecovererProvider(statisticsGatherer, _broker.getVirtualHostRegistry(),
View Full Code Here

Examples of org.apache.qpid.server.stats.StatisticsGatherer

public class VirtualHostRecovererTest extends TestCase
{
    public void testCreate()
    {
        StatisticsGatherer statisticsGatherer = mock(StatisticsGatherer.class);
        SecurityManager securityManager = mock(SecurityManager.class);
        ConfigurationEntry entry = mock(ConfigurationEntry.class);
        Broker parent = mock(Broker.class);
        when(parent.getAttribute(Broker.VIRTUALHOST_HOUSEKEEPING_CHECK_PERIOD)).thenReturn(3000l);
        when(parent.getSecurityManager()).thenReturn(securityManager);
View Full Code Here
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.