ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/3] ignite git commit: IGNITE-1281 - Introduced afterMessageRead() method
Date Sat, 22 Aug 2015 00:22:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1281 15daf9d73 -> 7845225c7


IGNITE-1281 - Introduced afterMessageRead() method


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

Branch: refs/heads/ignite-1281
Commit: 76eed169afc11fdc878fcc4731c9b17c79a537a3
Parents: 15daf9d
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Fri Aug 21 16:10:18 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Fri Aug 21 16:10:18 2015 -0700

----------------------------------------------------------------------
 .../ignite/internal/direct/DirectMessageReader.java     |  5 +++++
 .../plugin/extensions/communication/MessageReader.java  | 12 ++++++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/76eed169/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
index 669ace1..d7d1c7d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/DirectMessageReader.java
@@ -56,6 +56,11 @@ public class DirectMessageReader implements MessageReader {
     }
 
     /** {@inheritDoc} */
+    @Override public boolean afterMessageRead() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
     @Override public byte readByte(String name) {
         byte val = stream.readByte();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/76eed169/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
index 833e851..41fc479 100644
--- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
+++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageReader.java
@@ -35,9 +35,21 @@ public interface MessageReader {
      */
     public void setBuffer(ByteBuffer buf);
 
+    /**
+     * Callback that must be invoked by a message implementation before message body started
decoding.
+     *
+     * @return {@code True} if reading can proceed, {@code false} otherwise.
+     */
     public boolean beforeMessageRead();
 
     /**
+     * Callback that must be invoked by a message implementation after message body finished
decoding.
+     *
+     * @return {@code True} if reading can proceed, {@code false} otherwise.
+     */
+    public boolean afterMessageRead();
+
+    /**
      * Reads {@code byte} value.
      *
      * @param name Field name.


Mime
View raw message