Class IntrusiveChainedEntryPool<VALUE_TYPE>
java.lang.Object
io.deephaven.util.datastructures.hash.IntrusiveChainedEntryPool<VALUE_TYPE>
A pool for "free" entries to be use with IntrusiveChainedHash structures, implemented as a stack using the same
adapter and intrusive fields. Requires external synchronization of all methods for concurrent use.
-
Constructor Summary
ConstructorDescriptionIntrusiveChainedEntryPool
(@NotNull io.deephaven.hash.IntrusiveChainedHashAdapter<VALUE_TYPE> adapter) Construct a new pool with the supplied adapter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
give
(VALUE_TYPE entry) Give a currently un-linked entry to the pool.take()
Take an entry from the pool.
-
Constructor Details
-
IntrusiveChainedEntryPool
public IntrusiveChainedEntryPool(@NotNull @NotNull io.deephaven.hash.IntrusiveChainedHashAdapter<VALUE_TYPE> adapter) Construct a new pool with the supplied adapter.- Parameters:
adapter
- The adapter
-
-
Method Details
-
give
Give a currently un-linked entry to the pool.- Parameters:
entry
- The entry
-
take
Take an entry from the pool.- Returns:
- The entry taken, or null if the pool was empty
-