Class AssocWithThreadPoolResizer

  • All Implemented Interfaces:
    Runnable

    public class AssocWithThreadPoolResizer
    extends Resizer
    Resizer for Associate With Thread type pools to remove unusable connections and maintain steady pool size.
    Author:
    Shalini M
    • Method Detail

      • scaleDownPool

        protected void scaleDownPool​(int scaleDownQuantity,
                                     boolean forced)
        Scale down pool by a size <= pool-resize-quantity
        Overrides:
        scaleDownPool in class Resizer
        Parameters:
        forced - scale-down only when forced
        scaleDownQuantity - no. of resources to remove
      • removeIdleAndInvalidResources

        protected int removeIdleAndInvalidResources()
        Get the free connections list from the pool, remove idle-timed-out resources and then invalid resources.
        Overrides:
        removeIdleAndInvalidResources in class Resizer
        Returns:
        int number of resources removed