@Override
public void doRun() {
LOG.debug("Checking for outputs to flush ...");
for (MessageOutput output : outputRegistry.getMessageOutputs()) {
if (output instanceof BatchedElasticSearchOutput) {
BatchedElasticSearchOutput batchedOutput = (BatchedElasticSearchOutput)output;
try {
LOG.debug("Flushing output <{}>", batchedOutput);
batchedOutput.flush();
} catch (Exception e) {
LOG.error("Caught exception while trying to flush output: {}", e);
}
}
}