ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [03/50] ignite git commit: Cleanup
Date Wed, 13 Apr 2016 14:53:02 GMT
Cleanup


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

Branch: refs/heads/ignite-2977
Commit: 6712c7f3f78d87394166996678b57b222593e494
Parents: 7373129
Author: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Authored: Tue Apr 12 17:30:10 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@gridgain.com>
Committed: Tue Apr 12 17:30:10 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/binary/BinaryContext.java  |  3 ++-
 .../ignite/internal/binary/GridBinaryMarshaller.java      |  3 +++
 .../platform/cache/query/PlatformContinuousQueryImpl.java | 10 ++++++----
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6712c7f3/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index d0cbe11..851b025 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -275,7 +275,8 @@ public class BinaryContext {
         registerPredefinedType(GridMapEntry.class, 60);
         registerPredefinedType(IgniteBiTuple.class, 61);
         registerPredefinedType(T2.class, 62);
-        registerPredefinedType(PlatformJavaObjectFactoryProxy.class, 99);
+        registerPredefinedType(PlatformJavaObjectFactoryProxy.class,
+            GridBinaryMarshaller.PLATFORM_JAVA_OBJECT_FACTORY_PROXY);
 
         registerPredefinedType(BinaryObjectImpl.class, 0);
         registerPredefinedType(BinaryObjectOffheapImpl.class, 0);

http://git-wip-us.apache.org/repos/asf/ignite/blob/6712c7f3/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
b/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
index 00d8871..ad63521 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java
@@ -181,6 +181,9 @@ public class GridBinaryMarshaller {
     public static final byte LINKED_HASH_MAP = 2;
 
     /** */
+    public static final byte PLATFORM_JAVA_OBJECT_FACTORY_PROXY = 99;
+
+    /** */
     public static final int OBJECT_TYPE_ID = -1;
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/6712c7f3/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
index e030ec4..471b1db 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformContinuousQueryImpl.java
@@ -32,6 +32,7 @@ import org.apache.ignite.cache.query.Query;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.internal.GridKernalContext;
 import org.apache.ignite.internal.binary.BinaryObjectImpl;
+import org.apache.ignite.internal.binary.GridBinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.IgniteCacheProxy;
 import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
 import org.apache.ignite.internal.processors.platform.PlatformContext;
@@ -101,7 +102,7 @@ public class PlatformContinuousQueryImpl implements PlatformContinuousQuery
{
         if (filter instanceof BinaryObjectImpl) {
             BinaryObjectImpl bo = (BinaryObjectImpl)filter;
 
-            if (bo.typeId() == 99) { // todo: const
+            if (bo.typeId() == GridBinaryMarshaller.PLATFORM_JAVA_OBJECT_FACTORY_PROXY) {
                 PlatformJavaObjectFactoryProxy f = bo.deserialize();
 
                 return  (CacheEntryEventFilter)f.factory(ctx).create();
@@ -122,8 +123,8 @@ public class PlatformContinuousQueryImpl implements PlatformContinuousQuery
{
      * @param initialQry Initial query.
      */
     @SuppressWarnings("unchecked")
-    public void start(IgniteCacheProxy cache, boolean loc, int bufSize, long timeInterval,
boolean autoUnsubscribe,
-        Query initialQry) throws IgniteCheckedException {
+    @Override public void start(IgniteCacheProxy cache, boolean loc, int bufSize, long timeInterval,
+        boolean autoUnsubscribe, Query initialQry) throws IgniteCheckedException {
         assert !loc || filter == null;
 
         lock.writeLock().lock();
@@ -200,6 +201,7 @@ public class PlatformContinuousQueryImpl implements PlatformContinuousQuery
{
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Override public boolean evaluate(CacheEntryEvent evt) throws CacheEntryListenerException
{
         if (javaFilter != null)
             return javaFilter.evaluate(evt);
@@ -262,7 +264,7 @@ public class PlatformContinuousQueryImpl implements PlatformContinuousQuery
{
      * @return Filter to be deployed on remote node.
      * @throws ObjectStreamException If failed.
      */
-    Object writeReplace() throws ObjectStreamException {
+    protected Object writeReplace() throws ObjectStreamException {
         if (javaFilter != null)
             return javaFilter;
 


Mime
View raw message