You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/06/12 17:37:09 UTC

git commit: STREAMS-83 | Updated interface with isRunning method

Repository: incubator-streams
Updated Branches:
  refs/heads/STREAMS-83 [created] 92d8d8669


STREAMS-83 | Updated interface with isRunning method


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/92d8d866
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/92d8d866
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/92d8d866

Branch: refs/heads/STREAMS-83
Commit: 92d8d8669a077c884deee635e48728e0b089194e
Parents: ec2ae35
Author: mfranklin <mf...@apache.org>
Authored: Thu Jun 12 10:36:59 2014 -0500
Committer: mfranklin <mf...@apache.org>
Committed: Thu Jun 12 10:36:59 2014 -0500

----------------------------------------------------------------------
 .../apache/streams/core/StreamsProvider.java    | 38 +++++++++++++++++---
 1 file changed, 33 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/92d8d866/streams-core/src/main/java/org/apache/streams/core/StreamsProvider.java
----------------------------------------------------------------------
diff --git a/streams-core/src/main/java/org/apache/streams/core/StreamsProvider.java b/streams-core/src/main/java/org/apache/streams/core/StreamsProvider.java
index 2287c9a..1e6cf12 100644
--- a/streams-core/src/main/java/org/apache/streams/core/StreamsProvider.java
+++ b/streams-core/src/main/java/org/apache/streams/core/StreamsProvider.java
@@ -24,13 +24,41 @@ import java.math.BigInteger;
 import java.util.Queue;
 
 /**
- * Created by sblackmon on 12/13/13.
+ * A StreamsProvider represents the entry point into the Streams pipeline.  Providers are responsible for inserting
+ * data into the pipeline in discrete result sets.
  */
 public interface StreamsProvider extends StreamsOperation {
 
-    public void startStream();
-    public StreamsResultSet readCurrent();
-    public StreamsResultSet readNew(BigInteger sequence);
-    public StreamsResultSet readRange(DateTime start, DateTime end);
+    /**
+     * Start the operation of the stream
+     */
+    void startStream();
 
+    /**
+     * Read the current items available from the provider
+     * @return a non-null {@link org.apache.streams.core.StreamsResultSet}
+     */
+    StreamsResultSet readCurrent();
+
+    /**
+     * TODO: Define how this operates or eliminate
+     * @param sequence
+     * @return
+     */
+    StreamsResultSet readNew(BigInteger sequence);
+
+    /**
+     * TODO: Define how this operates or eliminate
+     * @param start
+     * @param end
+     * @return
+     */
+    StreamsResultSet readRange(DateTime start, DateTime end);
+
+    /**
+     * Flag to indicate whether the provider is producing data
+     * @return true if the processor is actively awaiting or producing data.  False otherwise.
+     */
+    boolean isRunning();
 }
+