java.lang.Object
com.aoapps.sql.wrapper.SavepointWrapperImpl
com.aoapps.sql.tracker.SavepointTrackerImpl
- All Implemented Interfaces:
OnCloseHandler
,SavepointTracker
,SavepointWrapper
,Wrapper
,AutoCloseable
,Savepoint
,Wrapper
Tracks a
Savepoint
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
ConstructorsConstructorDescriptionSavepointTrackerImpl
(ConnectionTrackerImpl connectionTracker, Savepoint wrapped) Creates a newSavepoint
tracker. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnClose
(Runnable onCloseHandler) Will call the handler once on close/free.void
close()
Calls onClose handlers, closes all tracked objects, then callssuper.close()
.protected void
Called when this savepoint is released.Methods inherited from class com.aoapps.sql.wrapper.SavepointWrapperImpl
getConnectionWrapper, 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.SavepointWrapper
getSavepointId, getSavepointName, 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
-
SavepointTrackerImpl
Creates a newSavepoint
tracker.
-
-
Method Details
-
getAllocationStacktrace
-
getAllocationLogger
-
addOnClose
Description copied from interface:OnCloseHandler
Will call the handler once on close/free.- Specified by:
addOnClose
in interfaceOnCloseHandler
-
onRelease
Called when this savepoint is released.- Throws:
SQLException
- See Also:
-
close
Calls onClose handlers, closes all tracked objects, then callssuper.close()
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSavepointTracker
- Specified by:
close
in interfaceSavepointWrapper
- Overrides:
close
in classSavepointWrapperImpl
- Throws:
SQLException
- See Also:
-