Class LeakPresenceDetector.PresenceTracker<T>
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
io.netty.util.LeakPresenceDetector.PresenceTracker<T>
- All Implemented Interfaces:
ResourceLeakTracker<T>, Serializable
- Enclosing class:
LeakPresenceDetector<T>
private static final class LeakPresenceDetector.PresenceTracker<T>
extends AtomicBoolean
implements ResourceLeakTracker<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanClose the leak so thatResourceLeakTrackerdoes not warn about leaked resources.voidrecord()Records the caller's current stack trace so that theResourceLeakDetectorcan tell where the leaked resource was accessed lastly.voidRecords the caller's current stack trace and the specified additional arbitrary information so that theResourceLeakDetectorcan tell where the leaked resource was accessed lastly.Methods inherited from class AtomicBoolean
compareAndSet, get, getAndSet, lazySet, set, toString, weakCompareAndSetMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResourceLeakTracker
getCloseStackTraceIfAny
-
Field Details
-
scope
-
-
Constructor Details
-
PresenceTracker
PresenceTracker(LeakPresenceDetector.ResourceScope scope)
-
-
Method Details
-
record
public void record()Description copied from interface:ResourceLeakTrackerRecords the caller's current stack trace so that theResourceLeakDetectorcan tell where the leaked resource was accessed lastly. This method is a shortcut torecord(null).- Specified by:
recordin interfaceResourceLeakTracker<T>
-
record
Description copied from interface:ResourceLeakTrackerRecords the caller's current stack trace and the specified additional arbitrary information so that theResourceLeakDetectorcan tell where the leaked resource was accessed lastly.- Specified by:
recordin interfaceResourceLeakTracker<T>
-
close
Description copied from interface:ResourceLeakTrackerClose the leak so thatResourceLeakTrackerdoes not warn about leaked resources. After this method is called a leak associated with this ResourceLeakTracker should not be reported.- Specified by:
closein interfaceResourceLeakTracker<T>- Returns:
trueif called first time,falseif called already
-