ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [06/26] incubator-ignite git commit: # ignite-669 - streaming design.
Date Sun, 17 May 2015 19:37:28 GMT
# ignite-669 - streaming design.


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

Branch: refs/heads/ignite-709_2
Commit: be64e1dd1f7aba02b664c4be6f2753cdafbbdba6
Parents: 0cbe3c6
Author: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Authored: Thu Apr 2 03:10:54 2015 -0700
Committer: agura <agura@gridgain.com>
Committed: Fri May 15 03:44:18 2015 +0300

----------------------------------------------------------------------
 .../ignite/stream/adapters/StreamAdapter.java   | 29 +++++++++++++++++---
 1 file changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/be64e1dd/modules/core/src/main/java/org/apache/ignite/stream/adapters/StreamAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/stream/adapters/StreamAdapter.java
b/modules/core/src/main/java/org/apache/ignite/stream/adapters/StreamAdapter.java
index 02ae795..f2e0da9 100644
--- a/modules/core/src/main/java/org/apache/ignite/stream/adapters/StreamAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/stream/adapters/StreamAdapter.java
@@ -29,10 +29,17 @@ import java.util.*;
  */
 public abstract class StreamAdapter<T, K, V> {
     /** Tuple extractor. */
-    private final StreamTupleExtractor<T, K, V> extractor;
+    private StreamTupleExtractor<T, K, V> extractor;
 
     /** Streamer. */
-    private final IgniteDataStreamer<K, V> stmr;
+    private IgniteDataStreamer<K, V> stmr;
+
+    /**
+     * Empty constructor.
+     */
+    public StreamAdapter() {
+        // No-op.
+    }
 
     /**
      * Stream adapter.
@@ -48,18 +55,32 @@ public abstract class StreamAdapter<T, K, V> {
     /**
      * @return Provided data streamer.
      */
-    public IgniteDataStreamer<K, V> streamer() {
+    public IgniteDataStreamer<K, V> getStreamer() {
         return stmr;
     }
 
     /**
+     * @param stmr Ignite data streamer.
+     */
+    public void setStreamer(IgniteDataStreamer<K, V> stmr) {
+        this.stmr = stmr;
+    }
+
+    /**
      * @return Provided tuple extractor.
      */
-    public StreamTupleExtractor<T, K, V> converter() {
+    public StreamTupleExtractor<T, K, V> getConverter() {
         return extractor;
     }
 
     /**
+     * @param extractor Extractor for key-value tuples from messages.
+     */
+    public void setExtractor(StreamTupleExtractor<T, K, V> extractor) {
+        this.extractor = extractor;
+    }
+
+    /**
      * Converts given message to a tuple and adds it to the underlying streamer.
      *
      * @param msg Message to convert.


Mime
View raw message