Package com.linkedin.venice.utils.pools
Interface ObjectPool<O>
-
- All Known Implementing Classes:
LandFillObjectPool
public interface ObjectPool<O>
An interface to get and give back objects that are intended to be long-lived and recycled, but where the location in the code for beginning to use the object is far from the location where we stop using it, e.g. across different threads. If the reuse is localized, then consider whether it may be simpler to leverage aThreadLocal
or aCloseableThreadLocal
. The intent of having an interface is to experiment with different pooling strategies.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose(O object)
Return an object to the pool, indicating that it will no longer be used and can be recycled.O
get()
-