Class Pools.SynchronizedPool<T>

java.lang.Object
icyllis.modernui.util.Pools.SimplePool<T>
icyllis.modernui.util.Pools.SynchronizedPool<T>
Type Parameters:
T - The pooled type.
All Implemented Interfaces:
Pools.Pool<T>
Enclosing class:
Pools

public static class Pools.SynchronizedPool<T> extends Pools.SimplePool<T>
Synchronized pool of objects.
  • Constructor Details

    • SynchronizedPool

      public SynchronizedPool(int maxPoolSize)
      Creates a new instance.
      Parameters:
      maxPoolSize - The max pool size.
      Throws:
      IllegalArgumentException - If the max pool size is less than zero.
    • SynchronizedPool

      public SynchronizedPool(int maxPoolSize, @NonNull Object lock)
      Creates a new instance.
      Parameters:
      maxPoolSize - The max pool size.
      Throws:
      IllegalArgumentException - If the max pool size is less than zero.
  • Method Details