ReferenceCounted
.
Modifier and Type | Class and Description |
---|---|
private static class | ReferenceCountUtil.
Releases the objects when the thread that called |
Modifier and Type | Field and Description |
---|---|
private static final InternalLogger |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static int | |
public static boolean | release(Object msg)
Try to call |
public static boolean | release(Object msg, int decrement)
Try to call |
public static <T> T | releaseLater(T msg)
Deprecated
this may introduce a lot of memory usage so it is generally preferable to manually release objects.
Schedules the specified object to be released when the caller thread terminates.
|
public static <T> T | releaseLater(T msg, int decrement)
Deprecated
this may introduce a lot of memory usage so it is generally preferable to manually release objects.
Schedules the specified object to be released when the caller thread terminates.
|
public static <T> T | retain(T msg)
Try to call |
public static <T> T | retain(T msg, int increment)
Try to call |
public static void | safeRelease(Object msg)
Try to call |
public static void | safeRelease(Object msg, int decrement)
Try to call |
public static <T> T | touch(T msg)
Tries to call |
public static <T> T | touch(T msg, Object hint)
Tries to call |
logger | back to summary |
---|---|
private static final InternalLogger logger |
ReferenceCountUtil | back to summary |
---|---|
private ReferenceCountUtil() |
refCnt | back to summary |
---|---|
public static int refCnt(Object msg) Returns reference count of a |
release | back to summary |
---|---|
public static boolean release(Object msg) Try to call |
release | back to summary |
---|---|
public static boolean release(Object msg, int decrement) Try to call |
releaseLater | back to summary |
---|---|
public static <T> T releaseLater(T msg)
Deprecated this may introduce a lot of memory usage so it is generally preferable to manually release objects. Schedules the specified object to be released when the caller thread terminates. Note that this operation is intended to simplify reference counting of ephemeral objects during unit tests. Do not use it beyond the intended use case.
|
releaseLater | back to summary |
---|---|
public static <T> T releaseLater(T msg, int decrement)
Deprecated this may introduce a lot of memory usage so it is generally preferable to manually release objects. Schedules the specified object to be released when the caller thread terminates. Note that this operation is intended to simplify reference counting of ephemeral objects during unit tests. Do not use it beyond the intended use case.
|
retain | back to summary |
---|---|
public static <T> T retain(T msg) Try to call
|
retain | back to summary |
---|---|
public static <T> T retain(T msg, int increment) Try to call
|
safeRelease | back to summary |
---|---|
public static void safeRelease(Object msg) Try to call |
safeRelease | back to summary |
---|---|
public static void safeRelease(Object msg, int decrement) Try to call |
touch | back to summary |
---|---|
public static <T> T touch(T msg) Tries to call
|
touch | back to summary |
---|---|
public static <T> T touch(T msg, Object hint) Tries to call
|
releaseLater(Object)
has been terminated.
Modifier and Type | Field and Description |
---|---|
private final int | |
private final ReferenceCounted |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public String |
decrement | back to summary |
---|---|
private final int decrement |
obj | back to summary |
---|---|
private final ReferenceCounted obj |
ReleasingTask | back to summary |
---|---|
pack-priv ReleasingTask(ReferenceCounted obj, int decrement) |
run | back to summary |
---|---|
public void run() Implements java. Doc from java. Runs this operation.
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object. |