Package com.yahoo.jdisc.refcount
Class DebugReferencesWithStack
java.lang.Object
com.yahoo.jdisc.refcount.DebugReferencesWithStack
- All Implemented Interfaces:
References
Does reference counting by putting stacktraces in a map together with an optional context.
Intended only for debugging as it is slow.
Used if system property jdisc.debug.resources=stack
- Author:
- baldersheim
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a reference and return an objects that when closed will return the reference.int
Returns number of held referencesvoid
release()
Release the initial reference
-
Constructor Details
-
DebugReferencesWithStack
-
-
Method Details
-
release
public void release()Description copied from interface:References
Release the initial reference- Specified by:
release
in interfaceReferences
-
referenceCount
public int referenceCount()Description copied from interface:References
Returns number of held references- Specified by:
referenceCount
in interfaceReferences
-
refer
Description copied from interface:References
Adds a reference and return an objects that when closed will return the reference. Supply a context that can provide link to the one holding the link. Useful for debugging- Specified by:
refer
in interfaceReferences
-
currentState
- Specified by:
currentState
in interfaceReferences
-