T
- Unguarded typepublic final class ParsedUnguardedResultHandler<T extends Serializable> extends Object implements ResultHandler<Object,ParsedUnguardedResult<T>>, ErrorHandler<Object>
Descriptor
s.
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)
ErrorHandler
error
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)
ResultHandler
result
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()