http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java index 77bbe39..c0db018 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheSqlQuery.java @@ -55,6 +55,9 @@ public class GridCacheSqlQuery implements Message { @GridDirectTransient private LinkedHashMap<String, ?> cols; + /** Field kept for backward compatibility. */ + private String alias; + /** * For {@link Message}. */ @@ -149,7 +152,7 @@ public class GridCacheSqlQuery implements Message { switch (writer.state()) { case 0: - if (!writer.writeString("alias", null)) + if (!writer.writeString("alias", alias)) return false; writer.incrementState(); @@ -180,7 +183,7 @@ public class GridCacheSqlQuery implements Message { switch (reader.state()) { case 0: - reader.readString("alias"); + alias = reader.readString("alias"); if (!reader.isLastRead()) return false; @@ -205,7 +208,7 @@ public class GridCacheSqlQuery implements Message { } - return true; + return reader.afterMessageRead(GridCacheSqlQuery.class); } /** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java index 060afb9..02ec7ac 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEntry.java @@ -279,7 +279,7 @@ public class CacheContinuousQueryEntry implements GridCacheDeployable, Message { } - return true; + return reader.afterMessageRead(CacheContinuousQueryEntry.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java index e9070a5..e7a11d0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxEntry.java @@ -987,7 +987,7 @@ public class IgniteTxEntry implements GridPeerDeployAware, Message { } - return true; + return reader.afterMessageRead(IgniteTxEntry.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java index f80f960..bbb7559 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java @@ -167,7 +167,7 @@ public class IgniteTxKey implements Message { } - return true; + return reader.afterMessageRead(IgniteTxKey.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java index 0bd3d52..4c41e21 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxEntryValueHolder.java @@ -222,7 +222,7 @@ public class TxEntryValueHolder implements Message { } - return true; + return reader.afterMessageRead(TxEntryValueHolder.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java index 87fe976..86a9b1b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheRawVersionedEntry.java @@ -307,7 +307,7 @@ public class GridCacheRawVersionedEntry<K, V> extends DataStreamerEntry implemen assert key != null; assert !(val != null && valBytes != null); - return true; + return reader.afterMessageRead(GridCacheRawVersionedEntry.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java index 8df54c8..a72c5c2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java @@ -326,7 +326,7 @@ public class GridCacheVersion implements Message, Comparable<GridCacheVersion>, } - return true; + return reader.afterMessageRead(GridCacheVersion.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java index 812d656..5e848d5 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionEx.java @@ -137,7 +137,7 @@ public class GridCacheVersionEx extends GridCacheVersion { } - return true; + return reader.afterMessageRead(GridCacheVersionEx.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java index dc015b7..23bc179 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaSnapshotMessage.java @@ -126,7 +126,7 @@ public class GridClockDeltaSnapshotMessage implements Message { } - return true; + return reader.afterMessageRead(GridClockDeltaSnapshotMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java index ffb02f7..941a1fa 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java @@ -165,7 +165,7 @@ public class GridClockDeltaVersion implements Message, Comparable<GridClockDelta } - return true; + return reader.afterMessageRead(GridClockDeltaVersion.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java index fe50fd8..e521a0c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java @@ -248,7 +248,7 @@ public class GridContinuousMessage implements Message { } - return true; + return reader.afterMessageRead(GridContinuousMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerEntry.java index 88fda8f..7eadb04 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerEntry.java @@ -150,7 +150,7 @@ public class DataStreamerEntry implements Map.Entry<KeyCacheObject, CacheObject> } - return true; + return reader.afterMessageRead(DataStreamerEntry.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java index 0d24ee0..fa08b7b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerRequest.java @@ -466,7 +466,7 @@ public class DataStreamerRequest implements Message { } - return true; + return reader.afterMessageRead(DataStreamerRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerResponse.java index 8aee0d5..e753e32 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerResponse.java @@ -151,7 +151,7 @@ public class DataStreamerResponse implements Message { } - return true; + return reader.afterMessageRead(DataStreamerResponse.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java index f52c6de..b551b7b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAckMessage.java @@ -177,7 +177,7 @@ public class IgfsAckMessage extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsAckMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java index b86eb29..efb84d4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlockKey.java @@ -240,7 +240,7 @@ public final class IgfsBlockKey implements Message, Externalizable, Comparable<I } - return true; + return reader.afterMessageRead(IgfsBlockKey.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlocksMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlocksMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlocksMessage.java index fbf2796..120745c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlocksMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsBlocksMessage.java @@ -158,7 +158,7 @@ public class IgfsBlocksMessage extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsBlocksMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java index 309daf1..c2c24ca 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsCommunicationMessage.java @@ -69,7 +69,7 @@ public abstract class IgfsCommunicationMessage implements Message { if (!reader.beforeMessageRead()) return false; - return true; + return reader.afterMessageRead(IgfsCommunicationMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java index 2196525..8656745 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsDeleteMessage.java @@ -167,7 +167,7 @@ public class IgfsDeleteMessage extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsDeleteMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java index 9736f10..d18ea82 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFileAffinityRange.java @@ -56,6 +56,9 @@ public class IgfsFileAffinityRange implements Message, Externalizable { /** Range end offset (endOff + 1 divisible by block size). */ private long endOff; + /** Field kept for backward compatibility. */ + private boolean done; + /** * Empty constructor required by {@link Externalizable}. */ @@ -265,7 +268,7 @@ public class IgfsFileAffinityRange implements Message, Externalizable { case 1: // The field 'done' was removed, but its writing preserved for compatibility reasons. - if (!writer.writeBoolean("done", false)) + if (!writer.writeBoolean("done", done)) return false; writer.incrementState(); @@ -311,7 +314,7 @@ public class IgfsFileAffinityRange implements Message, Externalizable { case 1: // field 'done' was removed, but reading preserved for compatibility reasons. - reader.readBoolean("done"); + done = reader.readBoolean("done"); if (!reader.isLastRead()) return false; @@ -344,7 +347,7 @@ public class IgfsFileAffinityRange implements Message, Externalizable { } - return true; + return reader.afterMessageRead(IgfsFileAffinityRange.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerRequest.java index 9223009..cf657e3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerRequest.java @@ -139,7 +139,7 @@ public class IgfsFragmentizerRequest extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsFragmentizerRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerResponse.java index 9ba6920..6dd7534 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsFragmentizerResponse.java @@ -101,7 +101,7 @@ public class IgfsFragmentizerResponse extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsFragmentizerResponse.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsSyncMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsSyncMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsSyncMessage.java index 0fb683c..60b56ac 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsSyncMessage.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsSyncMessage.java @@ -132,7 +132,7 @@ public class IgfsSyncMessage extends IgfsCommunicationMessage { } - return true; + return reader.afterMessageRead(IgfsSyncMessage.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryCancelRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryCancelRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryCancelRequest.java index c1daa6e..e679ed4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryCancelRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryCancelRequest.java @@ -99,7 +99,7 @@ public class GridQueryCancelRequest implements Message { } - return true; + return reader.afterMessageRead(GridQueryCancelRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryFailResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryFailResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryFailResponse.java index a959193..6fd607c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryFailResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryFailResponse.java @@ -125,7 +125,7 @@ public class GridQueryFailResponse implements Message { } - return true; + return reader.afterMessageRead(GridQueryFailResponse.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageRequest.java index 474cd55..8e95ab8 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageRequest.java @@ -152,7 +152,7 @@ public class GridQueryNextPageRequest implements Message { } - return true; + return reader.afterMessageRead(GridQueryNextPageRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageResponse.java index 0f62ae9..d06e118 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryNextPageResponse.java @@ -29,6 +29,7 @@ import java.util.*; /** * Next page response. */ +@IgniteCodeGeneratingFail public class GridQueryNextPageResponse implements Message { /** */ private static final long serialVersionUID = 0L; @@ -268,7 +269,7 @@ public class GridQueryNextPageResponse implements Message { } - return true; + return reader.afterMessageRead(GridQueryNextPageResponse.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryRequest.java index 47d1f44..2b04c52 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/messages/GridQueryRequest.java @@ -31,6 +31,7 @@ import java.util.*; /** * Query request. */ +@IgniteCodeGeneratingFail public class GridQueryRequest implements Message { /** */ private static final long serialVersionUID = 0L; @@ -222,6 +223,7 @@ public class GridQueryRequest implements Message { return false; writer.incrementState(); + } return true; @@ -290,9 +292,10 @@ public class GridQueryRequest implements Message { return false; reader.incrementState(); + } - return true; + return reader.afterMessageRead(GridQueryRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java index 3802222..951b1e0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultRequest.java @@ -153,7 +153,7 @@ public class GridTaskResultRequest implements Message { } - return true; + return reader.afterMessageRead(GridTaskResultRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java index 66421a1..d29c525 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/task/GridTaskResultResponse.java @@ -199,7 +199,7 @@ public class GridTaskResultResponse implements Message { } - return true; + return reader.afterMessageRead(GridTaskResultResponse.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java index de5dd47..83939c0 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java @@ -461,7 +461,7 @@ public class GridByteArrayList implements Message, Externalizable { } - return true; + return reader.afterMessageRead(GridByteArrayList.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java index f056f37..1711f03 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java @@ -559,7 +559,7 @@ public class GridLongList implements Message, Externalizable { } - return true; + return reader.afterMessageRead(GridLongList.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java index d632cac..939ad0a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridDirectParser.java @@ -62,7 +62,7 @@ public class GridDirectParser implements GridNioParser { if (msg == null && buf.hasRemaining()) { msg = msgFactory.create(buf.get()); - ses.addMeta(READER_META_KEY, reader = formatter.reader(msgFactory)); + ses.addMeta(READER_META_KEY, reader = formatter.reader(msgFactory, msg.getClass())); } boolean finished = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java index 6176561..85f6045 100644 --- a/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java +++ b/modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java @@ -41,7 +41,8 @@ public interface MessageFormatter extends Extension { * Creates new message reader instance. * * @param factory Message factory. + * @param msgCls Message class to read. * @return Message reader. */ - public MessageReader reader(MessageFactory factory); + public MessageReader reader(MessageFactory factory, Class<? extends Message> msgCls); } http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/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..11ea97d 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,22 @@ 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. + * + * @param msgCls Message class finishing read stage. + * @return {@code True} if reading can proceed, {@code false} otherwise. + */ + public boolean afterMessageRead(Class<? extends Message> msgCls); + + /** * Reads {@code byte} value. * * @param name Field name. http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java index f809d82..0d08171 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java @@ -684,7 +684,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement throw new IgniteException("Failed to write message, node is not started."); } - @Override public MessageReader reader(MessageFactory factory) { + @Override public MessageReader reader(MessageFactory factory, Class<? extends Message> msgCls) { throw new IgniteException("Failed to read message, node is not started."); } }; http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java index 9d9c222..8b95149 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingRequest.java @@ -95,7 +95,7 @@ public class JobStealingRequest implements Message { } - return true; + return reader.afterMessageRead(JobStealingRequest.class); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java index b706edf..4022cf6 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java @@ -1510,13 +1510,13 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter return impl.writer(); } - @Override public MessageReader reader(MessageFactory factory) { + @Override public MessageReader reader(MessageFactory factory, Class<? extends Message> msgCls) { if (impl == null) impl = getSpiContext().messageFormatter(); assert impl != null; - return impl.reader(factory); + return impl.reader(factory, msgCls); } }; @@ -2845,13 +2845,13 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter return impl.writer(); } - @Override public MessageReader reader(MessageFactory factory) { + @Override public MessageReader reader(MessageFactory factory, Class<? extends Message> msgCls) { if (impl == null) impl = getSpiContext().messageFormatter(); assert impl != null; - return impl.reader(factory); + return impl.reader(factory, msgCls); } }; http://git-wip-us.apache.org/repos/asf/ignite/blob/89e94b63/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java index 08268af..038af02 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridSpiTestContext.java @@ -474,7 +474,7 @@ public class GridSpiTestContext implements IgniteSpiContext { return new DirectMessageWriter(); } - @Override public MessageReader reader(MessageFactory factory) { + @Override public MessageReader reader(MessageFactory factory, Class<? extends Message> msgCls) { return new DirectMessageReader(factory, this); } };