Class LockFreePrefixTree.HeapAllocator
java.lang.Object
org.graalvm.collections.LockFreePrefixTree.Allocator
org.graalvm.collections.LockFreePrefixTree.HeapAllocator
- Enclosing class:
LockFreePrefixTree
Allocator that allocates objects directly on the managed heap.
- Since:
- 23.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.graalvm.collections.LockFreePrefixTree.Node.HashChildrennewHashChildren(int length) Allocates a new reference array of child nodes stored as a hash table.org.graalvm.collections.LockFreePrefixTree.Node.LinearChildrennewLinearChildren(int length) Allocates a new reference array of child nodes stored linearly.newNode(long key) Allocates a new Node object.voidshutdown()Releases the allocator's resources.
-
Constructor Details
-
HeapAllocator
public HeapAllocator()
-
-
Method Details
-
newNode
Description copied from class:LockFreePrefixTree.AllocatorAllocates a new Node object.- Specified by:
newNodein classLockFreePrefixTree.Allocator- Parameters:
key- The key to use for theNodeobject.- Returns:
- A fresh
Nodeobject, possibly preallocated. - Since:
- 23.0
-
newLinearChildren
public org.graalvm.collections.LockFreePrefixTree.Node.LinearChildren newLinearChildren(int length) Description copied from class:LockFreePrefixTree.AllocatorAllocates a new reference array of child nodes stored linearly.- Specified by:
newLinearChildrenin classLockFreePrefixTree.Allocator- Parameters:
length- The length of the allocated array.- Returns:
- A fresh array, possibly preallocated.
- Since:
- 23.0
-
newHashChildren
public org.graalvm.collections.LockFreePrefixTree.Node.HashChildren newHashChildren(int length) Description copied from class:LockFreePrefixTree.AllocatorAllocates a new reference array of child nodes stored as a hash table.- Specified by:
newHashChildrenin classLockFreePrefixTree.Allocator- Parameters:
length- The length of the allocated array.- Returns:
- A fresh array, possibly preallocated.
- Since:
- 23.0
-
shutdown
public void shutdown()Description copied from class:LockFreePrefixTree.AllocatorReleases the allocator's resources. Allocator should not be used after calling this method.- Specified by:
shutdownin classLockFreePrefixTree.Allocator- Since:
- 23.0
-