Class ConcurrentQueueObjectPool<O>

java.lang.Object
org.newsclub.net.unix.pool.ConcurrentQueueObjectPool<O>
Type Parameters:
O - The object type.
All Implemented Interfaces:
ObjectPool<O>

public final class ConcurrentQueueObjectPool<O> extends Object implements ObjectPool<O>
An ObjectPool implemented using ConcurrentLinkedQueue.
Author:
Christian Kohlschütter
  • Constructor Details

  • Method Details

    • take

      public ObjectPool.Lease<O> take()
      Description copied from interface: ObjectPool
      Takes an exclusive lease of an object from the pool. If no existing object is available from the pool, a new one may be provided.
      Specified by:
      take in interface ObjectPool<O>
      Returns:
      The object.