java.lang.Object
com.aoapps.sql.wrapper.ArrayWrapperImpl
com.aoapps.sql.tracker.ArrayTrackerImpl
- All Implemented Interfaces:
ArrayTracker
,OnCloseHandler
,TrackedResultSets
,ArrayWrapper
,Wrapper
,AutoCloseable
,Array
,Wrapper
Tracks an
Array
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
ConstructorsConstructorDescriptionArrayTrackerImpl
(ConnectionTrackerImpl connectionTracker, StatementWrapperImpl stmtWrapper, Array wrapped) Creates a newArray
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
<ResultSet, ResultSetTrackerImpl> Gets all the result sets that have not yet been closed.protected ResultSetTrackerImpl
wrapResultSet
(ResultSet results) Methods inherited from class com.aoapps.sql.wrapper.ArrayWrapperImpl
getConnectionWrapper, getResultSet, getResultSet, getResultSet, getResultSet, getStatementWrapper, getWrapped, toString
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.ArrayWrapper
close, getArray, getArray, getArray, getArray, getBaseType, getBaseTypeName, getResultSet, getResultSet, getResultSet, getResultSet, 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
-
ArrayTrackerImpl
public ArrayTrackerImpl(ConnectionTrackerImpl connectionTracker, StatementWrapperImpl stmtWrapper, Array wrapped) Creates a newArray
tracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandler
Will call the handler once on close/free.- Specified by:
addOnClose
in interfaceOnCloseHandler
-
getTrackedResultSets
Description copied from interface:TrackedResultSets
Gets all the result sets that have not yet been closed.- Specified by:
getTrackedResultSets
in interfaceTrackedResultSets
- Returns:
- The mapping from wrapped result set to tracker without any defensive copy.
- See Also:
-
wrapResultSet
- Overrides:
wrapResultSet
in classArrayWrapperImpl
- Throws:
SQLException
-
free
Calls onClose handlers, closes all tracked objects, then callssuper.free()
.- Specified by:
free
in interfaceArray
- Specified by:
free
in interfaceArrayTracker
- Specified by:
free
in interfaceArrayWrapper
- Throws:
SQLException
- See Also:
-