|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.rio.AsynchronousStatementBufferFactory.AsynchronousStatementBufferImpl
S - F - protected class AsynchronousStatementBufferFactory.AsynchronousStatementBufferImpl
Inner class provides the statement buffer.
| Constructor Summary | |
|---|---|
protected |
AsynchronousStatementBufferFactory.AsynchronousStatementBufferImpl(R resource)
|
| Method Summary | |
|---|---|
void |
add(Resource s,
URI p,
Value o)
Add an "explicit" statement to the buffer (flushes on overflow, no context). |
void |
add(Resource s,
URI p,
Value o,
Resource c)
Add an "explicit" statement to the buffer (flushes on overflow). |
void |
add(Resource s,
URI p,
Value o,
Resource c,
StatementEnum type)
Add a statement to the buffer (core impl). |
void |
add(S e)
Add a statement to the buffer. |
long |
flush()
Note: this implementation always returns ZERO (0). |
AbstractTripleStore |
getDatabase()
The database that will be used to resolve terms. |
R |
getDocumentIdentifier()
Return the identifier for the document. |
AbstractTripleStore |
getStatementStore()
Returns null. |
boolean |
isEmpty()
True iff there are no elements in the buffer. |
void |
reset()
Clears all buffered data, including the canonicalizing mapping for blank nodes and deferred provenance statements. |
void |
setBNodeMap(Map<String,BigdataBNode> bnodes)
Set the canonicalizing map for blank nodes based on their ID. |
int |
size()
The #of elements currently in the buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AsynchronousStatementBufferFactory.AsynchronousStatementBufferImpl(R resource)
resource - The document identifier.| Method Detail |
|---|
public final AbstractTripleStore getDatabase()
IStatementBufferIStatementBuffer.getStatementStore() is null, statements will be
written into this store as well.
getDatabase in interface IStatementBuffer<S extends BigdataStatement>public AbstractTripleStore getStatementStore()
null.
Note: This implementation does not support the concept of a focusStore so it can not be used for truth maintenance.
getStatementStore in interface IStatementBuffer<S extends BigdataStatement>public boolean isEmpty()
IBuffer
isEmpty in interface IBuffer<S extends BigdataStatement>public int size()
IBuffer
size in interface IBuffer<S extends BigdataStatement>public R getDocumentIdentifier()
public long flush()
flush in interface IBuffer<S extends BigdataStatement>IRelation.
See IMutableRelationAsynchronousStatementBufferFactory.ParserTaskpublic void reset()
reset in interface IBuffer<S extends BigdataStatement>public void setBNodeMap(Map<String,BigdataBNode> bnodes)
IStatementBufferIStatementBuffer
instances. For example, the BigdataSail does this so that the
same bnode map is used throughout the life of a SailConnection.
While RIO provides blank node correlation within a given source, it does
NOT provide blank node correlation across sources. You need to use this
method to do that.
Note: It is reasonable to expect that the bnodes map is used by
concurrent threads. For this reason, the map SHOULD be thread-safe. This
can be accomplished either using Collections.synchronizedMap(Map)
or a ConcurrentHashMap. However, implementations MUST still be
synchronized on the map reference across operations which conditionally
insert into the map in order to make that update atomic and thread-safe.
Otherwise a race condition exists for the conditional insert and
different threads could get incoherent answers.
setBNodeMap in interface IStatementBuffer<S extends BigdataStatement>bnodes - The blank nodes map.
public void add(Resource s,
URI p,
Value o)
add in interface IStatementBuffer<S extends BigdataStatement>s - p - o -
public void add(Resource s,
URI p,
Value o,
Resource c)
add in interface IStatementBuffer<S extends BigdataStatement>s - p - o - c -
public void add(Resource s,
URI p,
Value o,
Resource c,
StatementEnum type)
add in interface IStatementBuffer<S extends BigdataStatement>s - The subject.p - The predicate.o - The object.c - The context (optional).type - The statement type (optional).public void add(S e)
IStatementBuffer
add in interface IStatementBuffer<S extends BigdataStatement>add in interface IBuffer<S extends BigdataStatement>e - The statement. If stmt implements
BigdataStatement then the StatementEnum will
be used (this makes it possible to load axioms into the
database as axioms) but the term identifiers on the stmt's
values will be ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||