final class NodeAllocator
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
private Node[] |
array |
|
private static int |
DEFAULT_INIT_SIZE |
|
private static int |
DEFAULT_MAX_SIZE |
|
private Node |
freeList |
|
private static int |
GROWTH_MULTIPLIER |
|
private int |
maxSize |
|
private int |
nAllocated |
Constructor | Description |
---|---|
NodeAllocator() |
Construct an empty allocator.
|
Modifier and Type | Method | Description |
---|---|---|
int |
capacity() |
|
void |
close() |
|
void |
freeNode(Node n) |
Return a node to the allocator.
|
void |
grow(int percent) |
Expand the node allocator's capacity by certain percent.
|
boolean |
init() |
Initialize the allocator with default values for
initial and maximum size.
|
boolean |
init(int maxSize) |
Initialize the allocator with default values for
initial size and the provided maximum size.
|
boolean |
init(int initSize,
int maxSize) |
Initialize the allocator with the given initial and
maximum sizes.
|
Node |
newNode() |
|
void |
reset() |
Clear all nodes that this allocator has allocated.
|
private static final int DEFAULT_INIT_SIZE
private static final int GROWTH_MULTIPLIER
private static final int DEFAULT_MAX_SIZE
private Node[] array
private int maxSize
private int nAllocated
private Node freeList
public NodeAllocator()
public Node newNode()
public void freeNode(Node n)
public boolean init()
public boolean init(int maxSize)
public boolean init(int initSize, int maxSize)
public void grow(int percent)
public void reset()
public void close()
public int capacity()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.