java.lang.Object
com.aoapps.sql.wrapper.SQLDataWrapperImpl
com.aoapps.sql.tracker.SQLDataTrackerImpl
- All Implemented Interfaces:
OnCloseHandler,SQLDataTracker,TrackedSQLInputs,TrackedSQLOutputs,SQLDataWrapper,Wrapper,AutoCloseable,SQLData,Wrapper
Tracks a
SQLData 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
ConstructorsConstructorDescriptionSQLDataTrackerImpl(ConnectionTrackerImpl connectionTracker, SQLData wrapped) Creates a newSQLDatatracker. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOnClose(Runnable onCloseHandler) Will call the handler once on close/free.voidclose()Calls onClose handlers, closes all tracked objects, then callssuper.close().final Map<SQLInput, SQLInputTrackerImpl> Gets all the SQL inputs that have not yet been closed.final Map<SQLOutput, SQLOutputTrackerImpl> Gets all the SQL outputs that have not yet been closed.protected SQLInputWrapperImplwrapSQLInput(SQLInput sqlInput) protected SQLOutputWrapperImplwrapSQLOutput(SQLOutput sqlOutput) Methods inherited from class com.aoapps.sql.wrapper.SQLDataWrapperImpl
getConnectionWrapper, getWrapped, readSQL, toString, writeSQLMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.aoapps.sql.wrapper.SQLDataWrapper
getSQLTypeName, getWrapped, readSQL, writeSQLMethods 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
-
SQLDataTrackerImpl
Creates a newSQLDatatracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandlerWill call the handler once on close/free.- Specified by:
addOnClosein interfaceOnCloseHandler
-
getTrackedSQLInputs
Description copied from interface:TrackedSQLInputsGets all the SQL inputs that have not yet been closed.- Specified by:
getTrackedSQLInputsin interfaceTrackedSQLInputs- Returns:
- The mapping from wrapped SQL input to tracker without any defensive copy.
- See Also:
-
getTrackedSQLOutputs
Description copied from interface:TrackedSQLOutputsGets all the SQL outputs that have not yet been closed.- Specified by:
getTrackedSQLOutputsin interfaceTrackedSQLOutputs- Returns:
- The mapping from wrapped SQL output to tracker without any defensive copy.
- See Also:
-
wrapSQLInput
- Overrides:
wrapSQLInputin classSQLDataWrapperImpl
-
wrapSQLOutput
- Overrides:
wrapSQLOutputin classSQLDataWrapperImpl
-
close
Calls onClose handlers, closes all tracked objects, then callssuper.close().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSQLDataTracker- Specified by:
closein interfaceSQLDataWrapper- Throws:
SQLException- See Also:
-
