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

com.github.panhongan.util.kafka.KafkaExporterShutdownHook Maven / Gradle / Ivy

There is a newer version: 0.1.8
Show newest version
package com.github.panhongan.util.kafka;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class KafkaExporterShutdownHook extends Thread {
	
	private static final Logger logger = LoggerFactory.getLogger(KafkaExporterShutdownHook.class);
	
	private static final String CLASS_NAME = KafkaExporterShutdownHook.class.getSimpleName();
	
	private KafkaExporter service = null;
	
	public KafkaExporterShutdownHook(KafkaExporter service) {
		this.service = service;
	}

	@Override
	public void run() {
		if (service != null) {
			service.uninit();
		}
		
		logger.info("{} is trigged", CLASS_NAME);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy