@Override public int refCnt() { return content.refCnt(); }
@Override public final int refCnt() { return buf.refCnt(); }
@Override public int refCnt() { return content.refCnt(); }
@Override public int refCnt() { return content.refCnt(); }
@Override public int refCnt() { return content.refCnt(); }
@Override public int refCnt() { return content.refCnt(); }
@Override public void call(ByteBuf byteBuf) { if (byteBuf != null && byteBuf.refCnt() > 0) { byteBuf.release(); } } };
private void releaseResponseContent() { if (responseContent != null && responseContent.refCnt() > 0) { responseContent.release(); } responseContent = null; }
/** * If it is still present and open, release the content buffer. Also set it * to null so that next decoding can take a new buffer from the pool. */ private void releaseResponseContent() { if (responseContent != null) { if (responseContent.refCnt() > 0) { responseContent.release(); } responseContent = null; } }
@Override public void call(ByteBuf byteBuf) { if (byteBuf != null && byteBuf.refCnt() > 0) { byteBuf.release(); } } };
/** * If it is still present and open, release the content buffer. Also set it * to null so that next decoding can take a new buffer from the pool. */ private void releaseResponseContent() { if (responseContent != null) { if (responseContent.refCnt() > 0) { responseContent.release(); } responseContent = null; } }
private void releaseResponseContent() { if (responseContent != null && responseContent.refCnt() > 0) { responseContent.release(); } responseContent = null; }
private void releaseResponseContent() { if (responseContent != null && responseContent.refCnt() > 0) { responseContent.release(); } responseContent = null; }
/** * Utility method to ensure good cleanup when throwing an exception from a constructor. * * Cleans the content composite buffer by releasing it before throwing the exception. */ protected void cleanUpAndThrow(RuntimeException e) { if (content != null && content.refCnt() > 0) { content.release(); } throw e; }
protected final void discardSomeReadBytes() { if (cumulation != null && !first && cumulation.refCnt() == 1) { // discard some bytes if possible to make more room in the // buffer but only if the refCnt == 1 as otherwise the user may have // used slice().retain() or duplicate().retain(). // // See: // - https://github.com/netty/netty/issues/2327 // - https://github.com/netty/netty/issues/1764 cumulation.discardSomeReadBytes(); } }
private static void releaseAll(List<ByteBuf> byteBufs) { for (ByteBuf byteBuf : byteBufs) { if (byteBuf != null && byteBuf.refCnt() > 0) { byteBuf.release(); } } }
@Override public void call(UpsertResponse response) { if (response.content() != null && response.content().refCnt() > 0) { response.content().release(); } } })