Class PooledCollection<T>

java.lang.Object
com.ticxo.modelengine.api.utils.data.PooledCollection<T>

public class PooledCollection<T> extends Object
  • Constructor Details

    • PooledCollection

      public PooledCollection(Supplier<T> instanceSupplier)
  • Method Details

    • getOrCreate

      public T getOrCreate()
    • release

      public void release(T instance)
    • releaseAll

      public void releaseAll()
    • getAll

      public Set<T> getAll()
    • processAll

      public void processAll(@Nullable @Nullable Consumer<T> createdConsumer, @Nullable @Nullable Consumer<T> oldConsumer, @Nullable @Nullable Consumer<T> releasedConsumer)
    • getInUse

      public Set<T> getInUse()
    • getCreated

      public Set<T> getCreated()
    • getReleased

      public Set<T> getReleased()