Class BasicObjectsPool<T>
java.lang.Object
com.clickhouse.client.api.internal.BasicObjectsPool<T>
- Type Parameters:
T- - type of stored objects
Objects pool.
Can be used to reuse object to reduce GC pressure.
Thread-safety is not guaranteed. Depends on deque implementation that is
passed to the constructor.
-
Constructor Summary
ConstructorsConstructorDescriptionBasicObjectsPool(Deque<T> objects, int size) Creates a pool and pre-populates it with a number of objects equal to the size parameter. -
Method Summary
-
Constructor Details
-
BasicObjectsPool
Creates a pool and pre-populates it with a number of objects equal to the size parameter.- Parameters:
objects- object queuesize- initial size of the object queue
-
-
Method Details
-
lease
-
release
-
create
-