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

org.metricssampler.daemon.commands.DisableSamplerControlCommand Maven / Gradle / Ivy

The newest version!
package org.metricssampler.daemon.commands;

import org.metricssampler.resources.SamplerTask;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Map;

public class DisableSamplerControlCommand extends MapEntryCommand {
	protected DisableSamplerControlCommand(final BufferedReader reader, final BufferedWriter writer, final Map tasks, final String name) {
		super(reader, writer, tasks, name);
	}

	@Override
	protected void processMatchingItem(final SamplerTask item, final BufferedWriter writer) throws IOException {
		logger.info("Disabling sampler \"{}\"", item.getName());
		item.disable();
		respond("Sampler \"" + item.getName() + "\" disabled");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy