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()
BlankNodeAllocatorBlankNodeAllocator.alloc(java.lang.String) or BlankNodeAllocator.create()reset in interface BlankNodeAllocatorpublic Node alloc(String label)
BlankNodeAllocatoralloc in interface BlankNodeAllocatorpublic Node create()
BlankNodeAllocatorBlankNodeAllocator.alloc(java.lang.String)create in interface BlankNodeAllocatorLicenced under the Apache License, Version 2.0