List of usage examples for io.netty.util ReferenceCountUtil retain
@SuppressWarnings("unchecked") public static <T> T retain(T msg, int increment)
From source file:org.apache.spark.network.protocol.MessageWithHeader.java
License:Apache License
@Override public MessageWithHeader retain(int increment) { super.retain(increment); header.retain(increment);// w w w .ja va2s .co m ReferenceCountUtil.retain(body, increment); if (managedBuffer != null) { for (int i = 0; i < increment; i++) { managedBuffer.retain(); } } return this; }