Interface AsyncPool<T>

    • Method Detail

      • start

        void start()
      • size

        int size()
      • acquire

        java.util.concurrent.CompletableFuture<T> acquire()
      • release

        void release​(T entity)
      • dispose

        void dispose​(T entity)
      • shutdownPool

        default java.util.concurrent.CompletableFuture<java.lang.Void> shutdownPool()
      • create

        static <T> AsyncPool<T> create​(@Nonnull
                                       AsyncPool.LifeCycle<T> lifeCycle,
                                       @Nonnull
                                       java.util.concurrent.Executor executor,
                                       int maxConcurrentCreate,
                                       int maxWaiters,
                                       int minimumEntities,
                                       int maximumEntities,
                                       long maxIdleTime,
                                       @Nonnull
                                       java.util.concurrent.TimeUnit maxIdleUnit)
      • rateLimitCreate

        static <T> AsyncPool.LifeCycle<T> rateLimitCreate​(@Nonnull
                                                          AsyncPool.LifeCycle<T> lifeCycle,
                                                          @Nonnull
                                                          java.util.concurrent.ScheduledExecutorService executor,
                                                          long minimumTimeDelay,
                                                          long maximumTimeDelay,
                                                          long timeIncrement,
                                                          @Nonnull
                                                          java.util.concurrent.TimeUnit unit)