Interface ObjectPool.ObjectFactory<K,V>

Enclosing class:
ObjectPool<K,V>

public static interface ObjectPool.ObjectFactory<K,V>
An ObjectFactory object is used to create new shared objects on demand.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new shared object associated with the given key, identified by the equals method.
  • Method Details

    • createObject

      Creates a new shared object associated with the given key, identified by the equals method. This method may be simultaneously called by multiple threads with the same key, and the excessive objects are just discarded.