Search in sources :

Example 1 with ContainerTestMessage

use of net.dempsy.container.mocks.ContainerTestMessage in project Dempsy by Dempsy.

the class TestContainer method testInvokeOutput.

@Test
public void testInvokeOutput() throws Exception {
    outputMessages = Collections.newSetFromMap(new ConcurrentHashMap<>());
    cache = new ConcurrentHashMap<>();
    final TestAdaptor adaptor = context.getBean(TestAdaptor.class);
    assertNotNull(adaptor.dispatcher);
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("foo"));
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("bar"));
    assertTrue(poll(container, c -> c.getProcessorCount() > 1));
    Thread.sleep(100);
    assertEquals("number of MP instances", 2, container.getProcessorCount());
    try (NodeManager nman = addOutputCatchStage()) {
        final TestProcessor mp = cache.get("foo");
        assertTrue(poll(mp, m -> mp.invocationCount > 0));
        Thread.sleep(100);
        assertEquals("invocation count, 1st message", 1, mp.invocationCount);
        // because the sessionFactory is shared and the appname is the same, we should be in the same app
        container.outputPass();
        assertTrue(poll(outputMessages, o -> o.size() > 1));
        Thread.sleep(100);
        assertEquals(2, outputMessages.size());
        // no new mps created in the first one
        assertEquals("did not create MP", 2, container.getProcessorCount());
        // but the invocation count should have increased since the output cycles feeds messages back to this cluster
        assertTrue(poll(mp, m -> mp.invocationCount > 1));
        Thread.sleep(100);
        assertEquals("invocation count, 1st message", 2, mp.invocationCount);
        // // order of messages is not guaranteed, so we need to aggregate keys
        final HashSet<String> messageKeys = new HashSet<String>();
        final Iterator<OutputMessage> iter = outputMessages.iterator();
        messageKeys.add(iter.next().getKey());
        messageKeys.add(iter.next().getKey());
        assertTrue("first MP sent output", messageKeys.contains("foo"));
        assertTrue("second MP sent output", messageKeys.contains("bar"));
    }
}
Also used : Arrays(java.util.Arrays) Node(net.dempsy.config.Node) NodeManager(net.dempsy.NodeManager) SystemPropertyManager(net.dempsy.utils.test.SystemPropertyManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) After(org.junit.After) Parameterized(org.junit.runners.Parameterized) MessageKey(net.dempsy.lifecycle.annotation.MessageKey) MessageHandler(net.dempsy.lifecycle.annotation.MessageHandler) Collection(java.util.Collection) Functional.uncheck(net.dempsy.util.Functional.uncheck) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Activation(net.dempsy.lifecycle.annotation.Activation) KeyExtractor(net.dempsy.lifecycle.annotation.utils.KeyExtractor) LockingContainer(net.dempsy.container.locking.LockingContainer) OutputMessage(net.dempsy.container.mocks.OutputMessage) Output(net.dempsy.lifecycle.annotation.Output) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Adaptor(net.dempsy.messages.Adaptor) AccessUtil.canReach(net.dempsy.AccessUtil.canReach) Start(net.dempsy.lifecycle.annotation.Start) Assert.assertFalse(org.junit.Assert.assertFalse) Evictable(net.dempsy.lifecycle.annotation.Evictable) MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) AccessUtil.getRouter(net.dempsy.AccessUtil.getRouter) NonLockingContainer(net.dempsy.container.nonlocking.NonLockingContainer) Mp(net.dempsy.lifecycle.annotation.Mp) BlockingQueueReceiver(net.dempsy.transport.blockingqueue.BlockingQueueReceiver) NonLockingAltContainer(net.dempsy.container.altnonlocking.NonLockingAltContainer) MessageType(net.dempsy.lifecycle.annotation.MessageType) Dispatcher(net.dempsy.messages.Dispatcher) KeyedMessageWithType(net.dempsy.messages.KeyedMessageWithType) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DempsyException(net.dempsy.DempsyException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) BasicNodeStatsCollector(net.dempsy.monitoring.basic.BasicNodeStatsCollector) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClusterId(net.dempsy.config.ClusterId) Before(org.junit.Before) LocalClusterSessionFactory(net.dempsy.cluster.local.LocalClusterSessionFactory) Functional.recheck(net.dempsy.util.Functional.recheck) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) KeyedMessage(net.dempsy.messages.KeyedMessage) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Passivation(net.dempsy.lifecycle.annotation.Passivation) AtomicLong(java.util.concurrent.atomic.AtomicLong) ClusterStatsCollector(net.dempsy.monitoring.ClusterStatsCollector) ConditionPoll.poll(net.dempsy.utils.test.ConditionPoll.poll) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) NodeManager(net.dempsy.NodeManager) OutputMessage(net.dempsy.container.mocks.OutputMessage) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashSet(java.util.HashSet) Test(org.junit.Test)

