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 gve 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 tendendency to locality in a database dump. (subject bNodes, bNodes in lists and other datavalues 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 anythign generated so far.
|
void |
reset()
Reset allocation state - calls to BlankNodeAllocator.alloc(java.lang.String) or BlankNodeAllocator.create()
|
public void reset()
BlankNodeAllocator
reset
in interface BlankNodeAllocator
public Node alloc(String label)
BlankNodeAllocator
alloc
in interface BlankNodeAllocator
public Node create()
BlankNodeAllocator
create
in interface BlankNodeAllocator
Licenced under the Apache License, Version 2.0