You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/05/17 16:52:12 UTC

ignite git commit: IGNITE-7963 Document addData() future completion behaviour and importance of flush/close. - Fixes #3651.

Repository: ignite
Updated Branches:
  refs/heads/master 07810b844 -> 7cd2a557f


IGNITE-7963 Document addData() future completion behaviour and importance of flush/close. - Fixes #3651.

Signed-off-by: dpavlov <dp...@apache.org>


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

Branch: refs/heads/master
Commit: 7cd2a557f17eb7775f5f01b9f6d3c62b2b451cd6
Parents: 07810b8
Author: Ilya Kasnacheev <il...@gmail.com>
Authored: Thu May 17 19:52:03 2018 +0300
Committer: dpavlov <dp...@apache.org>
Committed: Thu May 17 19:52:03 2018 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/IgniteDataStreamer.java   | 23 ++++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7cd2a557/modules/core/src/main/java/org/apache/ignite/IgniteDataStreamer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteDataStreamer.java b/modules/core/src/main/java/org/apache/ignite/IgniteDataStreamer.java
index 8b40bfa..a230b3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteDataStreamer.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteDataStreamer.java
@@ -327,7 +327,8 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      * Adds key for removal on remote node. Equivalent to {@link #addData(Object, Object) addData(key, null)}.
      *
      * @param key Key.
-     * @return Future fo this operation.
+     * @return Future for this operation.
+     *      Note: It may never complete unless {@link #flush()} or {@link #close()} are explicitly called.
      * @throws CacheException If failed to map key to node.
      * @throws IgniteInterruptedException If thread has been interrupted.
      * @throws IllegalStateException If grid has been concurrently stopped or
@@ -341,7 +342,7 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      * <p>
      * Note that streamer will stream data concurrently by multiple internal threads, so the
      * data may get to remote nodes in different order from which it was added to
-     * the streamer.
+     * the streamer. The data may not be sent until {@link #flush()} or {@link #close()} are called.
      * <p>
      * Note: if {@link IgniteDataStreamer#allowOverwrite()} set to {@code false} (by default)
      * then data streamer will not overwrite existing cache entries for better performance
@@ -349,7 +350,8 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      *
      * @param key Key.
      * @param val Value or {@code null} if respective entry must be removed from cache.
-     * @return Future fo this operation.
+     * @return Future for this operation.
+     *      Note: It may never complete unless {@link #flush()} or {@link #close()} are explicitly called.
      * @throws CacheException If failed to map key to node.
      * @throws IgniteInterruptedException If thread has been interrupted.
      * @throws IllegalStateException If grid has been concurrently stopped or
@@ -366,14 +368,15 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      * <p>
      * Note that streamer will stream data concurrently by multiple internal threads, so the
      * data may get to remote nodes in different order from which it was added to
-     * the streamer.
+     * the streamer. The data may not be sent until {@link #flush()} or {@link #close()} are called.
      * <p>
      * Note: if {@link IgniteDataStreamer#allowOverwrite()} set to {@code false} (by default)
      * then data streamer will not overwrite existing cache entries for better performance
      * (to change, set {@link IgniteDataStreamer#allowOverwrite(boolean)} to {@code true})
      *
      * @param entry Entry.
-     * @return Future fo this operation.
+     * @return Future for this operation.
+     *      Note: It may never complete unless {@link #flush()} or {@link #close()} are explicitly called.
      * @throws CacheException If failed to map key to node.
      * @throws IgniteInterruptedException If thread has been interrupted.
      * @throws IllegalStateException If grid has been concurrently stopped or
@@ -390,17 +393,18 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      * <p>
      * Note that streamer will stream data concurrently by multiple internal threads, so the
      * data may get to remote nodes in different order from which it was added to
-     * the streamer.
+     * the streamer. The data may not be sent until {@link #flush()} or {@link #close()} are called.
      * <p>
      * Note: if {@link IgniteDataStreamer#allowOverwrite()} set to {@code false} (by default)
      * then data streamer will not overwrite existing cache entries for better performance
      * (to change, set {@link IgniteDataStreamer#allowOverwrite(boolean)} to {@code true})
      *
      * @param entries Collection of entries to be streamed.
+     * @return Future for this stream operation.
+     *      Note: It may never complete unless {@link #flush()} or {@link #close()} are explicitly called.
      * @throws IllegalStateException If grid has been concurrently stopped or
      *      {@link #close(boolean)} has already been called on streamer.
      * @throws IgniteDataStreamerTimeoutException If {@code timeout} is exceeded.
-     * @return Future for this stream operation.
      * @see #allowOverwrite()
      */
     public IgniteFuture<?> addData(Collection<? extends Map.Entry<K, V>> entries) throws IllegalStateException,
@@ -412,17 +416,18 @@ public interface IgniteDataStreamer<K, V> extends AutoCloseable {
      * <p>
      * Note that streamer will stream data concurrently by multiple internal threads, so the
      * data may get to remote nodes in different order from which it was added to
-     * the streamer.
+     * the streamer. The data may not be sent until {@link #flush()} or {@link #close()} are called.
      * <p>
      * Note: if {@link IgniteDataStreamer#allowOverwrite()} set to {@code false} (by default)
      * then data streamer will not overwrite existing cache entries for better performance
      * (to change, set {@link IgniteDataStreamer#allowOverwrite(boolean)} to {@code true})
      *
      * @param entries Map to be streamed.
+     * @return Future for this stream operation.
+     *      Note: It may never complete unless {@link #flush()} or {@link #close()} are explicitly called.
      * @throws IllegalStateException If grid has been concurrently stopped or
      *      {@link #close(boolean)} has already been called on streamer.
      * @throws IgniteDataStreamerTimeoutException If {@code timeout} is exceeded.
-     * @return Future for this stream operation.
      * @see #allowOverwrite()
      */
     public IgniteFuture<?> addData(Map<K, V> entries) throws IllegalStateException,