Example 2 with ContainerTestMessage

use of net.dempsy.container.mocks.ContainerTestMessage in project Dempsy by Dempsy.

the class TestContainer method testEvictableWithPassivateException.

@Test
public void testEvictableWithPassivateException() throws Exception {
    final TestProcessor mp = createAndGet("foo");
    mp.throwPassivateException.set(true);
    final TestProcessor prototype = context.getBean(TestProcessor.class);
    final int tmpCloneCount = prototype.cloneCount.intValue();
    mp.evict.set(true);
    container.evict();
    assertTrue(poll(o -> mp.passivateExceptionCount.get() > 0));
    Thread.sleep(100);
    assertEquals("Passivate Exception Thrown", 1, mp.passivateExceptionCount.get());
    final TestAdaptor adaptor = context.getBean(TestAdaptor.class);
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("foo"));
    assertTrue(poll(o -> prototype.cloneCount.intValue() > tmpCloneCount));
    Thread.sleep(1000);
    assertEquals("Clone count, 2nd message", tmpCloneCount + 1, prototype.cloneCount.intValue());
}
Also used : Arrays(java.util.Arrays) Node(net.dempsy.config.Node) NodeManager(net.dempsy.NodeManager) SystemPropertyManager(net.dempsy.utils.test.SystemPropertyManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) After(org.junit.After) Parameterized(org.junit.runners.Parameterized) MessageKey(net.dempsy.lifecycle.annotation.MessageKey) MessageHandler(net.dempsy.lifecycle.annotation.MessageHandler) Collection(java.util.Collection) Functional.uncheck(net.dempsy.util.Functional.uncheck) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Activation(net.dempsy.lifecycle.annotation.Activation) KeyExtractor(net.dempsy.lifecycle.annotation.utils.KeyExtractor) LockingContainer(net.dempsy.container.locking.LockingContainer) OutputMessage(net.dempsy.container.mocks.OutputMessage) Output(net.dempsy.lifecycle.annotation.Output) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Adaptor(net.dempsy.messages.Adaptor) AccessUtil.canReach(net.dempsy.AccessUtil.canReach) Start(net.dempsy.lifecycle.annotation.Start) Assert.assertFalse(org.junit.Assert.assertFalse) Evictable(net.dempsy.lifecycle.annotation.Evictable) MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) AccessUtil.getRouter(net.dempsy.AccessUtil.getRouter) NonLockingContainer(net.dempsy.container.nonlocking.NonLockingContainer) Mp(net.dempsy.lifecycle.annotation.Mp) BlockingQueueReceiver(net.dempsy.transport.blockingqueue.BlockingQueueReceiver) NonLockingAltContainer(net.dempsy.container.altnonlocking.NonLockingAltContainer) MessageType(net.dempsy.lifecycle.annotation.MessageType) Dispatcher(net.dempsy.messages.Dispatcher) KeyedMessageWithType(net.dempsy.messages.KeyedMessageWithType) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DempsyException(net.dempsy.DempsyException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) BasicNodeStatsCollector(net.dempsy.monitoring.basic.BasicNodeStatsCollector) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClusterId(net.dempsy.config.ClusterId) Before(org.junit.Before) LocalClusterSessionFactory(net.dempsy.cluster.local.LocalClusterSessionFactory) Functional.recheck(net.dempsy.util.Functional.recheck) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) KeyedMessage(net.dempsy.messages.KeyedMessage) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Passivation(net.dempsy.lifecycle.annotation.Passivation) AtomicLong(java.util.concurrent.atomic.AtomicLong) ClusterStatsCollector(net.dempsy.monitoring.ClusterStatsCollector) ConditionPoll.poll(net.dempsy.utils.test.ConditionPoll.poll) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) Test(org.junit.Test)

Example 3 with ContainerTestMessage

use of net.dempsy.container.mocks.ContainerTestMessage in project Dempsy by Dempsy.

the class TestContainer method createAndGet.

