From http://static.springsource.org/sprin...le/#aggregator

I have a couple of questions:

1. PojoCorrelationStrategy groups numbers based on the remainder.

a. Where does it store these numbers?

b. If there are five incoming numbers: 5, 5, 10, 10, 5

we would have two groups of numbers:

First group: 5 (5 %10 = 5)

Second group: 0 (10 % 10 = 0)

Who uses theses results: 5 and 0?

2. PojoReleaseStrategy releases only when the sum of the numbers on the list are greater than max value.

a. Where is max value stored? Private field?

b. Where is the list coming? Is it coming from the channel or coming from the PojoCorrelationStrategy?

c. What's the relation between PojoCorrelationStrategy and PojoReleaseStrategy. I know the definition but what doesn't make sense is how are their returned values interconnected.

3. PojoAggregator

a. It gets it values based on the input channel. But the values it will only accept are the ones that are correlated by the PojoCorrelationStrategy. Is that right?

b. This means all numbers that have remainder of 1 (for example) will be aggregated by the PojoAggregator. What happens to numbers that have remainder of 2, 3, and so forth?

Thank you.

Code:

public class PojoAggregator { public Long add(List<Long> results) { long total = 0l; for (long partialResult: results) { total += partialResult; } return total; } } public class PojoReleaseStrategy { ... public boolean canRelease(List<Long> numbers) { int sum = 0; for (long number: numbers) { sum += number; } return sum >= maxValue; } } public class PojoCorrelationStrategy { ... public Long groupNumbersByLastDigit(Long number) { return number % 10; } }

1. PojoCorrelationStrategy groups numbers based on the remainder.

a. Where does it store these numbers?

b. If there are five incoming numbers: 5, 5, 10, 10, 5

we would have two groups of numbers:

First group: 5 (5 %10 = 5)

Second group: 0 (10 % 10 = 0)

Who uses theses results: 5 and 0?

2. PojoReleaseStrategy releases only when the sum of the numbers on the list are greater than max value.

a. Where is max value stored? Private field?

b. Where is the list coming? Is it coming from the channel or coming from the PojoCorrelationStrategy?

c. What's the relation between PojoCorrelationStrategy and PojoReleaseStrategy. I know the definition but what doesn't make sense is how are their returned values interconnected.

3. PojoAggregator

a. It gets it values based on the input channel. But the values it will only accept are the ones that are correlated by the PojoCorrelationStrategy. Is that right?

b. This means all numbers that have remainder of 1 (for example) will be aggregated by the PojoAggregator. What happens to numbers that have remainder of 2, 3, and so forth?

Thank you.

## Comment