ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: Changed RendezvousAffinityFunction Externalizable->Serializable, also affinityBackupFilter was not serialized.
Date Fri, 19 May 2017 08:27:25 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 9e88f979b -> 8dee53492


Changed RendezvousAffinityFunction Externalizable->Serializable, also affinityBackupFilter
was not serialized.


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

Branch: refs/heads/master
Commit: 8dee534924a33c9227ce7327a6dea4b1bcefad25
Parents: 9e88f97
Author: sboikov <sboikov@gridgain.com>
Authored: Fri May 19 11:27:13 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri May 19 11:27:13 2017 +0300

----------------------------------------------------------------------
 .../rendezvous/RendezvousAffinityFunction.java  | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8dee5349/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
index 0be9878..f673e9c 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
@@ -69,7 +69,7 @@ import org.jetbrains.annotations.Nullable;
  * <p>
  * Cache affinity can be configured for individual caches via {@link CacheConfiguration#getAffinity()}
method.
  */
-public class RendezvousAffinityFunction implements AffinityFunction, Externalizable {
+public class RendezvousAffinityFunction implements AffinityFunction, Serializable {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -83,7 +83,7 @@ public class RendezvousAffinityFunction implements AffinityFunction, Externaliza
     private int parts;
 
     /** Mask to use in calculation when partitions count is power of 2. */
-    private transient int mask = -1;
+    private int mask = -1;
 
     /** Exclude neighbors flag. */
     private boolean exclNeighbors;
@@ -501,22 +501,6 @@ public class RendezvousAffinityFunction implements AffinityFunction,
Externaliza
         // No-op.
     }
 
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeInt(parts);
-        out.writeBoolean(exclNeighbors);
-        out.writeObject(backupFilter);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-        setPartitions(in.readInt());
-
-        exclNeighbors = in.readBoolean();
-        backupFilter = (IgniteBiPredicate<ClusterNode, ClusterNode>)in.readObject();
-    }
-
     /**
      *
      */


Mime
View raw message