Interface ConcurrentDocumentFetcherScanner
-
- All Known Subinterfaces:
ConcurrentScannerThrottlingAware
public interface ConcurrentDocumentFetcherScanner
This interface is implemented by the scanner if it wants to take advantage of the platform's concurrent scanner support. it allows the user to configure different aspects (e.g pool size and timeout values) of concurrent scanning. It also allow the connector framework to pass the scanner a ConcurrentProvider object the scanner will use to queueDocumentFetchRequest
requests. It will also allow the connector framework to stop the scanner through thestop()
call.If the scanner implements this interface it cannot feed document directly from the publisher, it will have to use the
ConcurrencyProvider
. Other publisher method such as delete will still be allowed.
-
-
Field Summary
Fields Modifier and Type Field Description static long
FetcherTimeoutDefault
static int
ThreadpoolSizeDefault
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default long
getFetcherTimeout()
Gets a timeout for the fetcher.default int
getThreadpoolSize()
Gets the number of threads to use by fetch tasks.void
setConcurrencyProvider(ConcurrencyProvider concurrencyProvider)
The scanner will use the concurrency provider to queue content fetchers.default void
setFetcherTimeout(long millis)
Sets a timeout for the fetcher.default void
setThreadpoolSize(int queueSize)
Sets the number of threads to use by fetch tasks.void
stop()
The stop call implementation should trigger the scanner to stop queuing new tasks and return from thestart
method
-
-
-
Field Detail
-
FetcherTimeoutDefault
static final long FetcherTimeoutDefault
- See Also:
- Constant Field Values
-
ThreadpoolSizeDefault
static final int ThreadpoolSizeDefault
- See Also:
- Constant Field Values
-
-
Method Detail
-
setFetcherTimeout
default void setFetcherTimeout(long millis)
Sets a timeout for the fetcher. The fetcher will fail if couldn't get the content before the timeout expired- Parameters:
millis
-
-
getFetcherTimeout
default long getFetcherTimeout()
Gets a timeout for the fetcher. The fetcher will fail if couldn't get the content before the timeout expired- Parameters:
millis
-- Returns:
-
setThreadpoolSize
default void setThreadpoolSize(int queueSize)
Sets the number of threads to use by fetch tasks.- Parameters:
queueSize
-
-
getThreadpoolSize
default int getThreadpoolSize()
Gets the number of threads to use by fetch tasks.- Returns:
-
setConcurrencyProvider
void setConcurrencyProvider(ConcurrencyProvider concurrencyProvider)
The scanner will use the concurrency provider to queue content fetchers.- Parameters:
concurrencyProvider
-
-
stop
void stop()
The stop call implementation should trigger the scanner to stop queuing new tasks and return from thestart
method
-
-