Class StreamRDFToUpdateRequest
java.lang.Object
org.aksw.jenax.arq.util.streamrdf.StreamRDFToUpdateRequest
- All Implemented Interfaces:
org.apache.jena.riot.system.StreamRDF
public class StreamRDFToUpdateRequest
extends Object
implements org.apache.jena.riot.system.StreamRDF
A StreamRDF sink that dispatches batches of triples/quads as
SPARQL update requests.
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected org.aksw.commons.util.concurrent.CompletionTrackerstatic final intprotected org.apache.jena.graph.Nodeprotected Consumer<org.apache.jena.update.UpdateRequest>protected org.apache.jena.sparql.core.Prologueprotected ReadWriteLockprotected BlockingQueue<org.apache.jena.sparql.core.Quad> -
Constructor Summary
ConstructorsConstructorDescriptionStreamRDFToUpdateRequest(org.apache.jena.sparql.core.Prologue prologue, int batchSize, ExecutorService executorService, Consumer<org.apache.jena.update.UpdateRequest> insertHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidvoidstatic org.apache.jena.riot.system.StreamRDFcreateWithTrie(int batchSize, ExecutorService executorService, Consumer<org.apache.jena.update.UpdateRequest> insertHandler) voidfinish()voidvoidquad(org.apache.jena.sparql.core.Quad quad) voidvoidstart()voidtriple(org.apache.jena.graph.Triple triple) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.riot.system.StreamRDF
version
-
Field Details
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
queue
-
batchSize
protected int batchSize -
graphNode
protected org.apache.jena.graph.Node graphNode -
prologueLock
-
completionTracker
protected org.aksw.commons.util.concurrent.CompletionTracker completionTracker -
insertHandler
-
prologue
protected org.apache.jena.sparql.core.Prologue prologue
-
-
Constructor Details
-
StreamRDFToUpdateRequest
public StreamRDFToUpdateRequest(org.apache.jena.sparql.core.Prologue prologue, int batchSize, ExecutorService executorService, Consumer<org.apache.jena.update.UpdateRequest> insertHandler)
-
-
Method Details
-
createWithTrie
public static org.apache.jena.riot.system.StreamRDF createWithTrie(int batchSize, ExecutorService executorService, Consumer<org.apache.jena.update.UpdateRequest> insertHandler) -
sendBatch
public void sendBatch() -
checkSendBatch
public void checkSendBatch() -
start
public void start()- Specified by:
startin interfaceorg.apache.jena.riot.system.StreamRDF
-
triple
public void triple(org.apache.jena.graph.Triple triple) - Specified by:
triplein interfaceorg.apache.jena.riot.system.StreamRDF
-
quad
public void quad(org.apache.jena.sparql.core.Quad quad) - Specified by:
quadin interfaceorg.apache.jena.riot.system.StreamRDF
-
base
- Specified by:
basein interfaceorg.apache.jena.riot.system.StreamRDF
-
prefix
- Specified by:
prefixin interfaceorg.apache.jena.riot.system.StreamRDF
-
finish
public void finish()- Specified by:
finishin interfaceorg.apache.jena.riot.system.StreamRDF
-
abort
public void abort()
-