|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlReferenceTracker
public class UtlReferenceTracker
Tracks references for a reference counted object.
Reference tracking is enabled as follows:
Reference tracking is very expensive and should only be enabled when debugging reference counting issues.
This class IS NOT intended to be used by end users.
Nested Class Summary | |
---|---|
static interface |
UtlReferenceTracker.HasReferenceTracker
Marks an object as having a reference tracker. |
Field Summary | |
---|---|
static boolean |
ENABLED
True if reference tracking is globally enabled in the System. |
static boolean |
TYPE_TRACKING_ENABLED
True if reference tracking is enabled for at least one type in the System. |
Constructor Summary | |
---|---|
UtlReferenceTracker(Object item)
|
Method Summary | |
---|---|
void |
dump()
|
void |
dump(StringBuilder sb)
|
static boolean |
enabled(Class<?> type)
Tests if reference tracking is enabled for the given type. |
void |
onAcquire(int newCount)
|
void |
onDispose(int newCount)
|
void |
onInit(int initCount)
|
void |
onUndispose(int oldCount,
int initCount)
|
void |
setAssociatedTracker(UtlReferenceTracker associatedTracker)
Sets a tracker associated with this tracker, for example a parent or child tracker. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean ENABLED
public static final boolean TYPE_TRACKING_ENABLED
ENABLED
is set to true.
Constructor Detail |
---|
public UtlReferenceTracker(Object item)
Method Detail |
---|
public final void onUndispose(int oldCount, int initCount)
public final void onInit(int initCount)
public final void onAcquire(int newCount)
public final void onDispose(int newCount)
public final void dump()
public final void dump(StringBuilder sb)
public void setAssociatedTracker(UtlReferenceTracker associatedTracker)
NOTE: Cycles of associations are not currently supported and will result in an infinite dump loop.
associatedTracker
- A tracker associated with this one.public static boolean enabled(Class<?> type)
type
- The type to check against for reference tracking.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |