Class LandFillObjectPool<O>

java.lang.Object
com.linkedin.venice.utils.pools.LandFillObjectPool<O>
All Implemented Interfaces:
ObjectPool<O>

public class LandFillObjectPool<O> extends Object
A dummy implementation which simply allocates a new object on every ObjectPool.get() and lets the garbage collector dispose of it rather than reusing.
  • Constructor Details

    • LandFillObjectPool

      public LandFillObjectPool(Supplier<O> objectSupplier)
  • Method Details

    • 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 interface ObjectPool<O>
      Returns:
      an object, potentially from the pool, or potentially instantiating a new one if necessary.