public final class ReferenceCountUtil extends Object
ReferenceCounted.| Modifier and Type | Method and Description |
|---|---|
static boolean |
release(Object msg)
Try to call
ReferenceCounted.release() if the specified message implements ReferenceCounted. |
static boolean |
release(Object msg,
int decrement)
Try to call
ReferenceCounted.release() if the specified message implements ReferenceCounted. |
static <T> T |
retain(T msg)
Try to call
ReferenceCounted.retain() if the specified message implements ReferenceCounted. |
static <T> T |
retain(T msg,
int increment)
Try to call
ReferenceCounted.retain() if the specified message implements ReferenceCounted. |
public static <T> T retain(T msg)
ReferenceCounted.retain() if the specified message implements ReferenceCounted.
If the specified message doesn't implement ReferenceCounted, this method does nothing.public static <T> T retain(T msg,
int increment)
ReferenceCounted.retain() if the specified message implements ReferenceCounted.
If the specified message doesn't implement ReferenceCounted, this method does nothing.public static boolean release(Object msg)
ReferenceCounted.release() if the specified message implements ReferenceCounted.
If the specified message doesn't implement ReferenceCounted, this method does nothing.public static boolean release(Object msg, int decrement)
ReferenceCounted.release() if the specified message implements ReferenceCounted.
If the specified message doesn't implement ReferenceCounted, this method does nothing.Copyright © 2008–2013 The Netty Project. All rights reserved.