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 |
releaseLater(T msg)
Schedules the specified object to be released when the caller thread terminates.
|
static <T> T |
releaseLater(T msg,
int decrement)
Schedules the specified object to be released when the caller thread terminates.
|
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.public static <T> T releaseLater(T msg)
public static <T> T releaseLater(T msg, int decrement)
Copyright © 2008–2018 The Netty Project. All rights reserved.