private TestProcessor createAndGet(final String foo) throws Exception {
    cache = new HashMap<>();
    final TestAdaptor adaptor = context.getBean(TestAdaptor.class);
    assertNotNull(adaptor.dispatcher);
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage(foo));
    assertTrue(poll(o -> container.getProcessorCount() > 0));
    Thread.sleep(100);
    assertEquals("did not create MP", 1, container.getProcessorCount());
    assertTrue(poll(cache, c -> c.get(foo) != null));
    final TestProcessor mp = cache.get(foo);
    assertNotNull("MP not associated with expected key", mp);
    assertEquals("activation count, 1st message", 1, mp.activationCount);
    assertEquals("invocation count, 1st message", 1, mp.invocationCount);
    return mp;
}
Also used : Arrays(java.util.Arrays) Node(net.dempsy.config.Node) NodeManager(net.dempsy.NodeManager) SystemPropertyManager(net.dempsy.utils.test.SystemPropertyManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) After(org.junit.After) Parameterized(org.junit.runners.Parameterized) MessageKey(net.dempsy.lifecycle.annotation.MessageKey) MessageHandler(net.dempsy.lifecycle.annotation.MessageHandler) Collection(java.util.Collection) Functional.uncheck(net.dempsy.util.Functional.uncheck) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Activation(net.dempsy.lifecycle.annotation.Activation) KeyExtractor(net.dempsy.lifecycle.annotation.utils.KeyExtractor) LockingContainer(net.dempsy.container.locking.LockingContainer) OutputMessage(net.dempsy.container.mocks.OutputMessage) Output(net.dempsy.lifecycle.annotation.Output) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Adaptor(net.dempsy.messages.Adaptor) AccessUtil.canReach(net.dempsy.AccessUtil.canReach) Start(net.dempsy.lifecycle.annotation.Start) Assert.assertFalse(org.junit.Assert.assertFalse) Evictable(net.dempsy.lifecycle.annotation.Evictable) MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) AccessUtil.getRouter(net.dempsy.AccessUtil.getRouter) NonLockingContainer(net.dempsy.container.nonlocking.NonLockingContainer) Mp(net.dempsy.lifecycle.annotation.Mp) BlockingQueueReceiver(net.dempsy.transport.blockingqueue.BlockingQueueReceiver) NonLockingAltContainer(net.dempsy.container.altnonlocking.NonLockingAltContainer) MessageType(net.dempsy.lifecycle.annotation.MessageType) Dispatcher(net.dempsy.messages.Dispatcher) KeyedMessageWithType(net.dempsy.messages.KeyedMessageWithType) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DempsyException(net.dempsy.DempsyException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) BasicNodeStatsCollector(net.dempsy.monitoring.basic.BasicNodeStatsCollector) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClusterId(net.dempsy.config.ClusterId) Before(org.junit.Before) LocalClusterSessionFactory(net.dempsy.cluster.local.LocalClusterSessionFactory) Functional.recheck(net.dempsy.util.Functional.recheck) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) KeyedMessage(net.dempsy.messages.KeyedMessage) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Passivation(net.dempsy.lifecycle.annotation.Passivation) AtomicLong(java.util.concurrent.atomic.AtomicLong) ClusterStatsCollector(net.dempsy.monitoring.ClusterStatsCollector) ConditionPoll.poll(net.dempsy.utils.test.ConditionPoll.poll) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage)

Example 4 with ContainerTestMessage

use of net.dempsy.container.mocks.ContainerTestMessage in project Dempsy by Dempsy.

the class TestContainer method testMtInvokeOutput.

