Package com.palantir.common.base
Class BatchingVisitableFromIterable<T>
- java.lang.Object
-
- com.palantir.common.base.AbstractBatchingVisitable<T>
-
- com.palantir.common.base.BatchingVisitableFromIterable<T>
-
- All Implemented Interfaces:
BatchingVisitable<T>
public class BatchingVisitableFromIterable<T> extends AbstractBatchingVisitable<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.palantir.common.base.AbstractBatchingVisitable
AbstractBatchingVisitable.ConsistentVisitor<T,K extends Exception>
-
-
Constructor Summary
Constructors Constructor Description BatchingVisitableFromIterable(Iterable<? extends T> iterable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <K extends Exception>
voidbatchAcceptSizeHint(int batchSize, AbstractBatchingVisitable.ConsistentVisitor<T,K> v)
The batch size passed to this method is purely a hint.static <T> BatchingVisitable<T>
create(Iterable<? extends T> iterable)
static <T> BatchingVisitable<T>
create(Iterator<? extends T> iterator)
This creates a one time use visitable.-
Methods inherited from class com.palantir.common.base.AbstractBatchingVisitable
batchAccept
-
-
-
-
Method Detail
-
create
public static <T> BatchingVisitable<T> create(Iterable<? extends T> iterable)
-
create
public static <T> BatchingVisitable<T> create(Iterator<? extends T> iterator)
This creates a one time use visitable. The only proper use of the returned class is to call accept on it directly and never reference it again.
-
batchAcceptSizeHint
public <K extends Exception> void batchAcceptSizeHint(int batchSize, AbstractBatchingVisitable.ConsistentVisitor<T,K> v) throws K extends Exception
Description copied from class:AbstractBatchingVisitable
The batch size passed to this method is purely a hint. The underlying impl can batch up pages however it wants and pass them to the visitor. Batch size consistency is already taken care of by theAbstractBatchingVisitable.ConsistentVisitor
.- Specified by:
batchAcceptSizeHint
in classAbstractBatchingVisitable<T>
- Throws:
K extends Exception
-
-