Package com.yahoo.yolean.concurrent
Class ResourcePool<T>
- java.lang.Object
-
- com.yahoo.yolean.concurrent.ResourcePool<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
public final class ResourcePool<T> extends java.lang.Object implements java.lang.Iterable<T>
This implements a simple stack based resource pool. If you are out of resources new are allocated from the factory.
- Since:
- 5.2
- Author:
- baldersheim
-
-
Constructor Summary
Constructors Constructor Description ResourcePool(ResourceFactory<T> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
alloc()
void
free(T e)
java.util.Iterator<T>
iterator()
-