All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hyperfoil.api.collection.ElasticPool Maven / Gradle / Ivy

There is a newer version: 0.27
Show newest version
package io.hyperfoil.api.collection;

/**
 * Pool that can create further elements when depleted.
 *
 * @param  The type of elements in this pool.
 */
public interface ElasticPool {
   /**
    * This can be called by single thread only.
    *
    * @return pooled or new object.
    */
   T acquire();

   /**
    * Can be called by any thread.
    *
    * @param object Returned object.
    */
   void release(T object);

   void reserve(int capacity);

   int minUsed();

   int maxUsed();

   void resetStats();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy