java.lang.Object
java.io.Reader
com.aoapps.sql.wrapper.ReaderWrapper
com.aoapps.sql.tracker.ReaderTracker
- All Implemented Interfaces:
NoClose
,OnCloseHandler
,Wrapper
,Closeable
,AutoCloseable
,Readable
,Wrapper
Tracks a
Reader
for unclosed or unfreed objects.- Author:
- AO Industries, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Level
The logging level that enables allocation stack trace logging. -
Constructor Summary
ConstructorsConstructorDescriptionReaderTracker
(ConnectionTrackerImpl connectionTracker, Reader wrapped) Creates a newReader
tracker. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnClose
(Runnable onCloseHandler) Will call the handler once on close/free.void
close()
Calls onClose handlers thensuper.close()
.Methods inherited from class com.aoapps.sql.wrapper.ReaderWrapper
getConnectionWrapper, getWrapped, isNoClose, mark, markSupported, read, read, read, read, ready, reset, skip, toString
Methods inherited from class java.io.Reader
nullReader, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.aoapps.sql.wrapper.Wrapper
isWrapperFor, unwrap
-
Field Details
-
ALLOCATION_STACKTRACE_LOG_LEVEL
The logging level that enables allocation stack trace logging.
-
-
Constructor Details
-
ReaderTracker
Creates a newReader
tracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandler
Will call the handler once on close/free.- Specified by:
addOnClose
in interfaceOnCloseHandler
-
close
Calls onClose handlers thensuper.close()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceNoClose
- Overrides:
close
in classReaderWrapper
- Throws:
IOException
- See Also:
-