Class representing a pool of resources to be temporarily used and returned. Inheriting classes
must implement the close method as well as initialize the resources in the constructor. The
implemented methods are thread-safe and inheriting classes should also written in a thread-safe
manner. See FileSystemMasterClientPool as an example.
Acquires an object of type T from the pool. This operation is blocking if no resource
is available. Each call of acquire() should be paired with another call of
release(Object)} after the use of this resource completes to return this resource to
Creates a new resource which will be added to the resource pool after the user is done using
it. This method should only be called when the capacity of the pool has not been reached. If
creating the resource will take a significant amount of time, the inheriting class should
avoid calling this method and instead initialize all the resources in the constructor.
a resource which will be added to the pool of resources