Interface ObjectPool.ObjectSanitizer<T>

Type Parameters:
T - The object type.
Enclosing interface:
ObjectPool<O>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ObjectPool.ObjectSanitizer<T>
Sanitizes a previously leased object so it can be reused by the pool.
Author:
Christian Kohlschütter
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    sanitize(T obj)
    Sanitizes a previously leased object so it can be reused by the pool; if the object should not be reused, false is returned.
  • Method Details

    • sanitize

      boolean sanitize(T obj)
      Sanitizes a previously leased object so it can be reused by the pool; if the object should not be reused, false is returned.
      Parameters:
      obj - The object to sanitize.
      Returns:
      true if sanitization was successful, false if the object should not be reused.