Interface PoolListener

All Known Implementing Classes:
PredictiveActivator

public interface PoolListener
Listener for pool lifecycle events. All methods are no-op by default.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onActivated(com.tnsai.agents.Agent agent)
    Called when an agent is checked out (activated).
    default void
    onDestroyed(com.tnsai.agents.Agent agent)
    Called when an agent is destroyed (evicted or pool closed).
    default void
    Called when a checkout fails because the pool is exhausted.
    default void
    onReturned(com.tnsai.agents.Agent agent)
    Called when an agent is returned (checked in) to the pool.
  • Method Details

    • onActivated

      default void onActivated(com.tnsai.agents.Agent agent)
      Called when an agent is checked out (activated).
    • onReturned

      default void onReturned(com.tnsai.agents.Agent agent)
      Called when an agent is returned (checked in) to the pool.
    • onDestroyed

      default void onDestroyed(com.tnsai.agents.Agent agent)
      Called when an agent is destroyed (evicted or pool closed).
    • onExhausted

      default void onExhausted()
      Called when a checkout fails because the pool is exhausted.