Search in sources :

Example 1 with StatsCollectorCoda

use of com.nokia.dempsy.monitoring.coda.StatsCollectorCoda in project Dempsy by Dempsy.

the class TestMpContainerLoadHandling method setUp.

@Before
public void setUp() throws Exception {
    ClusterId cid = new ClusterId("TestMpContainerLoadHandling", "test" + sequence++);
    dispatcher = new MockDispatcher();
    StatsCollectorCoda sc = new StatsCollectorCoda(cid, new StatsCollectorFactoryCoda().getNamingStrategy());
    stats = sc;
    JavaSerializer<Object> serializer = new JavaSerializer<Object>();
    container = new MpContainer(cid);
    container.setDispatcher(dispatcher);
    container.setStatCollector(sc);
    container.setSerializer(serializer);
    container.setPrototype(new TestMessageProcessor());
    forceOutputException = false;
}
Also used : StatsCollectorCoda(com.nokia.dempsy.monitoring.coda.StatsCollectorCoda) MpContainer(com.nokia.dempsy.container.MpContainer) ClusterId(com.nokia.dempsy.config.ClusterId) JavaSerializer(com.nokia.dempsy.serialization.java.JavaSerializer) StatsCollectorFactoryCoda(com.nokia.dempsy.monitoring.coda.StatsCollectorFactoryCoda) Before(org.junit.Before)

Example 2 with StatsCollectorCoda

use of com.nokia.dempsy.monitoring.coda.StatsCollectorCoda in project Dempsy by Dempsy.

the class TestInstanceManager method setupContainer.

//----------------------------------------------------------------------------
//  Test Cases
//----------------------------------------------------------------------------
public MpContainer setupContainer(Object prototype) throws ContainerException {
    DummyDispatcher dispatcher = new DummyDispatcher();
    StatsCollector stats = new StatsCollectorCoda(new ClusterId("test", "test"), new StatsCollectorFactoryCoda().getNamingStrategy());
    JavaSerializer<Object> serializer = new JavaSerializer<Object>();
    manager = new MpContainer(new ClusterId("test", "test"));
    manager.setDispatcher(dispatcher);
    manager.setStatCollector(stats);
    manager.setSerializer(serializer);
    manager.setPrototype(prototype);
    return manager;
}
Also used : StatsCollectorCoda(com.nokia.dempsy.monitoring.coda.StatsCollectorCoda) StatsCollector(com.nokia.dempsy.monitoring.StatsCollector) ClusterId(com.nokia.dempsy.config.ClusterId) JavaSerializer(com.nokia.dempsy.serialization.java.JavaSerializer) StatsCollectorFactoryCoda(com.nokia.dempsy.monitoring.coda.StatsCollectorFactoryCoda)

Aggregations

ClusterId (com.nokia.dempsy.config.ClusterId)2 StatsCollectorCoda (com.nokia.dempsy.monitoring.coda.StatsCollectorCoda)2 StatsCollectorFactoryCoda (com.nokia.dempsy.monitoring.coda.StatsCollectorFactoryCoda)2 JavaSerializer (com.nokia.dempsy.serialization.java.JavaSerializer)2 MpContainer (com.nokia.dempsy.container.MpContainer)1 StatsCollector (com.nokia.dempsy.monitoring.StatsCollector)1 Before (org.junit.Before)1