Revert "INT-1119: remove reaper attributes from aggregator and resequencer"

This reverts commit 15fde633db17d982daf7e2cf6b5d657b1e0a87f9.
This commit is contained in:
David Syer
2010-05-05 15:16:59 +00:00
parent 3825e6e758
commit 97436b3f3b
11 changed files with 66 additions and 6 deletions

View File

@@ -69,6 +69,8 @@ public class AggregatorTests {
@Test
public void testShouldNotSendPartialResultOnTimeoutByDefault() throws InterruptedException {
QueueChannel discardChannel = new QueueChannel();
this.aggregator.setTimeout(50);
this.aggregator.setReaperInterval(10);
this.aggregator.setDiscardChannel(discardChannel);
QueueChannel replyChannel = new QueueChannel();
Message<?> message = createMessage(3, "ABC", 2, 1, replyChannel, null);

View File

@@ -133,6 +133,7 @@ public class ResequencerTests {
this.resequencer.setSendPartialResultOnTimeout(false);
this.processor.setReleasePartialSequences(false);
this.resequencer.setDiscardChannel(discardChannel);
this.resequencer.setTimeout(90000);
this.resequencer.handleMessage(message1);
this.resequencer.handleMessage(message2);
assertEquals(1, store.expireMessageGroups(-10000));
@@ -161,6 +162,7 @@ public class ResequencerTests {
this.resequencer.setSendPartialResultOnTimeout(false);
this.processor.setReleasePartialSequences(false);
this.resequencer.setDiscardChannel(discardChannel);
this.resequencer.setTimeout(90000);
this.resequencer.handleMessage(message1);
this.resequencer.handleMessage(message2);
// this.resequencer.discardBarrier(this.resequencer.barriers.get("ABC"));
@@ -179,6 +181,7 @@ public class ResequencerTests {
this.resequencer.setSendPartialResultOnTimeout(false);
this.processor.setReleasePartialSequences(false);
this.resequencer.setDiscardChannel(discardChannel);
this.resequencer.setTimeout(90000);
this.resequencer.handleMessage(message1);
// this.resequencer.discardBarrier(this.resequencer.barriers.get("ABC"));
Message<?> reply1 = discardChannel.receive(0);

View File

@@ -27,7 +27,10 @@
release-strategy="releaseStrategy"
correlation-strategy="correlationStrategy"
send-timeout="86420000"
send-partial-result-on-timeout="true"/>
send-partial-result-on-timeout="true"
reaper-interval="135"
tracked-correlation-id-capacity="99"
timeout="42"/>
<channel id="aggregatorWithReferenceAndMethodInput"/>
<aggregator id="aggregatorWithReferenceAndMethod"

View File

@@ -40,8 +40,8 @@ public class TestAnnotatedEndpointWithCustomizedAggregator {
inputChannel = "inputChannel",
outputChannel = "outputChannel",
discardChannel = "discardChannel",
sendPartialResultsOnTimeout = true,
sendTimeout = 98765432)
reaperInterval = 1234, sendPartialResultsOnTimeout = true,
sendTimeout = 98765432, timeout = 4567890, trackedCorrelationIdCapacity = 42)
public Message<?> aggregatingMethod(List<Message<?>> messages) {
List<Message<?>> sortableList = new ArrayList<Message<?>>(messages);
Collections.sort(sortableList, new MessageSequenceComparator());

View File

@@ -31,6 +31,9 @@
discard-channel="discardChannel"
send-timeout="86420000"
send-partial-result-on-timeout="true"
reaper-interval="135"
tracked-correlation-id-capacity="99"
timeout="42"
release-partial-sequences="false"/>
<resequencer id="resequencerWithCorrelationStrategyRefOnly"