|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jena.riot.lang.BlankNodeAllocatorHash
public class BlankNodeAllocatorHash
Allocate bnode labels using a per-run seed and the label presented.
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 Summary | |
|---|---|
BlankNodeAllocatorHash()
|
|
| Method Summary | |
|---|---|
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() |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlankNodeAllocatorHash()
| Method Detail |
|---|
public void reset()
BlankNodeAllocator
reset in interface BlankNodeAllocatorpublic Node alloc(String label)
BlankNodeAllocator
alloc in interface BlankNodeAllocatorpublic Node create()
BlankNodeAllocator
create in interface BlankNodeAllocator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||