Package com.linkedin.venice.utils.pools
Class LandFillObjectPool<O>
- java.lang.Object
-
- com.linkedin.venice.utils.pools.LandFillObjectPool<O>
-
- All Implemented Interfaces:
ObjectPool<O>
public class LandFillObjectPool<O> extends java.lang.Object
A dummy implementation which simply allocates a new object on everyObjectPool.get()
and lets the garbage collector dispose of it rather than reusing.
-
-
Constructor Summary
Constructors Constructor Description LandFillObjectPool(java.util.function.Supplier<O> objectSupplier)
-
Method Summary
All Methods Instance Methods Concrete 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()
-
-
-
Constructor Detail
-
LandFillObjectPool
public LandFillObjectPool(java.util.function.Supplier<O> objectSupplier)
-
-
Method Detail
-
dispose
public void dispose(O object)
Description copied from interface:ObjectPool
Return an object to the pool, indicating that it will no longer be used and can be recycled.- Parameters:
object
- which is no longer used.
-
get
public O get()
- Specified by:
get
in interfaceObjectPool<O>
- Returns:
- an object, potentially from the pool, or potentially instantiating a new one if necessary.
-
-