public class AbandonedTrace extends Object implements TrackedUse
The JDBC Connection, Statement, and ResultSet classes extend this class.
Constructor and Description |
---|
AbandonedTrace()
Creates a new AbandonedTrace without config and without doing abandoned tracing.
|
AbandonedTrace(AbandonedTrace parent)
Constructs a new AbandonedTrace with a parent object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addTrace(AbandonedTrace trace)
Adds an object to the list of objects being traced.
|
protected void |
clearTrace()
Clears the list of objects being traced by this object.
|
long |
getLastUsed()
Deprecated.
|
Instant |
getLastUsedInstant()
Gets the last Instant this object was used.
|
protected List<AbandonedTrace> |
getTrace()
Gets a list of objects being traced by this object.
|
protected void |
removeThisTrace(Object source)
Removes this object the source object is tracing.
|
protected void |
removeTrace(AbandonedTrace trace)
Removes a child object this object is tracing.
|
protected void |
setLastUsed()
Sets the time this object was last used to the current time in milliseconds.
|
protected void |
setLastUsed(Instant lastUsedInstant)
Sets the instant this object was last used.
|
protected void |
setLastUsed(long lastUsedMillis)
Deprecated.
|
public AbandonedTrace()
public AbandonedTrace(AbandonedTrace parent)
parent
- AbandonedTrace parent object.protected void addTrace(AbandonedTrace trace)
trace
- AbandonedTrace object to add.protected void clearTrace()
@Deprecated public long getLastUsed()
getLastUsed
in interface TrackedUse
public Instant getLastUsedInstant()
TrackedUse
Starting with Java 9, the JRE SystemClock
precision is increased usually down to microseconds, or tenth
of microseconds, depending on the OS, Hardware, and JVM implementation.
getLastUsedInstant
in interface TrackedUse
protected List<AbandonedTrace> getTrace()
protected void removeThisTrace(Object source)
source
- The object tracingprotected void removeTrace(AbandonedTrace trace)
trace
- AbandonedTrace object to remove.protected void setLastUsed()
protected void setLastUsed(Instant lastUsedInstant)
lastUsedInstant
- instant.@Deprecated protected void setLastUsed(long lastUsedMillis)
setLastUsed(Instant)
lastUsedMillis
- time in milliseconds.Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.