ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject incubator-ignite git commit: # GG-9613 review: initialize filter explicitly
Date Tue, 21 Apr 2015 15:40:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-gg-9613 11a080882 -> 0af90c221


# GG-9613 review: initialize filter explicitly


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

Branch: refs/heads/ignite-gg-9613
Commit: 0af90c221cca88b95bd9e451bb6378def405fbe2
Parents: 11a0808
Author: ptupitsyn <ptupitsyn@gridgain.com>
Authored: Tue Apr 21 18:36:10 2015 +0300
Committer: ptupitsyn <ptupitsyn@gridgain.com>
Committed: Tue Apr 21 18:36:10 2015 +0300

----------------------------------------------------------------------
 .../managers/communication/GridCloseableMessageFilter.java     | 5 +++++
 .../ignite/internal/managers/communication/GridIoManager.java  | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0af90c22/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridCloseableMessageFilter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridCloseableMessageFilter.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridCloseableMessageFilter.java
index e3888ab..27f0494 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridCloseableMessageFilter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridCloseableMessageFilter.java
@@ -27,4 +27,9 @@ public interface GridCloseableMessageFilter<K, V> extends IgniteBiPredicate<K,
V
      * Callback invoked when predicate is no longer needed.
      */
     public void onClose();
+
+    /**
+     * Initializes this instance.
+     */
+    public void init();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0af90c22/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index a1a882a..34d12c0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -1670,8 +1670,12 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             this.topic = topic;
             this.predLsnr = predLsnr;
 
-            if (predLsnr != null)
+            if (predLsnr != null) {
                 ctx.resource().injectGeneric(predLsnr);
+
+                if (predLsnr instanceof GridCloseableMessageFilter)
+                    ((GridCloseableMessageFilter)predLsnr).init();
+            }
         }
 
         /** {@inheritDoc} */


Mime
View raw message