Builder object for CheckpointCloseableIterableImpl
Public Constructor Summary
CheckpointCloseableIterableImpl.Builder(CheckpointCloseableIterable<T> delegate)
Constructs a builder that clones the given
CheckpointCloseableIterable . |
|
CheckpointCloseableIterableImpl.Builder(CloseableIterable<T> delegate)
Constructs a
CheckpointCloseableIterableImpl.Builder that wraps given CloseableIterable
|
|
CheckpointCloseableIterableImpl.Builder(Iterator<T> delegate)
Constructs a
CheckpointCloseableIterableImpl.Builder that wraps given Iterator
|
|
CheckpointCloseableIterableImpl.Builder(Collection<T> operations)
Constructs a
CheckpointCloseableIterableImpl.Builder that wraps given collection. |
Public Method Summary
CheckpointCloseableIterableImpl<T> |
build()
Builds an instance of
CheckpointCloseableIterableImpl |
Builder<T> |
setCheckpoint(byte[] checkpoint)
Sets checkpoint to be committed after processing of all items returned in current iterable.
|
Builder<T> |
setCheckpoint(Supplier<byte[]> checkpoint)
Sets
Supplier for checkpoint to be committed after processing of all items. |
Builder<T> |
setHasMore(Supplier<Boolean> hasMore)
|
Builder<T> |
setHasMore(boolean hasMore)
Sets flag to indicate if more items are available for processing beyond items returned in
current
Iterable . |
Inherited Method Summary
Public Constructors
public CheckpointCloseableIterableImpl.Builder (CheckpointCloseableIterable<T> delegate)
Constructs a builder that clones the given CheckpointCloseableIterable
. This
constructor should rarely be needed, but exists to avoid hard-to-debug errors if the CloseableIterable
overload were used instead, since that would ignore the checkpoint and
more items flag.
Changes to delegate
are reflected in the constructed CheckpointCloseableIterable
by default, unless the setCheckpoint(byte[])
or setHasMore(boolean)
methods are called on this builder.
Parameters
delegate |
---|
public CheckpointCloseableIterableImpl.Builder (CloseableIterable<T> delegate)
Constructs a CheckpointCloseableIterableImpl.Builder
that wraps given CloseableIterable
Parameters
delegate |
---|
public CheckpointCloseableIterableImpl.Builder (Iterator<T> delegate)
Constructs a CheckpointCloseableIterableImpl.Builder
that wraps given Iterator
Parameters
delegate |
---|
public CheckpointCloseableIterableImpl.Builder (Collection<T> operations)
Constructs a CheckpointCloseableIterableImpl.Builder
that wraps given collection.
Parameters
operations |
---|
Public Methods
public CheckpointCloseableIterableImpl<T> build ()
Builds an instance of CheckpointCloseableIterableImpl
public Builder<T> setCheckpoint (byte[] checkpoint)
Sets checkpoint to be committed after processing of all items returned in current iterable.
Parameters
checkpoint | to be committed after processing of all items. |
---|