public class StatusReporter extends Object implements Callable<IFileProcessorFutureResult>
sleepMillis
and log.info's a status report.Constructor and Description |
---|
StatusReporter(FileResourceCrawler crawler,
ConsumersManager consumersManager)
Initialize with the crawler and consumers
|
Modifier and Type | Method and Description |
---|---|
IFileProcessorFutureResult |
call()
Startup the reporter.
|
int |
getRoughCountExceptions()
This returns a rough (unsynchronized) count of caught/handled exceptions.
|
protected void |
report(String s)
Override for different behavior.
|
void |
setIsShuttingDown(boolean isShuttingDown)
Set whether the main process is in the process of shutting down.
|
void |
setSleepMillis(long sleepMillis)
Set the amount of time to sleep between reports.
|
void |
setStaleThresholdMillis(long staleThresholdMillis)
Set the amount of time in milliseconds to use as the threshold for determining
a stale parse.
|
public StatusReporter(FileResourceCrawler crawler, ConsumersManager consumersManager)
crawler
- crawler to ping at intervalsconsumersManager
- consumers to ping at intervalsprotected void report(String s)
s
- string to reportpublic IFileProcessorFutureResult call()
call
in interface Callable<IFileProcessorFutureResult>
public void setSleepMillis(long sleepMillis)
sleepMillis
- length to sleep btwn reports in millisecondspublic void setStaleThresholdMillis(long staleThresholdMillis)
staleThresholdMillis
- threshold for determining whether or not to report a stalepublic int getRoughCountExceptions()
public void setIsShuttingDown(boolean isShuttingDown)
isShuttingDown
- Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.