private void onAcceptError(Exception error, String remoteHost) { if (brokerService != null && brokerService.isStopping()) { LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); } else { LOG.error("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); LOG.debug("Reason: " + error, error); } } });
@Override public void onCommand(Object o) { serviceLock.readLock().lock(); try { if (!(o instanceof Command)) { throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString()); } Command command = (Command) o; if (!brokerService.isStopping()) { Response response = service(command); if (response != null && !brokerService.isStopping()) { dispatchSync(response); } } else { throw new BrokerStoppedException("Broker " + brokerService + " is being stopped"); } } finally { serviceLock.readLock().unlock(); } }
@Override public synchronized void removeBroker(Connection connection, BrokerInfo info) { if (info != null) { BrokerInfo existing = brokerInfos.get(info.getBrokerId()); if (existing != null && existing.decrementRefCount() == 0) { brokerInfos.remove(info.getBrokerId()); } LOG.debug("{} removeBroker: {} brokerInfo size: {}", new Object[]{ getBrokerName(), info.getBrokerName(), brokerInfos.size()}); // When stopping don't send cluster updates since we are the one's tearing down // our own bridges. if (!brokerService.isStopping()) { removeBrokerInClusterUpdate(info); } } }
MessageReference ref = unackedListIterator.next(); if ( this.brokerService.isStopping() ) { break; if (dispatchPendingList.hasRedeliveries() && (! this.brokerService.isStopping())) { doDispatch(new OrderedPendingList());
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId());
private void onAcceptError(Exception error, String remoteHost) { if (brokerService != null && brokerService.isStopping()) { LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); } else { LOG.error("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); LOG.debug("Reason: " + error, error); } } });
private void onAcceptError(Exception error, String remoteHost) { if (brokerService != null && brokerService.isStopping()) { LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); } else { LOG.error("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); LOG.debug("Reason: " + error, error); } } });
private void onAcceptError(Exception error, String remoteHost) { if (brokerService != null && brokerService.isStopping()) { LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); } else { LOG.error("Could not accept connection {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error); LOG.debug("Reason: " + error, error); } } });
@Override public void onCommand(Object o) { serviceLock.readLock().lock(); try { if (!(o instanceof Command)) { throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString()); } Command command = (Command) o; if (!brokerService.isStopping()) { Response response = service(command); if (response != null && !brokerService.isStopping()) { dispatchSync(response); } } else { throw new BrokerStoppedException("Broker " + brokerService + " is being stopped"); } } finally { serviceLock.readLock().unlock(); } }
@Override public void onCommand(Object o) { serviceLock.readLock().lock(); try { if (!(o instanceof Command)) { throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString()); } Command command = (Command) o; if (!brokerService.isStopping()) { Response response = service(command); if (response != null && !brokerService.isStopping()) { dispatchSync(response); } } else { throw new BrokerStoppedException("Broker " + brokerService + " is being stopped"); } } finally { serviceLock.readLock().unlock(); } }
@Override public void onCommand(Object o) { serviceLock.readLock().lock(); try { if (!(o instanceof Command)) { throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString()); } Command command = (Command) o; if (!brokerService.isStopping()) { Response response = service(command); if (response != null && !brokerService.isStopping()) { dispatchSync(response); } } else { throw new BrokerStoppedException("Broker " + brokerService + " is being stopped"); } } finally { serviceLock.readLock().unlock(); } }
@Override public synchronized void removeBroker(Connection connection, BrokerInfo info) { if (info != null) { BrokerInfo existing = brokerInfos.get(info.getBrokerId()); if (existing != null && existing.decrementRefCount() == 0) { brokerInfos.remove(info.getBrokerId()); } LOG.debug("{} removeBroker: {} brokerInfo size: {}", new Object[]{ getBrokerName(), info.getBrokerName(), brokerInfos.size()}); // When stopping don't send cluster updates since we are the one's tearing down // our own bridges. if (!brokerService.isStopping()) { removeBrokerInClusterUpdate(info); } } }
@Override public synchronized void removeBroker(Connection connection, BrokerInfo info) { if (info != null) { BrokerInfo existing = brokerInfos.get(info.getBrokerId()); if (existing != null && existing.decrementRefCount() == 0) { brokerInfos.remove(info.getBrokerId()); } LOG.debug("{} removeBroker: {} brokerInfo size: {}", new Object[]{ getBrokerName(), info.getBrokerName(), brokerInfos.size()}); // When stopping don't send cluster updates since we are the one's tearing down // our own bridges. if (!brokerService.isStopping()) { removeBrokerInClusterUpdate(info); } } }
@Override public synchronized void removeBroker(Connection connection, BrokerInfo info) { if (info != null) { BrokerInfo existing = brokerInfos.get(info.getBrokerId()); if (existing != null && existing.decrementRefCount() == 0) { brokerInfos.remove(info.getBrokerId()); } LOG.debug("{} removeBroker: {} brokerInfo size: {}", new Object[]{ getBrokerName(), info.getBrokerName(), brokerInfos.size()}); // When stopping don't send cluster updates since we are the one's tearing down // our own bridges. if (!brokerService.isStopping()) { removeBrokerInClusterUpdate(info); } } }
MessageReference ref = unackedListIterator.next(); if ( this.brokerService.isStopping() ) { break; if (dispatchPendingList.hasRedeliveries() && (! this.brokerService.isStopping())) { doDispatch(new OrderedPendingList());
MessageReference ref = unackedListIterator.next(); if ( this.brokerService.isStopping() ) { break; if (dispatchPendingList.hasRedeliveries() && (! this.brokerService.isStopping())) { doDispatch(new OrderedPendingList());
MessageReference ref = unackedListIterator.next(); if ( this.brokerService.isStopping() ) { break; if (dispatchPendingList.hasRedeliveries() && (! this.brokerService.isStopping())) { doDispatch(new OrderedPendingList());
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId());
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId());
if (!sendProducerAck && !context.isInRecoveryMode() && !brokerService.isStopping()) { ExceptionResponse response = new ExceptionResponse(e); response.setCorrelationId(message.getCommandId());