| Constructor and Description |
|---|
ConcurrentStripedPool(int stripes,
int maxPoolSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
E |
borrow()
Retrieves element from pool, or returns
null if the pool is empty. |
void |
clear()
Removes all of the elements from the pool..
|
void |
forEach(Consumer<? super E> action)
Performs the given action for each element of the pool until all elements have been processed or the action
throws an exception.
|
@NotNull Iterator<E> |
iterator() |
boolean |
recycle(E e)
Pushes an element onto the pool.
|
void |
resize(int size) |
Stream<E> |
stream()
Returns a sequential
Stream of the pool. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitspliteratorpublic ConcurrentStripedPool(int stripes,
int maxPoolSize)
stripes - Count of stripes.maxPoolSize - Max pool size.public boolean recycle(E e)
e - the element to pushtrue if the element is returned to the pool, false if the is no space at the pool.NullPointerException - if the specified element is null and this deque does not permit null elementspublic E borrow()
null if the pool is empty.null if the pool is empty.public void forEach(Consumer<? super E> action)
forEach in interface Iterable<E>action - The action to be performed for each elementNullPointerException - if the specified action is nullpublic void clear()
public Stream<E> stream()
Stream of the pool.Stream over the elements iof the pool.public void resize(int size)
size - New max pool size.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.23-p1 Release Date : November 19 2025