INT-1141 Improve on how MessageHandlers are stored

INT-1141 polished code

INT-1141 added tests

INT-1141 improved how iterator is obtaind from OrderAwareLikedHashSet

INT-1141 polishing

INT-1141 stashed commit with List-based collection and performance tests

INT-1141 improved OrderedAwareLinkedHashSet

INT-1141 polishing

INT-1141, INT-2627 improved LoadBalancingStrategy and
RoundRobinLoadBalancingStrategy to obtain handler's iterator faster

INT-1141 improved getHandlerIterator method to ensure that it only executes reordering logic if there are more then one handler

INT-1141 simplified OrderedAwareLinkedHashSet to not to extend from LinkedHashSet

INT-1141
changed OrderedAwareLinkedHashSet to OrderedAwareCopyOnWriteArraySetTests, imporoved array creation in RoundRobinLoadBalancingStrategy

INT-1141 polished failing tests and RoundRobinLoadBalancingStrategy. Removed 'transient' from OrderedAwareCopyOnWriteArraySet
This commit is contained in:
Oleg Zhurakousky
2012-06-07 12:18:37 -04:00
committed by Gary Russell
parent 7dd1255351
commit 2b49c66f64
12 changed files with 212 additions and 133 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ public class FtpOutboundChannelAdapterParserTests {
@Test
public void testFtpOutboundChannelAdapterComplete() throws Exception{
ApplicationContext ac =
ApplicationContext ac =
new ClassPathXmlApplicationContext("FtpOutboundChannelAdapterParserTests-context.xml", this.getClass());
Object consumer = ac.getBean("ftpOutbound");
assertTrue(consumer instanceof EventDrivenConsumer);
@@ -70,7 +70,7 @@ public class FtpOutboundChannelAdapterParserTests {
assertEquals("localhost", TestUtils.getPropertyValue(sessionFactory, "host"));
assertEquals(22, TestUtils.getPropertyValue(sessionFactory, "port"));
assertEquals(23, TestUtils.getPropertyValue(handler, "order"));
//verify subscription order
//verify subscription order
@SuppressWarnings("unchecked")
Set<MessageHandler> handlers = (Set<MessageHandler>) TestUtils
.getPropertyValue(
@@ -80,7 +80,7 @@ public class FtpOutboundChannelAdapterParserTests {
assertSame(TestUtils.getPropertyValue(ac.getBean("ftpOutbound2"), "handler"), iterator.next());
assertSame(handler, iterator.next());
}
@Test(expected=BeanCreationException.class)
public void testFailWithEmptyRfsAndAcdTrue() throws Exception{
new ClassPathXmlApplicationContext("FtpOutboundChannelAdapterParserTests-fail.xml", this.getClass());