Class AsyncParser

java.lang.Object
org.apache.jena.riot.system.AsyncParser

public class AsyncParser extends Object
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. Using the AsyncParserBuilder gives control over the chunk size such that initial latency can be reduced at the cost of possibly decreasing the overall throughput.

Closing the returned ClosableIterators terminates the parsing process and closes the involved resources.