DefaultPooledObjectInfoMBean (Apache Commons Pool 2.11.1 API)

org.apache.commons.pool2.impl

## Interface DefaultPooledObjectInfoMBean

- All Known Implementing Classes:
    DefaultPooledObjectInfo

      public interface DefaultPooledObjectInfoMBean

  The interface that defines the information about pooled objects that will be exposed via JMX.

  NOTE: This interface exists only to define those attributes and methods that will be made available via JMX. It must not be implemented by clients as it is subject to change between major, minor and patch version releases of commons pool. Clients that implement this interface may not, therefore, be able to upgrade to a new minor or patch release without requiring code changes.

  Since:
    2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBorrowedCount()` Gets the number of times this object has been borrowed.
    `long` | `getCreateTime()` Gets the time (using the same basis as `System.currentTimeMillis()`) that pooled object was created.
    `String` | `getCreateTimeFormatted()` Gets the time that pooled object was created.
    `long` | `getLastBorrowTime()` Gets the time (using the same basis as `System.currentTimeMillis()`) the polled object was last borrowed.
    `String` | `getLastBorrowTimeFormatted()` Gets the time that pooled object was last borrowed.
    `String` | `getLastBorrowTrace()` Gets the stack trace recorded when the pooled object was last borrowed.
    `long` | `getLastReturnTime()` Gets the time (using the same basis as `System.currentTimeMillis()`)the wrapped object was last returned.
    `String` | `getLastReturnTimeFormatted()` Gets the time that pooled object was last returned.
    `String` | `getPooledObjectToString()` Gets a String form of the wrapper for debug purposes.
    `String` | `getPooledObjectType()` Gets the name of the class of the pooled object.

- - ### Method Detail

    - #### getBorrowedCount

          long getBorrowedCount()

      Gets the number of times this object has been borrowed.
      Returns:
        The number of times this object has been borrowed.
      Since:
        2.1

    - #### getCreateTime

          long getCreateTime()

      Gets the time (using the same basis as `System.currentTimeMillis()`) that pooled object was created.
      Returns:
        The creation time for the pooled object

    - #### getCreateTimeFormatted

          String getCreateTimeFormatted()

      Gets the time that pooled object was created.
      Returns:
        The creation time for the pooled object formatted as `yyyy-MM-dd HH:mm:ss Z`

    - #### getLastBorrowTime

          long getLastBorrowTime()

      Gets the time (using the same basis as `System.currentTimeMillis()`) the polled object was last borrowed.
      Returns:
        The time the pooled object was last borrowed

    - #### getLastBorrowTimeFormatted

          String getLastBorrowTimeFormatted()

      Gets the time that pooled object was last borrowed.
      Returns:
        The last borrowed time for the pooled object formatted as `yyyy-MM-dd HH:mm:ss Z`

    - #### getLastBorrowTrace

          String getLastBorrowTrace()

      Gets the stack trace recorded when the pooled object was last borrowed.
      Returns:
        The stack trace showing which code last borrowed the pooled object

    - #### getLastReturnTime

          long getLastReturnTime()

      Gets the time (using the same basis as `System.currentTimeMillis()`)the wrapped object was last returned.
      Returns:
        The time the object was last returned

    - #### getLastReturnTimeFormatted

          String getLastReturnTimeFormatted()

      Gets the time that pooled object was last returned.
      Returns:
        The last returned time for the pooled object formatted as `yyyy-MM-dd HH:mm:ss Z`

    - #### getPooledObjectToString

          String getPooledObjectToString()

      Gets a String form of the wrapper for debug purposes. The format is not fixed and may change at any time.
      Returns:
        A string representation of the pooled object
      See Also:
        `Object.toString()`

    - #### getPooledObjectType

          String getPooledObjectType()

      Gets the name of the class of the pooled object.
      Returns:
        The pooled object's class name
      See Also:
        `Class.getName()`

Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.