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
FieldsModifier and TypeFieldDescriptionstatic final LevelThe logging level that enables allocation stack trace logging. -
Constructor Summary
ConstructorsConstructorDescriptionNClobTrackerImpl(ConnectionTrackerImpl connectionTracker, NClob wrapped) Creates a newNClobtracker. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOnClose(Runnable onCloseHandler) Will call the handler once on close/free.voidfree()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 InputStreamTrackerprotected OutputStreamTrackerprotected ReaderTrackerwrapReader(Reader in) protected WriterTrackerwrapWriter(Writer out) Methods inherited from class com.aoapps.sql.wrapper.NClobWrapperImpl
getWrappedMethods inherited from class com.aoapps.sql.wrapper.ClobWrapperImpl
getAsciiStream, getCharacterStream, getCharacterStream, getConnectionWrapper, position, setAsciiStream, setCharacterStream, toString, unwrapClobMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.aoapps.sql.wrapper.ClobWrapper
close, getAsciiStream, getCharacterStream, getCharacterStream, getSubString, length, position, position, setAsciiStream, setCharacterStream, setString, setString, truncateMethods inherited from interface com.aoapps.sql.wrapper.NClobWrapper
getWrappedMethods 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 newNClobtracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandlerWill call the handler once on close/free.- Specified by:
addOnClosein interfaceOnCloseHandler
-
getTrackedInputStreams
Description copied from interface:TrackedInputStreamsGets all the input streams that have not yet been closed.- Specified by:
getTrackedInputStreamsin interfaceTrackedInputStreams- Returns:
- The mapping from wrapped input stream to tracker without any defensive copy.
- See Also:
-
getTrackedOutputStreams
Description copied from interface:TrackedOutputStreamsGets all the output streams that have not yet been closed.- Specified by:
getTrackedOutputStreamsin interfaceTrackedOutputStreams- Returns:
- The mapping from wrapped output stream to tracker without any defensive copy.
- See Also:
-
getTrackedReaders
Description copied from interface:TrackedReadersGets all the readers that have not yet been closed.- Specified by:
getTrackedReadersin interfaceTrackedReaders- Returns:
- The mapping from wrapped reader to tracker without any defensive copy.
- See Also:
-
getTrackedWriters
Description copied from interface:TrackedWritersGets all the writers that have not yet been closed.- Specified by:
getTrackedWritersin interfaceTrackedWriters- Returns:
- The mapping from wrapped writer to tracker without any defensive copy.
- See Also:
-
wrapInputStream
- Overrides:
wrapInputStreamin classClobWrapperImpl
-
wrapOutputStream
- Overrides:
wrapOutputStreamin classClobWrapperImpl
-
wrapReader
- Overrides:
wrapReaderin classClobWrapperImpl
-
wrapWriter
- Overrides:
wrapWriterin classClobWrapperImpl
-
free
Calls onClose handlers, closes all tracked objects, then callssuper.free().- Specified by:
freein interfaceClob- Specified by:
freein interfaceClobTracker- Specified by:
freein interfaceClobWrapper- Throws:
SQLException- See Also:
-
