use of com.googlecode.jmxtrans.model.OutputWriter in project jmxtrans by jmxtrans.
the class JmxTransformer method stopWriterAndClearMasterServerList.
/**
* Shut down the output writers and clear the master server list
* Used both during shutdown and when re-reading config files
*/
private void stopWriterAndClearMasterServerList() {
for (Server server : this.masterServersList) {
for (OutputWriter writer : server.getOutputWriters()) {
try {
writer.close();
} catch (LifecycleException ex) {
log.error("Eror stopping writer: {}", writer);
}
}
for (Query query : server.getQueries()) {
for (OutputWriter writer : query.getOutputWriterInstances()) {
try {
writer.close();
log.debug("Stopped writer: {} for query: {}", writer, query);
} catch (LifecycleException ex) {
log.error("Error stopping writer: {} for query: {}", writer, query, ex);
}
}
}
}
this.masterServersList = ImmutableList.of();
}
use of com.googlecode.jmxtrans.model.OutputWriter in project jmxtrans by jmxtrans.
the class JmxTransformer method validateSetup.
private void validateSetup(Server server, Query query) throws ValidationException {
for (OutputWriter w : query.getOutputWriterInstances()) {
injector.injectMembers(w);
w.validateSetup(server, query);
}
}
Aggregations