public final int pendingWritesOnChannel() { return batchBufferSize(this.channel, this.writeBufferHighWaterMark); }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + "[EVENT LOOP] -> " + pendingWritesOnEventLoopView.get() + " causes: " + oom.getMessage(), oom); throw oom; } }
private ChannelFuture writeBatch(final ByteBuf bytes, final int readableBytes, final ChannelPromise promise) { final int batchBufferSize = batchBufferSize(channel, this.writeBufferHighWaterMark); final int nextBatchSize = batchBufferSize + readableBytes; if (nextBatchSize > batchLimit) { //request to flush before writing, to create the chance to make the channel writable again channel.flush(); //let netty use its write batching ability return channel.write(bytes, promise); } else if (nextBatchSize == batchLimit) { return channel.writeAndFlush(bytes, promise); } else { //let netty use its write batching ability return channel.write(bytes, promise); } }
public final int pendingWritesOnChannel() { return batchBufferSize(this.channel, this.writeBufferHighWaterMark); }
public final int pendingWritesOnChannel() { return batchBufferSize(this.channel, this.writeBufferHighWaterMark); }
public final int pendingWritesOnChannel() { return batchBufferSize(this.channel, this.writeBufferHighWaterMark); }
public final int pendingWritesOnChannel() { return batchBufferSize(this.channel, this.writeBufferHighWaterMark); }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public final void checkFlushBatchBuffer() { if (this.batchingEnabled) { //perform the flush only if necessary final int batchBufferSize = batchBufferSize(this.channel, this.writeBufferHighWaterMark); if (batchBufferSize > 0) { this.channel.flush(); } } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + "[EVENT LOOP] -> " + pendingWritesOnEventLoopView.get() + " causes: " + oom.getMessage(), oom); throw oom; } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + "[EVENT LOOP] -> " + pendingWritesOnEventLoopView.get() + " causes: " + oom.getMessage(), oom); throw oom; } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + " causes: " + oom.getMessage(), oom); throw oom; } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + "[EVENT LOOP] -> " + pendingWritesOnEventLoopView.get() + " causes: " + oom.getMessage(), oom); throw oom; } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + " causes: " + oom.getMessage(), oom); throw oom; } }
@Override public ActiveMQBuffer createTransportBuffer(final int size) { try { return new ChannelBufferWrapper(channel.alloc().directBuffer(size), true); } catch (OutOfMemoryError oom) { final long totalPendingWriteBytes = batchBufferSize(this.channel, this.writeBufferHighWaterMark); // I'm not using the ActiveMQLogger framework here, as I wanted the class name to be very specific here logger.warn("Trying to allocate " + size + " bytes, System is throwing OutOfMemoryError on NettyConnection " + this + ", there are currently " + "pendingWrites: [NETTY] -> " + totalPendingWriteBytes + " causes: " + oom.getMessage(), oom); throw oom; } }