Class DefaultPooledObjectInfo
- java.lang.Object
- 
- org.apache.tomcat.dbcp.pool2.impl.DefaultPooledObjectInfo
 
- 
- All Implemented Interfaces:
- DefaultPooledObjectInfoMBean
 
 public class DefaultPooledObjectInfo extends java.lang.Object implements DefaultPooledObjectInfoMBean Implementation of object that is used to provide information on pooled objects via JMX.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultPooledObjectInfo(PooledObject<?> pooledObject)Constructs a new instance for the given pooled object.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBorrowedCount()Gets the number of times this object has been borrowed.longgetCreateTime()Gets the time (using the same basis asSystem.currentTimeMillis()) that pooled object was created.java.lang.StringgetCreateTimeFormatted()Gets the time that pooled object was created.longgetLastBorrowTime()Gets the time (using the same basis asSystem.currentTimeMillis()) the polled object was last borrowed.java.lang.StringgetLastBorrowTimeFormatted()Gets the time that pooled object was last borrowed.java.lang.StringgetLastBorrowTrace()Gets the stack trace recorded when the pooled object was last borrowed.longgetLastReturnTime()Gets the time (using the same basis asSystem.currentTimeMillis())the wrapped object was last returned.java.lang.StringgetLastReturnTimeFormatted()Gets the time that pooled object was last returned.java.lang.StringgetPooledObjectToString()Gets a String form of the wrapper for debug purposes.java.lang.StringgetPooledObjectType()Gets the name of the class of the pooled object.java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
DefaultPooledObjectInfopublic DefaultPooledObjectInfo(PooledObject<?> pooledObject) Constructs a new instance for the given pooled object.- Parameters:
- pooledObject- The pooled object that this instance will represent
 
 
- 
 - 
Method Detail- 
getBorrowedCountpublic long getBorrowedCount() Description copied from interface:DefaultPooledObjectInfoMBeanGets the number of times this object has been borrowed.- Specified by:
- getBorrowedCountin interface- DefaultPooledObjectInfoMBean
- Returns:
- The number of times this object has been borrowed.
 
 - 
getCreateTimepublic long getCreateTime() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time (using the same basis asSystem.currentTimeMillis()) that pooled object was created.- Specified by:
- getCreateTimein interface- DefaultPooledObjectInfoMBean
- Returns:
- The creation time for the pooled object
 
 - 
getCreateTimeFormattedpublic java.lang.String getCreateTimeFormatted() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time that pooled object was created.- Specified by:
- getCreateTimeFormattedin interface- DefaultPooledObjectInfoMBean
- Returns:
- The creation time for the pooled object formatted as
         yyyy-MM-dd HH:mm:ss Z
 
 - 
getLastBorrowTimepublic long getLastBorrowTime() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time (using the same basis asSystem.currentTimeMillis()) the polled object was last borrowed.- Specified by:
- getLastBorrowTimein interface- DefaultPooledObjectInfoMBean
- Returns:
- The time the pooled object was last borrowed
 
 - 
getLastBorrowTimeFormattedpublic java.lang.String getLastBorrowTimeFormatted() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time that pooled object was last borrowed.- Specified by:
- getLastBorrowTimeFormattedin interface- DefaultPooledObjectInfoMBean
- Returns:
- The last borrowed time for the pooled object formatted as
         yyyy-MM-dd HH:mm:ss Z
 
 - 
getLastBorrowTracepublic java.lang.String getLastBorrowTrace() Description copied from interface:DefaultPooledObjectInfoMBeanGets the stack trace recorded when the pooled object was last borrowed.- Specified by:
- getLastBorrowTracein interface- DefaultPooledObjectInfoMBean
- Returns:
- The stack trace showing which code last borrowed the pooled object
 
 - 
getLastReturnTimepublic long getLastReturnTime() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time (using the same basis asSystem.currentTimeMillis())the wrapped object was last returned.- Specified by:
- getLastReturnTimein interface- DefaultPooledObjectInfoMBean
- Returns:
- The time the object was last returned
 
 - 
getLastReturnTimeFormattedpublic java.lang.String getLastReturnTimeFormatted() Description copied from interface:DefaultPooledObjectInfoMBeanGets the time that pooled object was last returned.- Specified by:
- getLastReturnTimeFormattedin interface- DefaultPooledObjectInfoMBean
- Returns:
- The last returned time for the pooled object formatted as
         yyyy-MM-dd HH:mm:ss Z
 
 - 
getPooledObjectToStringpublic java.lang.String getPooledObjectToString() Description copied from interface:DefaultPooledObjectInfoMBeanGets a String form of the wrapper for debug purposes. The format is not fixed and may change at any time.- Specified by:
- getPooledObjectToStringin interface- DefaultPooledObjectInfoMBean
- Returns:
- A string representation of the pooled object
- See Also:
- Object.toString()
 
 - 
getPooledObjectTypepublic java.lang.String getPooledObjectType() Description copied from interface:DefaultPooledObjectInfoMBeanGets the name of the class of the pooled object.- Specified by:
- getPooledObjectTypein interface- DefaultPooledObjectInfoMBean
- Returns:
- The pooled object's class name
- See Also:
- Class.getName()
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
- Since:
- 2.4.3
 
 
- 
 
-