public abstract class PipesIterator extends ConfigBase implements Callable<Integer>, Iterable<FetchEmitTuple>, Initializable
enqueue().
If there's an exception in the enqueuing thread, this will throw
a RuntimeException. It will throw an IllegalStateException if
next() is called after hasNext() has returned false.| Modifier and Type | Field and Description |
|---|---|
static FetchEmitTuple |
COMPLETED_SEMAPHORE |
static long |
DEFAULT_MAX_WAIT_MS |
static int |
DEFAULT_QUEUE_SIZE |
| Constructor and Description |
|---|
PipesIterator() |
| Modifier and Type | Method and Description |
|---|---|
static PipesIterator |
build(Path tikaConfigFile) |
Integer |
call() |
void |
checkInitialization(InitializableProblemHandler problemHandler) |
protected abstract void |
enqueue() |
String |
getEmitterName() |
String |
getFetcherName() |
protected HandlerConfig |
getHandlerConfig() |
FetchEmitTuple.ON_PARSE_EXCEPTION |
getOnParseException() |
void |
initialize(Map<String,Param> params) |
Iterator<FetchEmitTuple> |
iterator() |
void |
setEmitterName(String emitterName) |
void |
setFetcherName(String fetcherName) |
void |
setHandlerType(String handlerType) |
void |
setMaxWaitMs(long maxWaitMs) |
void |
setOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION onParseException) |
void |
setOnParseException(String onParseException) |
void |
setQueueSize(int queueSize) |
void |
setWriteLimit(int writeLimit) |
protected void |
tryToAdd(FetchEmitTuple p) |
buildComposite, buildComposite, buildSingle, configure, handleSettingsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final long DEFAULT_MAX_WAIT_MS
public static final int DEFAULT_QUEUE_SIZE
public static final FetchEmitTuple COMPLETED_SEMAPHORE
public static PipesIterator build(Path tikaConfigFile) throws IOException, TikaConfigException
IOExceptionTikaConfigExceptionpublic String getFetcherName()
public String getEmitterName()
@Field public void setMaxWaitMs(long maxWaitMs)
@Field public void setQueueSize(int queueSize)
public FetchEmitTuple.ON_PARSE_EXCEPTION getOnParseException()
@Field public void setOnParseException(String onParseException) throws TikaConfigException
TikaConfigExceptionpublic void setOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION onParseException)
@Field public void setWriteLimit(int writeLimit)
protected HandlerConfig getHandlerConfig()
protected abstract void enqueue()
throws IOException,
TimeoutException,
InterruptedException
protected void tryToAdd(FetchEmitTuple p) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutExceptionpublic void initialize(Map<String,Param> params) throws TikaConfigException
initialize in interface Initializableparams - params to use for initializationTikaConfigExceptionpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization in interface InitializableproblemHandler - if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigExceptionpublic Iterator<FetchEmitTuple> iterator()
iterator in interface Iterable<FetchEmitTuple>Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.