Class LockFreePrefixTree.Allocator
java.lang.Object
org.graalvm.collections.LockFreePrefixTree.Allocator
- Direct Known Subclasses:
- LockFreePrefixTree.HeapAllocator, LockFreePrefixTree.ObjectPoolingAllocator
- Enclosing class:
- LockFreePrefixTree
Policy for allocating objects of the lock-free prefix tree.
- Since:
- 23.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract org.graalvm.collections.LockFreePrefixTree.Node.HashChildrennewHashChildren(int length) Allocates a new reference array of child nodes stored as a hash table.abstract org.graalvm.collections.LockFreePrefixTree.Node.LinearChildrennewLinearChildren(int length) Allocates a new reference array of child nodes stored linearly.abstract LockFreePrefixTree.NodenewNode(long key) Allocates a new Node object.abstract voidshutdown()Releases the allocator's resources.
- 
Constructor Details- 
Allocatorpublic Allocator()
 
- 
- 
Method Details- 
newNodeAllocates a new Node object.- Parameters:
- key- The key to use for the- Nodeobject.
- Returns:
- A fresh Nodeobject, possibly preallocated.
- Throws:
- org.graalvm.collections.LockFreePrefixTree.FailedAllocationException- If the allocation request cannot be fulfilled.
- Since:
- 23.0
 
- 
newLinearChildrenpublic abstract org.graalvm.collections.LockFreePrefixTree.Node.LinearChildren newLinearChildren(int length) Allocates a new reference array of child nodes stored linearly.- Parameters:
- length- The length of the allocated array.
- Returns:
- A fresh array, possibly preallocated.
- Throws:
- org.graalvm.collections.LockFreePrefixTree.FailedAllocationException- If the allocation request cannot be fulfilled.
- Since:
- 23.0
 
- 
newHashChildrenpublic abstract org.graalvm.collections.LockFreePrefixTree.Node.HashChildren newHashChildren(int length) Allocates a new reference array of child nodes stored as a hash table.- Parameters:
- length- The length of the allocated array.
- Returns:
- A fresh array, possibly preallocated.
- Throws:
- org.graalvm.collections.LockFreePrefixTree.FailedAllocationException- If the allocation request cannot be fulfilled.
- Since:
- 23.0
 
- 
shutdownpublic abstract void shutdown()Releases the allocator's resources. Allocator should not be used after calling this method.- Since:
- 23.0
 
 
-