public static class LockFreePrefixTree.ObjectPoolingAllocator extends LockFreePrefixTree.Allocator
Node.LinearChildren and
Node.HashChildren arrays whose length is a power of 2 (because
LockFreePrefixTree only ever allocates arrays that are a power of 2). If the
requested array length is not a power of 2, an exception is thrown.| Constructor and Description |
|---|
ObjectPoolingAllocator() |
ObjectPoolingAllocator(int housekeepingPeriodMillis) |
| Modifier and Type | Method and Description |
|---|---|
org.graalvm.collections.LockFreePrefixTree.Node.HashChildren |
newHashChildren(int length)
Allocates a new reference array of child nodes stored as a hash table.
|
org.graalvm.collections.LockFreePrefixTree.Node.LinearChildren |
newLinearChildren(int length)
Allocates a new reference array of child nodes stored linearly.
|
LockFreePrefixTree.Node |
newNode(long key)
Allocates a new Node object.
|
void |
shutdown()
Releases the allocator's resources.
|
String |
status() |
public ObjectPoolingAllocator()
public ObjectPoolingAllocator(int housekeepingPeriodMillis)
public LockFreePrefixTree.Node newNode(long key)
LockFreePrefixTree.AllocatornewNode in class LockFreePrefixTree.Allocatorkey - The key to use for the Node object.Node object, possibly preallocated.public org.graalvm.collections.LockFreePrefixTree.Node.LinearChildren newLinearChildren(int length)
LockFreePrefixTree.AllocatornewLinearChildren in class LockFreePrefixTree.Allocatorlength - The length of the allocated array.public org.graalvm.collections.LockFreePrefixTree.Node.HashChildren newHashChildren(int length)
LockFreePrefixTree.AllocatornewHashChildren in class LockFreePrefixTree.Allocatorlength - The length of the allocated array.public void shutdown()
LockFreePrefixTree.Allocatorshutdown in class LockFreePrefixTree.Allocatorpublic String status()