public interface ICollectorStopper
Responsible for shutting down a Collector upon explicit invocation
of fireStopRequest()
or when specific conditions are met.
See concrete implementation for what those conditions could be.
A stop request can typically be triggered from another JVM (see concrete implementation details).
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys resources allocated with this stopper.
|
boolean |
fireStopRequest()
Stops a currently running Collector.
|
void |
listenForStopRequest(Collector collector)
Setup and/or start the stopper, which can be terminated
by invoking stop in the same or different JVM (see concrete
implementation for details).
|
void listenForStopRequest(Collector collector) throws CollectorStopperException
collector
- the CollectorCollectorStopperException
- could not setup Collector stopper.void destroy() throws CollectorStopperException
CollectorStopperException
- could not destroy Collector stopper.boolean fireStopRequest() throws CollectorStopperException
true
if the Collector was running and successfully
stopped or false
if the Collector was not running.CollectorStopperException
- could not stop running Collector.Copyright © 2014–2023 Norconex Inc.. All rights reserved.