/** * @return the number of messages blocked waiting for dispatch (indication of slow consumption if greater than zero) */ public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
@Override public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
long start = System.currentTimeMillis(); producerBrokerExchange.blockingOnFlowControl(true); destinationStatistics.getBlockedSends().increment(); while (!usage.waitForSpace(1000, highWaterMark)) { if (context.getStopping().get()) {
getDestinationStatistics().getBlockedSends().decrement(); producerExchangeCopy.blockingOnFlowControl(false);
getDestinationStatistics().getBlockedSends().increment(); producerExchange.blockingOnFlowControl(true); if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
/** * @return the number of messages blocked waiting for dispatch (indication of slow consumption if greater than zero) */ public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
/** * @return the number of messages blocked waiting for dispatch (indication of slow consumption if greater than zero) */ public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
@Override public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
/** * @return the number of messages blocked waiting for dispatch (indication of slow consumption if greater than zero) */ public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
@Override public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
@Override public long getBlockedSends() { return destination.getDestinationStatistics().getBlockedSends().getCount(); }
protected final void waitForSpace(ConnectionContext context, ProducerBrokerExchange producerBrokerExchange, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException { if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { getLog().debug("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) { if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) { getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } } else { long start = System.currentTimeMillis(); producerBrokerExchange.blockingOnFlowControl(true); destinationStatistics.getBlockedSends().increment(); while (!usage.waitForSpace(1000, highWaterMark)) { if (context.getStopping().get()) { throw new IOException("Connection closed, send aborted."); } if (isFlowControlLogRequired()) { getLog().info("{}: {} (blocking for: {}s)", new Object[]{ usage, warning, new Long(((System.currentTimeMillis() - start) / 1000))}); } } long finish = System.currentTimeMillis(); long totalTimeBlocked = finish - start; destinationStatistics.getBlockedTime().addTime(totalTimeBlocked); producerBrokerExchange.incrementTimeBlocked(this,totalTimeBlocked); producerBrokerExchange.blockingOnFlowControl(false); } }
protected final void waitForSpace(ConnectionContext context, ProducerBrokerExchange producerBrokerExchange, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException { if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { getLog().debug("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) { if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) { getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } } else { long start = System.currentTimeMillis(); producerBrokerExchange.blockingOnFlowControl(true); destinationStatistics.getBlockedSends().increment(); while (!usage.waitForSpace(1000, highWaterMark)) { if (context.getStopping().get()) { throw new IOException("Connection closed, send aborted."); } if (isFlowControlLogRequired()) { getLog().info("{}: {} (blocking for: {}s)", new Object[]{ usage, warning, new Long(((System.currentTimeMillis() - start) / 1000))}); } } long finish = System.currentTimeMillis(); long totalTimeBlocked = finish - start; destinationStatistics.getBlockedTime().addTime(totalTimeBlocked); producerBrokerExchange.incrementTimeBlocked(this,totalTimeBlocked); producerBrokerExchange.blockingOnFlowControl(false); } }
protected final void waitForSpace(ConnectionContext context, ProducerBrokerExchange producerBrokerExchange, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException { if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) { getLog().debug("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) { if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) { getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning); throw new ResourceAllocationException(warning); } } else { long start = System.currentTimeMillis(); producerBrokerExchange.blockingOnFlowControl(true); destinationStatistics.getBlockedSends().increment(); while (!usage.waitForSpace(1000, highWaterMark)) { if (context.getStopping().get()) { throw new IOException("Connection closed, send aborted."); } if (isFlowControlLogRequired()) { getLog().info("{}: {} (blocking for: {}s)", new Object[]{ usage, warning, new Long(((System.currentTimeMillis() - start) / 1000))}); } } long finish = System.currentTimeMillis(); long totalTimeBlocked = finish - start; destinationStatistics.getBlockedTime().addTime(totalTimeBlocked); producerBrokerExchange.incrementTimeBlocked(this,totalTimeBlocked); producerBrokerExchange.blockingOnFlowControl(false); } }
getDestinationStatistics().getBlockedSends().decrement(); producerExchangeCopy.blockingOnFlowControl(false);
getDestinationStatistics().getBlockedSends().decrement(); producerExchangeCopy.blockingOnFlowControl(false);
getDestinationStatistics().getBlockedSends().decrement(); producerExchangeCopy.blockingOnFlowControl(false);
getDestinationStatistics().getBlockedSends().increment(); producerExchange.blockingOnFlowControl(true); if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
getDestinationStatistics().getBlockedSends().increment(); producerExchange.blockingOnFlowControl(true); if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
getDestinationStatistics().getBlockedSends().increment(); producerExchange.blockingOnFlowControl(true); if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {