T - Unguarded typepublic final class ParsedUnguardedResultHandler<T extends Serializable> extends Object implements ResultHandler<Object,ParsedUnguardedResult<T>>, ErrorHandler<Object>
Descriptors.
Note that callback methods are invoked from the main thread in the order of inputs. Note that source type is set to
Object.| Constructor and Description |
|---|
ParsedUnguardedResultHandler(int pagesize,
boolean storeIds,
boolean failOnError)
Create new handler.
|
| Modifier and Type | Method and Description |
|---|---|
long |
error(int sourceIndex,
Object s,
Throwable t)
Process error report.
|
MasterStringStorage |
getIds()
Get collected IDs.
|
IndexProjector |
getIndexProjector()
Get ID projection for pages.
|
ImmutableList<ImmutableList<T>> |
getPages()
Get collected pages.
|
boolean |
isIdCollected()
Check if IDs were collected.
|
long |
result(int sourceIndex,
Object s,
ParsedUnguardedResult<T> t)
Report process result.
|
public ParsedUnguardedResultHandler(int pagesize,
boolean storeIds,
boolean failOnError)
pagesize - Page size to usestoreIds - When true IDs are stored;failOnError - If true a reported error will cause an exception in results processing; otherwise
a missing ID/skip in index projector will be usedpublic long error(int sourceIndex,
Object s,
Throwable t)
ErrorHandlererror in interface ErrorHandler<Object>sourceIndex - Index (0-based) of the source structure (input) provoked this errors - Source caused the reported errort - The error thrownpublic long result(int sourceIndex,
Object s,
ParsedUnguardedResult<T> t)
ResultHandlerresult in interface ResultHandler<Object,ParsedUnguardedResult<T extends Serializable>>sourceIndex - 0-based index of the processed sources - The processed sourcet - The resultpublic MasterStringStorage getIds()
IllegalStateException - when no IDs were collectedpublic boolean isIdCollected()
true when IDs were collectedpublic ImmutableList<ImmutableList<T>> getPages()
public IndexProjector getIndexProjector()