commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [46/50] [abbrv] incubator-commonsrdf git commit: some javadoc
Date Sat, 02 Jul 2016 16:15:03 GMT
some javadoc


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/32fa75b5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/32fa75b5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/32fa75b5

Branch: refs/heads/jena
Commit: 32fa75b53965793667668b1d7db05e2df6e6c2a6
Parents: 5dda389
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Apr 1 16:37:09 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Fri Apr 1 16:37:09 2016 +0100

----------------------------------------------------------------------
 .../commons/rdf/simple/AbstractRDFParserBuilder.java  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/32fa75b5/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
b/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
index 409fac0..8777a0a 100644
--- a/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
+++ b/simple/src/main/java/org/apache/commons/rdf/simple/AbstractRDFParserBuilder.java
@@ -41,11 +41,21 @@ import org.apache.commons.rdf.api.RDFTermFactory;
  * {@link #sourceFile} using {@link Optional}. Some basic checking like
  * {@link #checkIsAbsolute(IRI)} is performed.
  * <p>
- * 
+ * This class and its subclasses are {@link Cloneable}, immutable and
+ * (therefore) thread-safe - each call to option methods like
+ * {@link #contentType(String)} or {@link #source(IRI)} will return a cloned,
+ * mutated copy.
+ * <p>
+ * By default, parsing is done by the abstract method
+ * {@link #parseSynchronusly()} - which is executed in a cloned snapshot - hence
+ * multiple {@link #parse()} calls are thread-safe. The default {@link #parse()}
+ * uses a thread pool in {@link #threadGroup} - but implementations can override
+ * {@link #parse()} (e.g. because it has its own threading model or use
+ * asynchronou  remote execution).
  */
 public abstract class AbstractRDFParserBuilder implements RDFParserBuilder, Cloneable {
 
-	private static final ThreadGroup threadGroup = new ThreadGroup("Commons RDF parsers");
+	public static final ThreadGroup threadGroup = new ThreadGroup("Commons RDF parsers");
 	private static final ExecutorService threadpool = Executors.newCachedThreadPool(r ->
new Thread(threadGroup, r));
 
 	// Basically only used for creating IRIs


Mime
View raw message