java.lang.Object
com.aoapps.sql.wrapper.ClobWrapperImpl
com.aoapps.sql.wrapper.NClobWrapperImpl
com.aoapps.sql.tracker.NClobTrackerImpl
- All Implemented Interfaces:
ClobTracker
,NClobTracker
,OnCloseHandler
,TrackedInputStreams
,TrackedOutputStreams
,TrackedReaders
,TrackedWriters
,ClobWrapper
,NClobWrapper
,Wrapper
,AutoCloseable
,Clob
,NClob
,Wrapper
Tracks a
NClob
for unclosed or unfreed objects.- Author:
- AO Industries, Inc.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Level
The logging level that enables allocation stack trace logging. -
Constructor Summary
ConstructorDescriptionNClobTrackerImpl
(ConnectionTrackerImpl connectionTracker, NClob wrapped) Creates a newNClob
tracker. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnClose
(Runnable onCloseHandler) Will call the handler once on close/free.void
free()
Calls onClose handlers, closes all tracked objects, then callssuper.free()
.final Map
<InputStream, InputStreamTracker> Gets all the input streams that have not yet been closed.final Map
<OutputStream, OutputStreamTracker> Gets all the output streams that have not yet been closed.final Map
<Reader, ReaderTracker> Gets all the readers that have not yet been closed.final Map
<Writer, WriterTracker> Gets all the writers that have not yet been closed.protected InputStreamTracker
protected OutputStreamTracker
protected ReaderTracker
wrapReader
(Reader in) protected WriterTracker
wrapWriter
(Writer out) Methods inherited from class com.aoapps.sql.wrapper.NClobWrapperImpl
getWrapped
Methods inherited from class com.aoapps.sql.wrapper.ClobWrapperImpl
getAsciiStream, getCharacterStream, getCharacterStream, getConnectionWrapper, position, setAsciiStream, setCharacterStream, toString, unwrapClob
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.ClobWrapper
close, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncate
Methods inherited from interface com.aoapps.sql.wrapper.NClobWrapper
getWrapped
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
-
NClobTrackerImpl
Creates a newNClob
tracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandler
Will call the handler once on close/free.- Specified by:
addOnClose
in interfaceOnCloseHandler
-
getTrackedInputStreams
Description copied from interface:TrackedInputStreams
Gets all the input streams that have not yet been closed.- Specified by:
getTrackedInputStreams
in interfaceTrackedInputStreams
- Returns:
- The mapping from wrapped input stream to tracker without any defensive copy.
- See Also:
-
getTrackedOutputStreams
Description copied from interface:TrackedOutputStreams
Gets all the output streams that have not yet been closed.- Specified by:
getTrackedOutputStreams
in interfaceTrackedOutputStreams
- Returns:
- The mapping from wrapped output stream to tracker without any defensive copy.
- See Also:
-
getTrackedReaders
Description copied from interface:TrackedReaders
Gets all the readers that have not yet been closed.- Specified by:
getTrackedReaders
in interfaceTrackedReaders
- Returns:
- The mapping from wrapped reader to tracker without any defensive copy.
- See Also:
-
getTrackedWriters
Description copied from interface:TrackedWriters
Gets all the writers that have not yet been closed.- Specified by:
getTrackedWriters
in interfaceTrackedWriters
- Returns:
- The mapping from wrapped writer to tracker without any defensive copy.
- See Also:
-
wrapInputStream
- Overrides:
wrapInputStream
in classClobWrapperImpl
-
wrapOutputStream
- Overrides:
wrapOutputStream
in classClobWrapperImpl
-
wrapReader
- Overrides:
wrapReader
in classClobWrapperImpl
-
wrapWriter
- Overrides:
wrapWriter
in classClobWrapperImpl
-
free
Calls onClose handlers, closes all tracked objects, then callssuper.free()
.- Specified by:
free
in interfaceClob
- Specified by:
free
in interfaceClobTracker
- Specified by:
free
in interfaceClobWrapper
- Throws:
SQLException
- See Also:
-