use of org.apache.flume.source.EventDrivenSourceRunner in project nifi by apache.
the class ExecuteFlumeSource method stopped.
@OnStopped
public void stopped() {
if (source instanceof PollableSource) {
source.stop();
} else {
EventDrivenSourceRunner runner = runnerRef.get();
if (runner != null) {
runner.stop();
runnerRef.compareAndSet(runner, null);
}
NifiSessionFactoryChannel eventDrivenSourceChannel = eventDrivenSourceChannelRef.get();
if (eventDrivenSourceChannel != null) {
eventDrivenSourceChannel.stop();
eventDrivenSourceChannelRef.compareAndSet(eventDrivenSourceChannel, null);
}
}
sessionFactoryRef.set(null);
}
Aggregations