Returns the names of the nodes still working on the crawl: those that
may still finish the documents they took for processing. A node that
left the cluster is not one of them. Implementations that track more
than membership also leave out a node that stopped sending news of
itself, or that is done with the step the crawl is running.
Documents taken by a node not listed may be given to another one.
Returns:
the working node names, empty if they cannot be told
isClustered
defaultbooleanisClustered()
Whether this cluster can have more than one node. When it cannot, no
other node may ever take over what this one is processing.
Convenience overload for tests and simple scenarios that do not
need to pre-register cache value types.
Parameters:
crawlerWorkDir - working directory
isClustered - whether running in clustered mode
startStopMonitoring
voidstartStopMonitoring()
Starts monitoring for stop signals. Should only be called by commands
that need to respond to stop requests (e.g., CrawlerCommand).
stop
voidstop()
Requests to stop the cluster. Does not wait.
stopLocally
defaultvoidstopLocally()
Stops the crawl pipelines running on this node, firing
CrawlerEvent.CRAWLER_STOP_REQUEST_BEGIN before and
CrawlerEvent.CRAWLER_STOP_REQUEST_END after. Every cluster
implementation must stop a node through this method, whatever the way
the stop reached the node, so listeners are told on every node and in
every cluster mode.