You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/11/05 11:00:55 UTC
[1/3] ignite git commit: IGNITE-1819: First iteration.
Repository: ignite
Updated Branches:
refs/heads/ignite-1819 [created] 74b25b3dc
IGNITE-1819: First iteration.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/df6b8ee1
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/df6b8ee1
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/df6b8ee1
Branch: refs/heads/ignite-1819
Commit: df6b8ee16e9b5803a013a066de6df87f64e23bf1
Parents: f7b308f
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Nov 5 12:43:13 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Nov 5 12:43:13 2015 +0300
----------------------------------------------------------------------
.../internal/portable/PortableContext.java | 20 +-
.../marshaller/portable/PortableMarshaller.java | 23 +-
.../portable/PortableTypeConfiguration.java | 24 +-
.../GridPortableMetaDataDisabledSelfTest.java | 238 -------------------
.../IgnitePortableObjectsTestSuite.java | 2 -
5 files changed, 9 insertions(+), 298 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/df6b8ee1/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index e61cba7..8380053 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -150,9 +150,6 @@ public class PortableContext implements Externalizable {
private boolean convertStrings;
/** */
- private boolean metaDataEnabled;
-
- /** */
private boolean keepDeserialized;
/** Object schemas. */
@@ -253,7 +250,6 @@ public class PortableContext implements Externalizable {
return;
convertStrings = marsh.isConvertStringToBytes();
- metaDataEnabled = marsh.isMetaDataEnabled();
keepDeserialized = marsh.isKeepDeserialized();
marshCtx = marsh.getContext();
@@ -265,7 +261,6 @@ public class PortableContext implements Externalizable {
configure(
marsh.getIdMapper(),
marsh.getSerializer(),
- marsh.isMetaDataEnabled(),
marsh.isKeepDeserialized(),
marsh.getClassNames(),
marsh.getTypeConfigurations()
@@ -275,7 +270,6 @@ public class PortableContext implements Externalizable {
/**
* @param globalIdMapper ID mapper.
* @param globalSerializer Serializer.
- * @param globalMetaDataEnabled Metadata enabled flag.
* @param globalKeepDeserialized Keep deserialized flag.
* @param clsNames Class names.
* @param typeCfgs Type configurations.
@@ -284,7 +278,6 @@ public class PortableContext implements Externalizable {
private void configure(
PortableIdMapper globalIdMapper,
PortableSerializer globalSerializer,
- boolean globalMetaDataEnabled,
boolean globalKeepDeserialized,
Collection<String> clsNames,
Collection<PortableTypeConfiguration> typeCfgs
@@ -299,11 +292,11 @@ public class PortableContext implements Externalizable {
String pkgName = clsName.substring(0, clsName.length() - 2);
for (String clsName0 : classesInPackage(pkgName))
- descs.add(clsName0, idMapper, null, null, globalMetaDataEnabled,
+ descs.add(clsName0, idMapper, null, null, true,
globalKeepDeserialized, true);
}
else // Regular single class
- descs.add(clsName, idMapper, null, null, globalMetaDataEnabled,
+ descs.add(clsName, idMapper, null, null, true,
globalKeepDeserialized, true);
}
}
@@ -327,8 +320,7 @@ public class PortableContext implements Externalizable {
if (typeCfg.getSerializer() != null)
serializer = typeCfg.getSerializer();
- boolean metaDataEnabled = typeCfg.isMetaDataEnabled() != null ? typeCfg.isMetaDataEnabled() :
- globalMetaDataEnabled;
+ boolean metaDataEnabled = true;
boolean keepDeserialized = typeCfg.isKeepDeserialized() != null ? typeCfg.isKeepDeserialized() :
globalKeepDeserialized;
@@ -513,7 +505,7 @@ public class PortableContext implements Externalizable {
clsName,
BASIC_CLS_ID_MAPPER,
null,
- metaDataEnabled,
+ true,
keepDeserialized,
true, /* registered */
false /* predefined */
@@ -559,7 +551,7 @@ public class PortableContext implements Externalizable {
typeName,
idMapper,
null,
- metaDataEnabled,
+ true,
keepDeserialized,
registered,
false /* predefined */
@@ -806,7 +798,7 @@ public class PortableContext implements Externalizable {
public boolean isMetaDataEnabled(int typeId) {
Boolean enabled = metaEnabled.get(typeId);
- return enabled != null ? enabled : metaDataEnabled;
+ return enabled != null ? enabled : true;
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/df6b8ee1/modules/core/src/main/java/org/apache/ignite/marshaller/portable/PortableMarshaller.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/portable/PortableMarshaller.java b/modules/core/src/main/java/org/apache/ignite/marshaller/portable/PortableMarshaller.java
index f9cf509..026b740 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/portable/PortableMarshaller.java
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/portable/PortableMarshaller.java
@@ -90,9 +90,6 @@ public class PortableMarshaller extends AbstractMarshaller {
/** Whether to convert string to bytes using UTF-8 encoding. */
private boolean convertString = true;
- /** Meta data enabled flag. */
- private boolean metaDataEnabled = true;
-
/** Keep deserialized flag. */
private boolean keepDeserialized = true;
@@ -197,25 +194,6 @@ public class PortableMarshaller extends AbstractMarshaller {
}
/**
- * If {@code true}, meta data will be collected or all types. If you need to override this behaviour for
- * some specific type, use {@link PortableTypeConfiguration#setMetaDataEnabled(Boolean)} method.
- * <p>
- * Default value if {@code true}.
- *
- * @return Whether meta data is collected.
- */
- public boolean isMetaDataEnabled() {
- return metaDataEnabled;
- }
-
- /**
- * @param metaDataEnabled Whether meta data is collected.
- */
- public void setMetaDataEnabled(boolean metaDataEnabled) {
- this.metaDataEnabled = metaDataEnabled;
- }
-
- /**
* If {@code true}, {@link PortableObject} will cache deserialized instance after
* {@link PortableObject#deserialize()} is called. All consequent calls of this
* method on the same instance of {@link PortableObject} will return that cached
@@ -252,6 +230,7 @@ public class PortableMarshaller extends AbstractMarshaller {
* <p/>
* @param ctx Portable context.
*/
+ @SuppressWarnings("UnusedDeclaration")
private void setPortableContext(PortableContext ctx) {
ctx.configure(this);
http://git-wip-us.apache.org/repos/asf/ignite/blob/df6b8ee1/modules/core/src/main/java/org/apache/ignite/portable/PortableTypeConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/portable/PortableTypeConfiguration.java b/modules/core/src/main/java/org/apache/ignite/portable/PortableTypeConfiguration.java
index 68f0514..056487a 100644
--- a/modules/core/src/main/java/org/apache/ignite/portable/PortableTypeConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/portable/PortableTypeConfiguration.java
@@ -17,11 +17,11 @@
package org.apache.ignite.portable;
-import java.sql.Timestamp;
-import java.util.Collection;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.marshaller.portable.PortableMarshaller;
+import java.util.Collection;
+
/**
* Defines configuration properties for a specific portable type. Providing per-type
* configuration is optional, as it is generally enough, and also optional, to provide global portable
@@ -41,9 +41,6 @@ public class PortableTypeConfiguration {
/** Serializer. */
private PortableSerializer serializer;
- /** Meta data enabled flag. */
- private Boolean metaDataEnabled;
-
/** Keep deserialized flag. */
private Boolean keepDeserialized;
@@ -118,23 +115,6 @@ public class PortableTypeConfiguration {
}
/**
- * Defines whether meta data is collected for this type. If provided, this value will override
- * {@link PortableMarshaller#isMetaDataEnabled()} property.
- *
- * @return Whether meta data is collected.
- */
- public Boolean isMetaDataEnabled() {
- return metaDataEnabled;
- }
-
- /**
- * @param metaDataEnabled Whether meta data is collected.
- */
- public void setMetaDataEnabled(Boolean metaDataEnabled) {
- this.metaDataEnabled = metaDataEnabled;
- }
-
- /**
* Defines whether {@link PortableObject} should cache deserialized instance. If provided,
* this value will override {@link PortableMarshaller#isKeepDeserialized()}
* property.
http://git-wip-us.apache.org/repos/asf/ignite/blob/df6b8ee1/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
deleted file mode 100644
index 05df23b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/portable/GridPortableMetaDataDisabledSelfTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ignite.internal.portable;
-
-import java.util.Arrays;
-import org.apache.ignite.IgnitePortables;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.marshaller.portable.PortableMarshaller;
-import org.apache.ignite.portable.PortableBuilder;
-import org.apache.ignite.portable.PortableException;
-import org.apache.ignite.portable.PortableMarshalAware;
-import org.apache.ignite.portable.PortableReader;
-import org.apache.ignite.portable.PortableTypeConfiguration;
-import org.apache.ignite.portable.PortableWriter;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Test for disabled meta data.
- */
-public class GridPortableMetaDataDisabledSelfTest extends GridCommonAbstractTest {
- /** */
- private PortableMarshaller marsh;
-
- /** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(gridName);
-
- cfg.setMarshaller(marsh);
-
- return cfg;
- }
-
- /**
- * @return Portables.
- */
- private IgnitePortables portables() {
- return grid().portables();
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDisableGlobal() throws Exception {
- marsh = new PortableMarshaller();
-
- marsh.setClassNames(Arrays.asList(
- TestObject1.class.getName(),
- TestObject2.class.getName()
- ));
-
- marsh.setMetaDataEnabled(false);
-
- try {
- startGrid();
-
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
- portables().toPortable(new TestObject3());
-
- assertEquals(0, portables().metadata(TestObject1.class).fields().size());
- assertEquals(0, portables().metadata(TestObject2.class).fields().size());
-
- PortableBuilder bldr = portables().builder("FakeType");
-
- bldr.setField("field1", 0).setField("field2", "value").build();
-
- assertNull(portables().metadata("FakeType"));
- assertNull(portables().metadata(TestObject3.class));
- }
- finally {
- stopGrid();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDisableGlobalSimpleClass() throws Exception {
- marsh = new PortableMarshaller();
-
- PortableTypeConfiguration typeCfg = new PortableTypeConfiguration(TestObject2.class.getName());
-
- typeCfg.setMetaDataEnabled(true);
-
- marsh.setTypeConfigurations(Arrays.asList(
- new PortableTypeConfiguration(TestObject1.class.getName()),
- typeCfg
- ));
-
- marsh.setMetaDataEnabled(false);
-
- try {
- startGrid();
-
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
-
- assertEquals(0, portables().metadata(TestObject1.class).fields().size());
- assertEquals(1, portables().metadata(TestObject2.class).fields().size());
- }
- finally {
- stopGrid();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDisableGlobalMarshalAwareClass() throws Exception {
- marsh = new PortableMarshaller();
-
- PortableTypeConfiguration typeCfg = new PortableTypeConfiguration(TestObject1.class.getName());
-
- typeCfg.setMetaDataEnabled(true);
-
- marsh.setTypeConfigurations(Arrays.asList(
- new PortableTypeConfiguration(TestObject2.class.getName()),
- typeCfg
- ));
-
- marsh.setMetaDataEnabled(false);
-
- try {
- startGrid();
-
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
-
- assertEquals(1, portables().metadata(TestObject1.class).fields().size());
- assertEquals(0, portables().metadata(TestObject2.class).fields().size());
- }
- finally {
- stopGrid();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDisableSimpleClass() throws Exception {
- marsh = new PortableMarshaller();
-
- PortableTypeConfiguration typeCfg = new PortableTypeConfiguration(TestObject1.class.getName());
-
- typeCfg.setMetaDataEnabled(false);
-
- marsh.setTypeConfigurations(Arrays.asList(
- new PortableTypeConfiguration(TestObject2.class.getName()),
- typeCfg
- ));
-
- try {
- startGrid();
-
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
-
- assertEquals(0, portables().metadata(TestObject1.class).fields().size());
- assertEquals(1, portables().metadata(TestObject2.class).fields().size());
- }
- finally {
- stopGrid();
- }
- }
-
- /**
- * @throws Exception If failed.
- */
- public void testDisableMarshalAwareClass() throws Exception {
- marsh = new PortableMarshaller();
-
- PortableTypeConfiguration typeCfg = new PortableTypeConfiguration(TestObject2.class.getName());
-
- typeCfg.setMetaDataEnabled(false);
-
- marsh.setTypeConfigurations(Arrays.asList(
- new PortableTypeConfiguration(TestObject1.class.getName()),
- typeCfg
- ));
-
- try {
- startGrid();
-
- portables().toPortable(new TestObject1());
- portables().toPortable(new TestObject2());
-
- assertEquals(1, portables().metadata(TestObject1.class).fields().size());
- assertEquals(0, portables().metadata(TestObject2.class).fields().size());
- }
- finally {
- stopGrid();
- }
- }
-
- /**
- */
- @SuppressWarnings("UnusedDeclaration")
- private static class TestObject1 {
- /** */
- private int field;
- }
-
- /**
- */
- private static class TestObject2 implements PortableMarshalAware {
- /** {@inheritDoc} */
- @Override public void writePortable(PortableWriter writer) throws PortableException {
- writer.writeInt("field", 1);
- }
-
- /** {@inheritDoc} */
- @Override public void readPortable(PortableReader reader) throws PortableException {
- // No-op.
- }
- }
-
- /**
- */
- @SuppressWarnings("UnusedDeclaration")
- private static class TestObject3 {
- /** */
- private int field;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/df6b8ee1/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
index 6d8e12d..80893fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
@@ -25,7 +25,6 @@ import org.apache.ignite.internal.portable.GridPortableBuilderStringAsCharsAddit
import org.apache.ignite.internal.portable.GridPortableBuilderStringAsCharsSelfTest;
import org.apache.ignite.internal.portable.GridPortableMarshallerCtxDisabledSelfTest;
import org.apache.ignite.internal.portable.GridPortableMarshallerSelfTest;
-import org.apache.ignite.internal.portable.GridPortableMetaDataDisabledSelfTest;
import org.apache.ignite.internal.portable.GridPortableMetaDataSelfTest;
import org.apache.ignite.internal.portable.GridPortableWildcardsSelfTest;
import org.apache.ignite.internal.portable.PortableCompactOffsetsHeapSelfTest;
@@ -71,7 +70,6 @@ public class IgnitePortableObjectsTestSuite extends TestSuite {
suite.addTestSuite(PortableCompactOffsetsHeapSelfTest.class);
suite.addTestSuite(PortableCompactOffsetsOffheapSelfTest.class);
suite.addTestSuite(GridPortableMetaDataSelfTest.class);
- suite.addTestSuite(GridPortableMetaDataDisabledSelfTest.class);
suite.addTestSuite(GridPortableAffinityKeySelfTest.class);
suite.addTestSuite(GridPortableWildcardsSelfTest.class);
[3/3] ignite git commit: IGNITE-1819: WIP.
Posted by vo...@apache.org.
IGNITE-1819: WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/74b25b3d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/74b25b3d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/74b25b3d
Branch: refs/heads/ignite-1819
Commit: 74b25b3dcf39c53ecb7f62724af200f4eb2aa9a0
Parents: 7f04252
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Nov 5 12:57:07 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Nov 5 12:57:07 2015 +0300
----------------------------------------------------------------------
.../org/apache/ignite/internal/portable/PortableContext.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/74b25b3d/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 106f8cf..7c090c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -336,7 +336,7 @@ public class PortableContext implements Externalizable {
for (TypeDescriptor desc : descs.descriptors()) {
registerUserType(desc.clsName, desc.idMapper, desc.serializer, desc.affKeyFieldName,
- true, desc.keepDeserialized); // TODO: Remove.
+ desc.keepDeserialized);
}
}
@@ -713,7 +713,6 @@ public class PortableContext implements Externalizable {
* @param idMapper ID mapper.
* @param serializer Serializer.
* @param affKeyFieldName Affinity key field name.
- * @param metaDataEnabled Metadata enabled flag.
* @param keepDeserialized Keep deserialized flag.
* @throws PortableException In case of error.
*/
@@ -722,7 +721,6 @@ public class PortableContext implements Externalizable {
PortableIdMapper idMapper,
@Nullable PortableSerializer serializer,
@Nullable String affKeyFieldName,
- boolean metaDataEnabled,
boolean keepDeserialized)
throws PortableException {
assert idMapper != null;
@@ -749,7 +747,7 @@ public class PortableContext implements Externalizable {
typeMappers.put(typeName, idMapper);
- metaEnabled.put(id, metaDataEnabled);
+ metaEnabled.put(id, true); // TODO: Refactor.
Map<String, String> fieldsMeta = null;
@@ -762,7 +760,7 @@ public class PortableContext implements Externalizable {
typeName,
idMapper,
serializer,
- metaDataEnabled,
+ true,
keepDeserialized,
true, /* registered */
false /* predefined */
[2/3] ignite git commit: IGNITE-1819: WIP.
Posted by vo...@apache.org.
IGNITE-1819: WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7f04252b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7f04252b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7f04252b
Branch: refs/heads/ignite-1819
Commit: 7f04252bb10c670a37c3979cbec970a564b5e5b3
Parents: df6b8ee
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Nov 5 12:54:17 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Nov 5 12:54:17 2015 +0300
----------------------------------------------------------------------
.../internal/portable/PortableContext.java | 25 +++++---------------
1 file changed, 6 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/7f04252b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
index 8380053..106f8cf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/PortableContext.java
@@ -292,12 +292,10 @@ public class PortableContext implements Externalizable {
String pkgName = clsName.substring(0, clsName.length() - 2);
for (String clsName0 : classesInPackage(pkgName))
- descs.add(clsName0, idMapper, null, null, true,
- globalKeepDeserialized, true);
+ descs.add(clsName0, idMapper, null, null, globalKeepDeserialized, true);
}
else // Regular single class
- descs.add(clsName, idMapper, null, null, true,
- globalKeepDeserialized, true);
+ descs.add(clsName, idMapper, null, null, globalKeepDeserialized, true);
}
}
@@ -320,7 +318,6 @@ public class PortableContext implements Externalizable {
if (typeCfg.getSerializer() != null)
serializer = typeCfg.getSerializer();
- boolean metaDataEnabled = true;
boolean keepDeserialized = typeCfg.isKeepDeserialized() != null ? typeCfg.isKeepDeserialized() :
globalKeepDeserialized;
@@ -329,17 +326,17 @@ public class PortableContext implements Externalizable {
for (String clsName0 : classesInPackage(pkgName))
descs.add(clsName0, idMapper, serializer, typeCfg.getAffinityKeyFieldName(),
- metaDataEnabled, keepDeserialized, true);
+ keepDeserialized, true);
}
else
descs.add(clsName, idMapper, serializer, typeCfg.getAffinityKeyFieldName(),
- metaDataEnabled, keepDeserialized, false);
+ keepDeserialized, false);
}
}
for (TypeDescriptor desc : descs.descriptors()) {
registerUserType(desc.clsName, desc.idMapper, desc.serializer, desc.affKeyFieldName,
- desc.metadataEnabled, desc.keepDeserialized);
+ true, desc.keepDeserialized); // TODO: Remove.
}
}
@@ -1036,7 +1033,6 @@ public class PortableContext implements Externalizable {
* @param idMapper ID mapper.
* @param serializer Serializer.
* @param affKeyFieldName Affinity key field name.
- * @param metadataEnabled Metadata enabled flag.
* @param keepDeserialized Keep deserialized flag.
* @param canOverride Whether this descriptor can be override.
* @throws PortableException If failed.
@@ -1045,7 +1041,6 @@ public class PortableContext implements Externalizable {
PortableIdMapper idMapper,
PortableSerializer serializer,
String affKeyFieldName,
- boolean metadataEnabled,
boolean keepDeserialized,
boolean canOverride)
throws PortableException {
@@ -1053,7 +1048,6 @@ public class PortableContext implements Externalizable {
idMapper,
serializer,
affKeyFieldName,
- metadataEnabled,
keepDeserialized,
canOverride);
@@ -1091,9 +1085,6 @@ public class PortableContext implements Externalizable {
/** Affinity key field name. */
private String affKeyFieldName;
- /** Metadata enabled flag. */
- private boolean metadataEnabled;
-
/** Keep deserialized flag. */
private boolean keepDeserialized;
@@ -1107,18 +1098,15 @@ public class PortableContext implements Externalizable {
* @param idMapper ID mapper.
* @param serializer Serializer.
* @param affKeyFieldName Affinity key field name.
- * @param metadataEnabled Metadata enabled flag.
* @param keepDeserialized Keep deserialized flag.
* @param canOverride Whether this descriptor can be override.
*/
private TypeDescriptor(String clsName, PortableIdMapper idMapper, PortableSerializer serializer,
- String affKeyFieldName, boolean metadataEnabled, boolean keepDeserialized,
- boolean canOverride) {
+ String affKeyFieldName, boolean keepDeserialized, boolean canOverride) {
this.clsName = clsName;
this.idMapper = idMapper;
this.serializer = serializer;
this.affKeyFieldName = affKeyFieldName;
- this.metadataEnabled = metadataEnabled;
this.keepDeserialized = keepDeserialized;
this.canOverride = canOverride;
}
@@ -1136,7 +1124,6 @@ public class PortableContext implements Externalizable {
idMapper = other.idMapper;
serializer = other.serializer;
affKeyFieldName = other.affKeyFieldName;
- metadataEnabled = other.metadataEnabled;
keepDeserialized = other.keepDeserialized;
canOverride = other.canOverride;
}