Class YieldingAccumulator<AccumulatedType,InType>
- java.lang.Object
-
- org.apache.druid.java.util.common.guava.YieldingAccumulator<AccumulatedType,InType>
-
- Direct Known Subclasses:
DelegatingYieldingAccumulator
,FilteringYieldingAccumulator
,MappingYieldingAccumulator
public abstract class YieldingAccumulator<AccumulatedType,InType> extends Object
A YieldingAccumulator is used along with a Yielder in order to replicate continuations in Java. I'm still not sure this is such a great idea, but it's there. We shall see. The accumulated has its accumulate() method called and has the option of "yielding" its response by calling yield() before returning as response. If it chooses not to yield its response, then it expects to get called again with the next value and the value it just returned.
-
-
Constructor Summary
Constructors Constructor Description YieldingAccumulator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AccumulatedType
accumulate(AccumulatedType accumulated, InType in)
void
reset()
void
yield()
boolean
yielded()
-
-
-
Method Detail
-
yield
public void yield()
-
yielded
public boolean yielded()
-
reset
public void reset()
-
accumulate
public abstract AccumulatedType accumulate(AccumulatedType accumulated, InType in)
-
-