Top Description Methods
org.apache.commons.pool2

public Interface TrackedUse

Imports
java.time.Instant

Allows pooled objects to make information available about when and how they were used available to the object pool. The object pool may, but is not required, to use this information to make more informed decisions when determining the state of a pooled object - for instance whether or not the object has been abandoned.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the last time this object was used in milliseconds.
getLastUsed
()
Deprecated Use getLastUsedInstant() which offers the best precision.

Gets the last time this object was used in milliseconds.

public default Instant

Returns:

the last Instant this object was used.
getLastUsedInstant
()

Gets the last Instant this object was used.

Method Detail

getLastUsedback to summary
public long getLastUsed()

Deprecated

Use getLastUsedInstant() which offers the best precision.

Gets the last time this object was used in milliseconds.

Returns:long

the last time this object was used in milliseconds.

Annotations
@Deprecated
getLastUsedInstantback to summary
public default Instant getLastUsedInstant()

Gets the last Instant this object was used.

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.

Returns:Instant

the last Instant this object was used.

Since
2.11.0