org.apache.commons.pool2.impl

## Interface CallStack

- All Known Implementing Classes:
    SecurityManagerCallStack, ThrowableCallStack

      public interface CallStack

  Strategy for obtaining and printing the current call stack. This is primarily useful for usage tracking so that different JVMs and configurations can use more efficient strategies for obtaining the current call stack.
  Since:
    2.4.3
  See Also:
    `CallStackUtils`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears the current stack trace snapshot.
    `void` | `fillInStackTrace()` Takes a snapshot of the current call stack.
    `boolean` | `printStackTrace(PrintWriter writer)` Prints the current stack trace if available to a PrintWriter.

- - ### Method Detail

    - #### printStackTrace

          boolean printStackTrace(PrintWriter writer)

      Prints the current stack trace if available to a PrintWriter. The format is undefined and is primarily useful for debugging issues with `PooledObject` usage in user code.
      Parameters:
        `writer` - a PrintWriter to write the curren stack trace to if available
      Returns:
        true if a stack trace was available to print or false if nothing was printed

    - #### fillInStackTrace

          void fillInStackTrace()

      Takes a snapshot of the current call stack. Subsequent calls to `printStackTrace(PrintWriter)` will print out that stack trace until it is cleared.

    - #### clear

          void clear()

      Clears the current stack trace snapshot. Subsequent calls to `printStackTrace(PrintWriter)` will be no-ops until another call to `fillInStackTrace()`.

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