Package org.apache.jena.riot.system
Class AsyncParser
java.lang.Object
org.apache.jena.riot.system.AsyncParser
Async parsing - parses a list of files or URLs on a separate thread.
The parser runs on a separate thread. It's output is sent to a StreamRDF on the
callers thread. The parser output is batched into blocks and placed on a
finite-sized concurrent BlockingQueue.
There are overheads, so this is only beneficial in some situations. Delivery to the StreamRDF has an initial latency while the first batch of work is accumulated.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidasyncParse(InputStream input, Lang lang, String baseURI, StreamRDF output) Function to that parses anInputStreamon a separate thread and sends the output to a StreamRDF on the callers thread.static voidasyncParse(String filesOrURL, StreamRDF output) Function that reads a file or GETs a URL, parses the content on a separate thread and sends the output to a StreamRDF on the callers thread.static voidasyncParse(List<String> filesOrURLs, StreamRDF output) Function that parses content from a list of files or URLs on a separate thread and sends the output to a StreamRDF on the callers thread.asyncParseQuads(InputStream input, Lang lang, String baseURI) Pull parser - quads.asyncParseQuads(String fileOrURL) Pull parser - quadsasyncParseQuads(List<String> filesOrURLs) Pull parser - quadsstatic voidasyncParseSources(List<RDFParserBuilder> sources, StreamRDF output) Parse a number of sources (RDFParserBuilders) on a separate thread and send the output to a StreamRDF on the callers thread.asyncParseTriples(InputStream input, Lang lang, String baseURI) Pull parser - triples.asyncParseTriples(String fileOrURL) Pull parser - triplesasyncParseTriples(List<String> filesOrURLs) Pull parser - triples
-
Method Details
-
asyncParse
Function that reads a file or GETs a URL, parses the content on a separate thread and sends the output to a StreamRDF on the callers thread. -
asyncParse
Function that parses content from a list of files or URLs on a separate thread and sends the output to a StreamRDF on the callers thread. -
asyncParse
Function to that parses anInputStreamon a separate thread and sends the output to a StreamRDF on the callers thread. -
asyncParseSources
Parse a number of sources (RDFParserBuilders) on a separate thread and send the output to a StreamRDF on the callers thread. -
asyncParseTriples
Pull parser - triples -
asyncParseTriples
Pull parser - triples -
asyncParseTriples
Pull parser - triples.See also
RiotParsers.createIteratorNTriples(java.io.InputStream, org.apache.jena.riot.system.StreamRDF). -
asyncParseQuads
Pull parser - quads -
asyncParseQuads
Pull parser - quads -
asyncParseQuads
Pull parser - quads.See also
RiotParsers.createIteratorNQuads(java.io.InputStream, org.apache.jena.riot.system.StreamRDF).
-