/** * {@inheritDoc} * If the execution is rejected, the rejection count is increased and a failure is logged. * The event callback is not re-executed. * * @param callback the callback to execute on a random event thread */ @Override public void executeEventCallback(Runnable callback) { if (!nodeEngine.isRunning()) { return; } try { eventExecutor.execute(callback); } catch (RejectedExecutionException e) { rejectedCount.inc(); if (eventExecutor.isLive()) { logFailure("EventQueue overloaded! Failed to execute event callback: %s", callback); } } }
/** * {@inheritDoc} * If the execution is rejected, the rejection count is increased and a failure is logged. * The event callback is not re-executed. * * @param callback the callback to execute on a random event thread */ @Override public void executeEventCallback(Runnable callback) { if (!nodeEngine.isRunning()) { return; } try { eventExecutor.execute(callback); } catch (RejectedExecutionException e) { rejectedCount.inc(); if (eventExecutor.isLive()) { logFailure("EventQueue overloaded! Failed to execute event callback: %s", callback); } } }
/** * {@inheritDoc} * Handles an asynchronous remote event with a {@link RemoteEventProcessor}. The * processor may determine the thread which will handle the event. If the execution is rejected, * the rejection count is increased and a failure is logged. The event processing is not retried. * * @param packet the response packet to handle * @see #sendEvent(Address, EventEnvelope, int) */ @Override public void accept(Packet packet) { try { eventExecutor.execute(new RemoteEventProcessor(this, packet)); } catch (RejectedExecutionException e) { rejectedCount.inc(); if (eventExecutor.isLive()) { Connection conn = packet.getConn(); String endpoint = conn.getEndPoint() != null ? conn.getEndPoint().toString() : conn.toString(); logFailure("EventQueue overloaded! Failed to process event packet sent from: %s", endpoint); } } }
/** * {@inheritDoc} * Handles an asynchronous remote event with a {@link RemoteEventProcessor}. The * processor may determine the thread which will handle the event. If the execution is rejected, * the rejection count is increased and a failure is logged. The event processing is not retried. * * @param packet the response packet to handle * @see #sendEvent(Address, EventEnvelope, int) */ @Override public void accept(Packet packet) { try { eventExecutor.execute(new RemoteEventProcessor(this, packet)); } catch (RejectedExecutionException e) { rejectedCount.inc(); if (eventExecutor.isLive()) { Connection conn = packet.getConn(); String endpoint = conn.getEndPoint() != null ? conn.getEndPoint().toString() : conn.toString(); logFailure("EventQueue overloaded! Failed to process event packet sent from: %s", endpoint); } } }
rejectedCount.inc(); if (eventExecutor.isLive()) { logFailure("EventQueue overloaded! %s failed to publish to %s:%s", event, reg.getServiceName(), reg.getTopic());
rejectedCount.inc(); if (eventExecutor.isLive()) { logFailure("EventQueue overloaded! %s failed to publish to %s:%s", event, reg.getServiceName(), reg.getTopic());