All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cg.eventbus.hook.FetcherHook Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package org.cg.eventbus.hook;

import org.apache.log4j.Logger;

import kafka.javaapi.consumer.ConsumerConnector;

/**
 *  Hook for event bus Fetcher.
 * @author liang.li
 *
 */
public class FetcherHook extends Thread{
	
	private static final Logger LOG = Logger.getLogger(FetcherHook.class);
	
	private ConsumerConnector connector;

	public FetcherHook(ConsumerConnector connector) {
		this.connector = connector;
	}
	
	public void run() {
		connector.shutdown();
		LOG.info("Hook job is triggered. Kafka Consumer Connector is shutdown.");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy