CheckpointCloseableIterableImpl

public class CheckpointCloseableIterableImpl extends Object
implements CheckpointCloseableIterable<T>

CheckpointCloseableIterable implementation which supports lazy initialization of getCheckpoint() value and hasMore().

Nested Class Summary

Public Method Summary

void
close()
Performs any actions necessary to stop accessing the repository, such as closing the connection.
byte[]
getCheckpoint()
Get current checkpoint value.
boolean
hasMore()
Flag to indicate if more items are available to traverse beyond current set of items returned as part of Iterable.
Iterator<T>

Inherited Method Summary

boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
com.google.enterprise.cloudsearch.sdk.CheckpointCloseableIterable
abstract byte[]
getCheckpoint()
Get current checkpoint value.
abstract boolean
hasMore()
Flag to indicate if more items are available to traverse beyond current set of items returned as part of Iterable.
com.google.enterprise.cloudsearch.sdk.CloseableIterable
abstract void
close()
Performs any actions necessary to stop accessing the repository, such as closing the connection.
void
forEach(Consumer<? super T> arg0)
abstract Iterator<T>
iterator()
Spliterator<T>
spliterator()
abstract void
close()

Public Methods

public void close ()

Performs any actions necessary to stop accessing the repository, such as closing the connection.

public byte[] getCheckpoint ()

Get current checkpoint value. Framework is expected to call this method only after iterating through all objects available.

Returns
  • checkpoint value to save

public boolean hasMore ()

Flag to indicate if more items are available to traverse beyond current set of items returned as part of Iterable. Framework is expected to call this method only after iterating through all objects available.

Returns
  • True if more objects are available for processing after current batch. False if no more objects available for traversal.

public Iterator<T> iterator ()