Examples of MpContainer


Examples of com.nokia.dempsy.container.MpContainer

                  router = new Router(clusterDefinition.getParentApplicationDefinition());
                  router.setCurrentCluster(currentClusterId);
                  router.setClusterSession(clusterSession);
                  // get the executor if one is set
                 
                  container = new MpContainer(currentClusterId);
                  container.setDispatcher(router);
                  if (executor != null)
                     container.setExecutor(executor);
                  Object messageProcessorPrototype = clusterDefinition.getMessageProcessorPrototype();
                  if (messageProcessorPrototype != null)
View Full Code Here

Examples of com.nokia.dempsy.container.MpContainer

            Dempsy.Application.Cluster c = dempsy.getCluster(new ClusterId("test-app","test-cluster1"));
            assertNotNull(c);
            Dempsy.Application.Cluster.Node node = c.getNodes().get(0);
            assertNotNull(node);
           
            MpContainer container = node.getMpContainer();
           
            // let it go and wait until there's a few keys.
            firstCreated.m_pause.countDown();
           
            // as the KeySource iterates, this will increase
            assertTrue(poll(baseTimeoutMillis,mp,new Condition<TestMp>() { @Override public boolean conditionMet(TestMp mp) {  return mp.cloneCalls.get() > 10000; } }));

            // prepare the next countdown latch
            KeySourceImpl.pause = new CountDownLatch(0); // just let the 2nd one go
           
            // I want the next one to stop at 2
            KeySourceImpl.infinite = false;

            // Now force another call while the first is running
            container.keyspaceResponsibilityChanged(node.strategyInbound, false, true);
           
            // wait until the second one is created
            assertTrue(poll(baseTimeoutMillis,null,new Condition<Object>() { @Override public boolean conditionMet(Object mp) {  return KeySourceImpl.lastCreated != null && firstCreated != KeySourceImpl.lastCreated; } }));
           
            // now the first one should be done and therefore no longer incrementing.
View Full Code Here

Examples of com.nokia.dempsy.container.MpContainer

      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());
     
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.