@Override public void run() { TradeTransactionEventTranslator translator = new TradeTransactionEventTranslator(); for (int i = 0; i < LOOP; i++) { disruptor.publishEvent(translator); } latch.countDown(); }
private void enqueueLogMessageInfo(Info info) { // LOG4J2-639: catch NPE if disruptor field was set to null after our check above try { // Note: do NOT use the temp variable above! // That could result in adding a log event to the disruptor after it was shut down, // which could cause the publishEvent method to hang and never return. disruptor.publishEvent(info.translator); } catch (final NullPointerException npe) { LOGGER.fatal("Ignoring log event after log4j was shut down."); } }