Class CachingObjectsSupplier<T>

java.lang.Object
com.clickhouse.client.api.internal.CachingObjectsSupplier<T>
All Implemented Interfaces:
Supplier<T>

public abstract class CachingObjectsSupplier<T> extends Object implements Supplier<T>
  • Constructor Details

    • CachingObjectsSupplier

      public CachingObjectsSupplier(Deque<T> cache, int preallocate)
      Constructs caching object supplier that uses Deque as cache. Deque may be a thread safe implementation. It will be filled with preallocate number of objects.
      Parameters:
      cache -
      preallocate -
  • Method Details

    • get

      public T get()
      Specified by:
      get in interface Supplier<T>
    • reset

      public void reset()
      Resets internal iterator to begin with the first object in the cache.
    • create

      public abstract T create()