java.lang.Object
com.aoapps.sql.wrapper.SQLXMLWrapperImpl
com.aoapps.sql.tracker.SQLXMLTrackerImpl
- All Implemented Interfaces:
OnCloseHandler,SQLXMLTracker,TrackedInputStreams,TrackedOutputStreams,TrackedReaders,TrackedWriters,SQLXMLWrapper,Wrapper,AutoCloseable,SQLXML,Wrapper
Tracks a
SQLXML 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
ConstructorsConstructorDescriptionSQLXMLTrackerImpl(ConnectionTrackerImpl connectionTracker, SQLXML wrapped) Creates a newSQLXMLtracker. -
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.SQLXMLWrapperImpl
getBinaryStream, getCharacterStream, getConnectionWrapper, getWrapped, setBinaryStream, setCharacterStream, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.aoapps.sql.wrapper.SQLXMLWrapper
close, getBinaryStream, getCharacterStream, getSource, getString, getWrapped, setBinaryStream, setCharacterStream, setResult, setStringMethods 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
-
SQLXMLTrackerImpl
Creates a newSQLXMLtracker.
-
-
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 classSQLXMLWrapperImpl
-
wrapOutputStream
- Overrides:
wrapOutputStreamin classSQLXMLWrapperImpl
-
wrapReader
- Overrides:
wrapReaderin classSQLXMLWrapperImpl
-
wrapWriter
- Overrides:
wrapWriterin classSQLXMLWrapperImpl
-
free
Calls onClose handlers, closes all tracked objects, then callssuper.free().- Specified by:
freein interfaceSQLXML- Specified by:
freein interfaceSQLXMLTracker- Specified by:
freein interfaceSQLXMLWrapper- Throws:
SQLException- See Also:
-