@Test
public void testMtInvokeOutput() throws Exception {
    outputMessages = Collections.newSetFromMap(new ConcurrentHashMap<>());
    final int numInstances = 20;
    final int concurrency = 5;
    container.setOutputConcurrency(concurrency);
    final TestAdaptor adaptor = context.getBean(TestAdaptor.class);
    assertNotNull(adaptor.dispatcher);
    for (int i = 0; i < numInstances; i++) adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("foo" + i));
    assertTrue(poll(container, c -> c.getProcessorCount() > 19));
    Thread.sleep(100);
    assertEquals("number of MP instances", 20, container.getProcessorCount());
    try (NodeManager nman = addOutputCatchStage()) {
        container.outputPass();
        assertTrue(poll(outputMessages, o -> o.size() > 19));
        Thread.sleep(100);
        assertEquals(20, outputMessages.size());
    }
}
Also used : Arrays(java.util.Arrays) Node(net.dempsy.config.Node) NodeManager(net.dempsy.NodeManager) SystemPropertyManager(net.dempsy.utils.test.SystemPropertyManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) After(org.junit.After) Parameterized(org.junit.runners.Parameterized) MessageKey(net.dempsy.lifecycle.annotation.MessageKey) MessageHandler(net.dempsy.lifecycle.annotation.MessageHandler) Collection(java.util.Collection) Functional.uncheck(net.dempsy.util.Functional.uncheck) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Activation(net.dempsy.lifecycle.annotation.Activation) KeyExtractor(net.dempsy.lifecycle.annotation.utils.KeyExtractor) LockingContainer(net.dempsy.container.locking.LockingContainer) OutputMessage(net.dempsy.container.mocks.OutputMessage) Output(net.dempsy.lifecycle.annotation.Output) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Adaptor(net.dempsy.messages.Adaptor) AccessUtil.canReach(net.dempsy.AccessUtil.canReach) Start(net.dempsy.lifecycle.annotation.Start) Assert.assertFalse(org.junit.Assert.assertFalse) Evictable(net.dempsy.lifecycle.annotation.Evictable) MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) AccessUtil.getRouter(net.dempsy.AccessUtil.getRouter) NonLockingContainer(net.dempsy.container.nonlocking.NonLockingContainer) Mp(net.dempsy.lifecycle.annotation.Mp) BlockingQueueReceiver(net.dempsy.transport.blockingqueue.BlockingQueueReceiver) NonLockingAltContainer(net.dempsy.container.altnonlocking.NonLockingAltContainer) MessageType(net.dempsy.lifecycle.annotation.MessageType) Dispatcher(net.dempsy.messages.Dispatcher) KeyedMessageWithType(net.dempsy.messages.KeyedMessageWithType) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DempsyException(net.dempsy.DempsyException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) BasicNodeStatsCollector(net.dempsy.monitoring.basic.BasicNodeStatsCollector) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClusterId(net.dempsy.config.ClusterId) Before(org.junit.Before) LocalClusterSessionFactory(net.dempsy.cluster.local.LocalClusterSessionFactory) Functional.recheck(net.dempsy.util.Functional.recheck) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) KeyedMessage(net.dempsy.messages.KeyedMessage) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Passivation(net.dempsy.lifecycle.annotation.Passivation) AtomicLong(java.util.concurrent.atomic.AtomicLong) ClusterStatsCollector(net.dempsy.monitoring.ClusterStatsCollector) ConditionPoll.poll(net.dempsy.utils.test.ConditionPoll.poll) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) NodeManager(net.dempsy.NodeManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Test(org.junit.Test)

Example 5 with ContainerTestMessage

use of net.dempsy.container.mocks.ContainerTestMessage in project Dempsy by Dempsy.

the class TestContainer method testEvictCollisionWithBlocking.

@Test
public void testEvictCollisionWithBlocking() throws Throwable {
    final TestProcessor mp = createAndGet("foo");
    // now we're going to cause the passivate to be held up.
    mp.blockPassivate = new CountDownLatch(1);
    // allow eviction
    mp.evict.set(true);
    // now kick off the evict in a separate thread since we expect it to hang
    // until the mp becomes unstuck.
    // this will allow us to see the evict pass complete
    final AtomicBoolean evictIsComplete = new AtomicBoolean(false);
    final Thread thread = new Thread(new Runnable() {

        @Override
        public void run() {
            container.evict();
            evictIsComplete.set(true);
        }
    });
    thread.start();
    // let it get going.
    Thread.sleep(500);
    // check to see we're hung.
    assertFalse(evictIsComplete.get());
    final ClusterMetricGetters sc = (ClusterMetricGetters) statsCollector;
    assertEquals(0, sc.getMessageCollisionCount());
    // sending it a message will now cause it to have the collision tick up
    final TestAdaptor adaptor = context.getBean(TestAdaptor.class);
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("foo"));
    // give it some time.
    Thread.sleep(100);
    // make sure there's no collision
    assertEquals(0, sc.getMessageCollisionCount());
    // make sure no message got handled
    // 1 is the initial invocation that caused the instantiation.
    assertEquals(1, mp.invocationCount);
    // now let the evict finish
    mp.blockPassivate.countDown();
    // wait until the eviction completes
    assertTrue(poll(evictIsComplete, o -> o.get()));
    // Once the poll finishes a new Mp is instantiated and handling messages.
    assertTrue(poll(cache, c -> c.get("foo") != null));
    final TestProcessor mp2 = cache.get("foo");
    assertNotNull("MP not associated with expected key", mp);
    // invocationCount should be 1 from the initial invocation that caused the clone, and no more
    assertEquals(1, mp.invocationCount);
    assertEquals(1, mp2.invocationCount);
    assertTrue(mp != mp2);
    // send a message that should go through
    adaptor.dispatcher.dispatchAnnotated(new ContainerTestMessage("foo"));
    assertTrue(poll(o -> mp2.invocationCount > 1));
    Thread.sleep(100);
    assertEquals(1, mp.invocationCount);
    assertEquals(2, mp2.invocationCount);
}
Also used : Arrays(java.util.Arrays) Node(net.dempsy.config.Node) NodeManager(net.dempsy.NodeManager) SystemPropertyManager(net.dempsy.utils.test.SystemPropertyManager) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) After(org.junit.After) Parameterized(org.junit.runners.Parameterized) MessageKey(net.dempsy.lifecycle.annotation.MessageKey) MessageHandler(net.dempsy.lifecycle.annotation.MessageHandler) Collection(java.util.Collection) Functional.uncheck(net.dempsy.util.Functional.uncheck) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) Activation(net.dempsy.lifecycle.annotation.Activation) KeyExtractor(net.dempsy.lifecycle.annotation.utils.KeyExtractor) LockingContainer(net.dempsy.container.locking.LockingContainer) OutputMessage(net.dempsy.container.mocks.OutputMessage) Output(net.dempsy.lifecycle.annotation.Output) ArrayBlockingQueue(java.util.concurrent.ArrayBlockingQueue) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) Adaptor(net.dempsy.messages.Adaptor) AccessUtil.canReach(net.dempsy.AccessUtil.canReach) Start(net.dempsy.lifecycle.annotation.Start) Assert.assertFalse(org.junit.Assert.assertFalse) Evictable(net.dempsy.lifecycle.annotation.Evictable) MessageProcessor(net.dempsy.lifecycle.annotation.MessageProcessor) AccessUtil.getRouter(net.dempsy.AccessUtil.getRouter) NonLockingContainer(net.dempsy.container.nonlocking.NonLockingContainer) Mp(net.dempsy.lifecycle.annotation.Mp) BlockingQueueReceiver(net.dempsy.transport.blockingqueue.BlockingQueueReceiver) NonLockingAltContainer(net.dempsy.container.altnonlocking.NonLockingAltContainer) MessageType(net.dempsy.lifecycle.annotation.MessageType) Dispatcher(net.dempsy.messages.Dispatcher) KeyedMessageWithType(net.dempsy.messages.KeyedMessageWithType) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) DempsyException(net.dempsy.DempsyException) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) BasicNodeStatsCollector(net.dempsy.monitoring.basic.BasicNodeStatsCollector) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClusterId(net.dempsy.config.ClusterId) Before(org.junit.Before) LocalClusterSessionFactory(net.dempsy.cluster.local.LocalClusterSessionFactory) Functional.recheck(net.dempsy.util.Functional.recheck) Iterator(java.util.Iterator) Assert.assertNotNull(org.junit.Assert.assertNotNull) KeyedMessage(net.dempsy.messages.KeyedMessage) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Passivation(net.dempsy.lifecycle.annotation.Passivation) AtomicLong(java.util.concurrent.atomic.AtomicLong) ClusterStatsCollector(net.dempsy.monitoring.ClusterStatsCollector) ConditionPoll.poll(net.dempsy.utils.test.ConditionPoll.poll) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ContainerTestMessage(net.dempsy.container.mocks.ContainerTestMessage) CountDownLatch(java.util.concurrent.CountDownLatch) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)9 Arrays (java.util.Arrays)9 Collection (java.util.Collection)9 Collections (java.util.Collections)9 HashMap (java.util.HashMap)9 HashSet (java.util.HashSet)9 Iterator (java.util.Iterator)9 List (java.util.List)9 Map (java.util.Map)9 Set (java.util.Set)9 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)9 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)9 CountDownLatch (java.util.concurrent.CountDownLatch)9 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)9 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)9 AtomicLong (java.util.concurrent.atomic.AtomicLong)9 AccessUtil.canReach (net.dempsy.AccessUtil.canReach)9 AccessUtil.getRouter (net.dempsy.AccessUtil.getRouter)9 DempsyException (net.dempsy.DempsyException)9 NodeManager (net.dempsy.NodeManager)9