T - Unguarded typepublic final class ParsedUnguardedWithMolResultHandler<T extends Serializable> extends Object implements ResultHandler<Object,ParsedUnguardedWithMolResult<T>>, ErrorHandler<Object>
Descriptors with structur sources.
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 |
|---|
ParsedUnguardedWithMolResultHandler(int pagesize,
boolean storeIds,
boolean failOnError,
String mmsExportOptsOrNull,
List<MasterStorages.MasterStorageBuilder> additionalPropertiesOrNull)
Create new handler.
|
| Modifier and Type | Method and Description |
|---|---|
long |
error(int sourceIndex,
Object s,
Throwable t)
Process error report.
|
Optional<List<MasterStorage>> |
getAdditionalProperties()
Additional built properties.
|
MasterStringStorage |
getIds()
Get collected IDs.
|
IndexProjector |
getIndexProjector()
Get ID projection for pages.
|
MasterMoleculeStorage |
getMms()
Get built MMS.
|
ImmutableList<ImmutableList<T>> |
getPages()
Get collected pages.
|
boolean |
isIdCollected()
Check if IDs were collected.
|
long |
result(int sourceIndex,
Object s,
ParsedUnguardedWithMolResult<T> t)
Report process result.
|
public ParsedUnguardedWithMolResultHandler(int pagesize,
boolean storeIds,
boolean failOnError,
String mmsExportOptsOrNull,
List<MasterStorages.MasterStorageBuilder> additionalPropertiesOrNull)
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 usedmmsExportOptsOrNull - Export options to pass to the underlying MMSadditionalPropertiesOrNull - Builders for additional properties. Values from
ParsedUnguardedWithMolResult.getPropsOrNull() will be passed to each contained builderpublic 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,
ParsedUnguardedWithMolResult<T> t)
ResultHandlerresult in interface ResultHandler<Object,ParsedUnguardedWithMolResult<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()
public MasterMoleculeStorage getMms()
public Optional<List<MasterStorage>> getAdditionalProperties()