public class BlankNodeAllocatorHash extends Object implements BlankNodeAllocator
This is the most scalable, always legal allocator.
New allocators must be created per parser run, or .reset() called. These are fed to a digest to give a bit string, (currently MD5, to get a 128bit bit string) that is used to form a bNode AnonId of hex digits.
In addition there is a cache of label->node allocations, using the natural tendency to locality in a database dump. (subject bNodes, bNodes in lists and other data values structures like unit values).
Not thread safe.
Constructor and Description |
---|
BlankNodeAllocatorHash() |
Modifier and Type | Method and Description |
---|---|
Node |
alloc(String label)
Allocate based on a non-null label.
|
Node |
create()
Create a fresh blank node, different from anything generated so far.
|
void |
reset()
Reset allocation state - calls to
BlankNodeAllocator.alloc(java.lang.String) or BlankNodeAllocator.create() |
public void reset()
BlankNodeAllocator
BlankNodeAllocator.alloc(java.lang.String)
or BlankNodeAllocator.create()
reset
in interface BlankNodeAllocator
public Node alloc(String label)
BlankNodeAllocator
alloc
in interface BlankNodeAllocator
public Node create()
BlankNodeAllocator
BlankNodeAllocator.alloc(java.lang.String)
create
in interface BlankNodeAllocator
Licenced under the Apache License, Version 2.0