jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject svn commit: r1437948 - in /jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang: StreamedQuadsIterator.java StreamedRDFIterator.java StreamedTriplesIterator.java StreamedTuplesIterator.java
Date Thu, 24 Jan 2013 11:03:13 GMT
Author: rvesse
Date: Thu Jan 24 11:03:12 2013
New Revision: 1437948

URL: http://svn.apache.org/viewvc?rev=1437948&view=rev
Log:
Add note in javadocs that the produced and consumer for a StreamedRDFIterator usually need
to be on different threads for things to work correctly

Modified:
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedQuadsIterator.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedRDFIterator.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTriplesIterator.java
    jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTuplesIterator.java

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedQuadsIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedQuadsIterator.java?rev=1437948&r1=1437947&r2=1437948&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedQuadsIterator.java
(original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedQuadsIterator.java
Thu Jan 24 11:03:12 2013
@@ -5,6 +5,7 @@
 package org.apache.jena.riot.lang;
 
 import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.riot.system.StreamRDF;
 
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
@@ -20,7 +21,15 @@ import com.hp.hpl.jena.sparql.core.Quad;
  * <p>
  * This stream silently discards any triples or tuples
  * </p>
- *  
+ * <p>
+ * In order for this to work correctly the producer thread which is passing
+ * information to the {@link StreamRDF} interface typically needs to be on a
+ * separate thread. However this depends on how the producer and the consumer
+ * are started, if the start of the producer does not block the main thread
+ * the consumer can happily be on the main thread.  Generally speaking though
+ * it is good practice to ensure that one of the actors on this class is
+ * running on a different thread.
+ * </p>
  */
 public class StreamedQuadsIterator extends StreamedRDFIterator<Quad> {
 

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedRDFIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedRDFIterator.java?rev=1437948&r1=1437947&r2=1437948&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedRDFIterator.java (original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedRDFIterator.java Thu
Jan 24 11:03:12 2013
@@ -8,9 +8,20 @@ import java.util.NoSuchElementException;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 
+import org.apache.jena.riot.system.StreamRDF;
+
 /**
  * Abstract implementation of a producer consumer RDF stream where the streamed
- * RDF feeds a buffer which is exposed via an iterator
+ * RDF feeds a buffer which is exposed via an iterator.
+ * <p>
+ * In order for this to work correctly the producer thread which is passing
+ * information to the {@link StreamRDF} interface typically needs to be on a
+ * separate thread. However this depends on how the producer and the consumer
+ * are started, if the start of the producer does not block the main thread
+ * the consumer can happily be on the main thread.  Generally speaking though
+ * it is good practice to ensure that one of the actors on this class is
+ * running on a different thread.
+ * </p>
  * 
  * @param <T>
  */

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTriplesIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTriplesIterator.java?rev=1437948&r1=1437947&r2=1437948&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTriplesIterator.java
(original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTriplesIterator.java
Thu Jan 24 11:03:12 2013
@@ -5,6 +5,7 @@
 package org.apache.jena.riot.lang;
 
 import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.riot.system.StreamRDF;
 
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
@@ -20,7 +21,15 @@ import com.hp.hpl.jena.sparql.core.Quad;
  * <p>
  * This stream silently discards any tuples or quads
  * </p>
- * 
+ * <p>
+ * In order for this to work correctly the producer thread which is passing
+ * information to the {@link StreamRDF} interface typically needs to be on a
+ * separate thread. However this depends on how the producer and the consumer
+ * are started, if the start of the producer does not block the main thread
+ * the consumer can happily be on the main thread.  Generally speaking though
+ * it is good practice to ensure that one of the actors on this class is
+ * running on a different thread.
+ * </p>
  */
 public class StreamedTriplesIterator extends StreamedRDFIterator<Triple>  {
 

Modified: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTuplesIterator.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTuplesIterator.java?rev=1437948&r1=1437947&r2=1437948&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTuplesIterator.java
(original)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/lang/StreamedTuplesIterator.java
Thu Jan 24 11:03:12 2013
@@ -5,6 +5,7 @@
 package org.apache.jena.riot.lang;
 
 import org.apache.jena.atlas.lib.Tuple;
+import org.apache.jena.riot.system.StreamRDF;
 
 import com.hp.hpl.jena.graph.Node;
 import com.hp.hpl.jena.graph.Triple;
@@ -20,7 +21,15 @@ import com.hp.hpl.jena.sparql.core.Quad;
  * <p>
  * This stream silently discards any triples or quads
  * </p>
- * 
+ * <p>
+ * In order for this to work correctly the producer thread which is passing
+ * information to the {@link StreamRDF} interface typically needs to be on a
+ * separate thread. However this depends on how the producer and the consumer
+ * are started, if the start of the producer does not block the main thread
+ * the consumer can happily be on the main thread.  Generally speaking though
+ * it is good practice to ensure that one of the actors on this class is
+ * running on a different thread.
+ * </p>
  */
 public class StreamedTuplesIterator extends StreamedRDFIterator<Tuple<Node>>
{
 



Mime
View raw message