C
- should always be <C extends IItemConsumer<C>>
because we want to be able to
merge multiple consumers of the same typepublic interface IItemConsumer<C>
Large data sets may be divided into multiple parts. Each part can then be processed in parallel by a separate IItemConsumer instance and when they are done the end result can be gotten by merging the consumers.
Note that there is no defined way to extract the calculated value. This can be added by also
implementing the IValueBuilder
interface.
Modifier and Type | Method and Description |
---|---|
void |
consume(IItem item)
Consumes another item.
|
C |
merge(C other)
Merges this object with the supplied object.
|
void consume(IItem item)
C merge(C other)
other
- another instance to merge withCopyright © 2019. All rights reserved.