Package io.hyperfoil.api.collection
Interface ElasticPool<T>
-
- Type Parameters:
T- The type of elements in this pool.
public interface ElasticPool<T>Pool that can create further elements when depleted.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tacquire()This can be called by single thread only.intmaxUsed()intminUsed()voidrelease(T object)Can be called by any thread.voidreserve(int capacity)voidresetStats()
-
-
-
Method Detail
-
acquire
T acquire()
This can be called by single thread only.- Returns:
- pooled or new object.
-
release
void release(T object)
Can be called by any thread.- Parameters:
object- Returned object.
-
reserve
void reserve(int capacity)
-
minUsed
int minUsed()
-
maxUsed
int maxUsed()
-
resetStats
void resetStats()
-
-