IGNITE-1845: Adopted new binary API in .Net.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/894057e5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/894057e5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/894057e5 Branch: refs/heads/ignite-1847 Commit: 894057e5c0c8ae23c46daddcd494201039062d46 Parents: 0dc8902 Author: Pavel Tupitsyn <[email protected]> Authored: Wed Nov 11 12:12:45 2015 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Wed Nov 11 12:12:48 2015 +0300 ---------------------------------------------------------------------- .gitignore | 5 +- .../platform/utils/PlatformUtils.java | 24 +- .../PlatformDotNetBinaryConfiguration.java | 170 ++ .../PlatformDotNetBinaryTypeConfiguration.java | 171 ++ .../dotnet/PlatformDotNetConfiguration.java | 14 +- .../PlatformDotNetPortableConfiguration.java | 170 -- ...PlatformDotNetPortableTypeConfiguration.java | 171 -- ...CacheAtomicReferenceApiSelfAbstractTest.java | 10 +- .../Interop/PlatformBenchmarkBase.cs | 20 +- .../Apache.Ignite.Benchmarks/Model/Address.cs | 8 +- .../Apache.Ignite.Benchmarks/Model/Company.cs | 8 +- .../Apache.Ignite.Benchmarks/Model/Employee.cs | 8 +- .../Apache.Ignite.Benchmarks/Model/TestModel.cs | 8 +- .../Portable/PortableReadBenchmark.cs | 14 +- .../Portable/PortableWriteBenchmark.cs | 12 +- .../Cache/CacheAbstractTest.cs | 68 +- .../Cache/CacheAffinityTest.cs | 8 +- .../Cache/CacheDynamicStartTest.cs | 13 +- .../Cache/CacheTestAsyncWrapper.cs | 8 +- .../Cache/Query/CacheQueriesTest.cs | 36 +- .../Continuous/ContinuousQueryAbstractTest.cs | 52 +- .../Cache/Store/CacheParallelLoadStoreTest.cs | 4 +- .../Cache/Store/CacheStoreTest.cs | 10 +- .../Compute/AbstractTaskTest.cs | 10 +- .../Compute/ComputeApiTest.cs | 24 +- .../Compute/FailoverTaskSelfTest.cs | 6 +- .../Compute/IgniteExceptionTaskSelfTest.cs | 4 +- .../Compute/PortableClosureTaskTest.cs | 18 +- .../Compute/PortableTaskTest.cs | 24 +- .../Compute/TaskAdapterTest.cs | 6 +- .../Compute/TaskResultTest.cs | 12 +- .../Config/Compute/compute-standalone.xml | 8 +- .../Config/cache-portables.xml | 4 +- .../Config/cache-query.xml | 4 +- .../native-client-test-cache-affinity.xml | 6 +- .../Dataload/DataStreamerTest.cs | 34 +- .../Apache.Ignite.Core.Tests/EventsTest.cs | 14 +- .../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 14 +- .../Apache.Ignite.Core.Tests/ExecutableTest.cs | 12 +- .../Apache.Ignite.Core.Tests/FutureTest.cs | 12 +- .../IgniteStartStopTest.cs | 2 +- .../Portable/PortableApiSelfTest.cs | 508 ++--- .../Portable/PortableSelfTest.cs | 330 ++-- .../Portable/PortableStructureTest.cs | 18 +- .../PortableConfigurationTest.cs | 14 +- .../Query/PortablePerson.cs | 8 +- .../Services/ServiceProxyTest.cs | 70 +- .../Services/ServicesAsyncWrapper.cs | 8 +- .../Services/ServicesTest.cs | 50 +- .../TypeResolverTest.cs | 2 +- .../Apache.Ignite.Core.csproj | 118 +- .../Binary/BinaryConfiguration.cs | 90 + .../Binary/BinaryObjectException.cs | 64 + .../Binary/BinaryTypeConfiguration.cs | 116 ++ .../Binary/BinaryTypeNames.cs | 121 ++ .../Apache.Ignite.Core/Binary/IBinarizable.cs | 39 + .../Binary/IBinaryIdMapper.cs | 40 + .../Binary/IBinaryNameMapper.cs | 39 + .../Apache.Ignite.Core/Binary/IBinaryObject.cs | 60 + .../Binary/IBinaryObjectBuilder.cs | 310 +++ .../Binary/IBinaryRawReader.cs | 223 +++ .../Binary/IBinaryRawWriter.cs | 220 +++ .../Apache.Ignite.Core/Binary/IBinaryReader.cs | 279 +++ .../Binary/IBinarySerializer.cs | 39 + .../Apache.Ignite.Core/Binary/IBinaryType.cs | 52 + .../Apache.Ignite.Core/Binary/IBinaryWriter.cs | 256 +++ .../Apache.Ignite.Core/Binary/IIgniteBinary.cs | 120 ++ .../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 18 +- .../Cache/Query/Continuous/ContinuousQuery.cs | 2 +- .../Apache.Ignite.Core/Cache/Query/QueryBase.cs | 8 +- .../Apache.Ignite.Core/Cache/Query/ScanQuery.cs | 6 +- .../Apache.Ignite.Core/Cache/Query/SqlQuery.cs | 4 +- .../Apache.Ignite.Core/Cache/Query/TextQuery.cs | 4 +- .../Apache.Ignite.Core/Common/IgniteGuid.cs | 4 +- .../Apache.Ignite.Core/Compute/ICompute.cs | 4 +- .../Datastream/IDataStreamer.cs | 18 +- .../Datastream/StreamTransformer.cs | 10 +- .../Apache.Ignite.Core/Events/CacheEvent.cs | 6 +- .../Events/CacheQueryExecutedEvent.cs | 4 +- .../Events/CacheQueryReadEvent.cs | 4 +- .../Events/CacheRebalancingEvent.cs | 4 +- .../Events/CheckpointEvent.cs | 4 +- .../Apache.Ignite.Core/Events/DiscoveryEvent.cs | 4 +- .../Apache.Ignite.Core/Events/EventBase.cs | 12 +- .../Apache.Ignite.Core/Events/EventReader.cs | 6 +- .../Apache.Ignite.Core/Events/JobEvent.cs | 8 +- .../Apache.Ignite.Core/Events/SwapSpaceEvent.cs | 4 +- .../Apache.Ignite.Core/Events/TaskEvent.cs | 6 +- .../dotnet/Apache.Ignite.Core/IIgnite.cs | 8 +- .../Apache.Ignite.Core/IgniteConfiguration.cs | 12 +- .../dotnet/Apache.Ignite.Core/Ignition.cs | 59 +- .../Impl/Binary/BinarizableSerializer.cs | 45 + .../Impl/Binary/BinaryBuilderField.cs | 89 + .../Impl/Binary/BinaryFullTypeDescriptor.cs | 210 ++ .../Impl/Binary/BinaryHandleDictionary.cs | 188 ++ .../Impl/Binary/BinaryMode.cs | 42 + .../Impl/Binary/BinaryObject.cs | 354 ++++ .../Impl/Binary/BinaryObjectBuilder.cs | 1128 +++++++++++ .../Impl/Binary/BinaryObjectHandle.cs | 59 + .../Impl/Binary/BinaryObjectHeader.cs | 469 +++++ .../Impl/Binary/BinaryObjectSchema.cs | 98 + .../Impl/Binary/BinaryObjectSchemaField.cs | 48 + .../Impl/Binary/BinaryObjectSchemaHolder.cs | 108 ++ .../Impl/Binary/BinaryReader.cs | 940 +++++++++ .../Impl/Binary/BinaryReaderExtensions.cs | 52 + .../Impl/Binary/BinaryReaderHandleDictionary.cs | 42 + .../Impl/Binary/BinaryReflectiveActions.cs | 440 +++++ .../Impl/Binary/BinaryReflectiveSerializer.cs | 218 +++ .../Binary/BinarySurrogateTypeDescriptor.cs | 162 ++ .../Impl/Binary/BinarySystemHandlers.cs | 832 ++++++++ .../Impl/Binary/BinarySystemTypeSerializer.cs | 62 + .../Impl/Binary/BinaryUtils.cs | 1823 +++++++++++++++++ .../Impl/Binary/BinaryWriter.cs | 1417 ++++++++++++++ .../Impl/Binary/DateTimeHolder.cs | 68 + .../Impl/Binary/IBinarySystemTypeSerializer.cs | 34 + .../Impl/Binary/IBinaryTypeDescriptor.cs | 133 ++ .../Impl/Binary/IBinaryWriteAware.cs | 34 + .../Impl/Binary/IgniteBinary.cs | 191 ++ .../Impl/Binary/Io/BinaryHeapStream.cs | 452 +++++ .../Impl/Binary/Io/BinaryStreamAdapter.cs | 114 ++ .../Impl/Binary/Io/BinaryStreamBase.cs | 1253 ++++++++++++ .../Impl/Binary/Io/IBinaryStream.cs | 322 ++++ .../Impl/Binary/Marshaller.cs | 537 ++++++ .../Impl/Binary/Metadata/BinaryType.cs | 200 ++ .../Binary/Metadata/BinaryTypeHashsetHandler.cs | 69 + .../Impl/Binary/Metadata/BinaryTypeHolder.cs | 147 ++ .../Impl/Binary/Metadata/IBinaryTypeHandler.cs | 41 + .../Impl/Binary/SerializableObjectHolder.cs | 73 + .../Impl/Binary/Structure/BinaryStructure.cs | 332 ++++ .../Binary/Structure/BinaryStructureEntry.cs | 128 ++ .../Structure/BinaryStructureJumpTable.cs | 118 ++ .../Binary/Structure/BinaryStructureTracker.cs | 140 ++ .../Binary/Structure/BinaryStructureUpdate.cs | 84 + .../Impl/Binary/TypeResolver.cs | 231 +++ .../Impl/Cache/CacheAffinityImpl.cs | 28 +- .../Impl/Cache/CacheEntryFilterHolder.cs | 40 +- .../Impl/Cache/CacheEntryProcessorHolder.cs | 16 +- .../Cache/CacheEntryProcessorResultHolder.cs | 11 +- .../Impl/Cache/CacheEnumerator.cs | 18 +- .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 86 +- .../Impl/Cache/CacheMetricsImpl.cs | 4 +- .../Impl/Cache/MutableCacheEntry.cs | 2 +- .../Impl/Cache/Query/AbstractQueryCursor.cs | 32 +- .../Query/Continuous/ContinuousQueryFilter.cs | 18 +- .../Continuous/ContinuousQueryFilterHolder.cs | 36 +- .../Continuous/ContinuousQueryHandleImpl.cs | 32 +- .../Query/Continuous/ContinuousQueryUtils.cs | 24 +- .../Impl/Cache/Query/FieldsQueryCursor.cs | 10 +- .../Impl/Cache/Query/QueryCursor.cs | 10 +- .../Impl/Cache/Store/CacheStore.cs | 30 +- .../Impl/Cluster/ClusterGroupImpl.cs | 30 +- .../Impl/Cluster/ClusterMetricsImpl.cs | 4 +- .../Impl/Cluster/ClusterNodeImpl.cs | 6 +- .../Impl/Cluster/IClusterGroupEx.cs | 4 +- .../Impl/Common/DelegateTypeDescriptor.cs | 10 +- .../Apache.Ignite.Core/Impl/Common/Future.cs | 4 +- .../Impl/Common/FutureConverter.cs | 24 +- .../Impl/Common/IFutureConverter.cs | 4 +- .../Impl/Common/IFutureInternal.cs | 4 +- .../Impl/Compute/Closure/ComputeActionJob.cs | 14 +- .../Impl/Compute/Closure/ComputeFuncJob.cs | 14 +- .../Impl/Compute/Closure/ComputeOutFuncJob.cs | 14 +- .../Apache.Ignite.Core/Impl/Compute/Compute.cs | 4 +- .../Impl/Compute/ComputeFunc.cs | 14 +- .../Impl/Compute/ComputeImpl.cs | 42 +- .../Impl/Compute/ComputeJob.cs | 14 +- .../Impl/Compute/ComputeJobHolder.cs | 26 +- .../Impl/Compute/ComputeOutFunc.cs | 14 +- .../Impl/Compute/ComputeTaskHolder.cs | 12 +- .../Impl/DataStructures/AtomicLong.cs | 4 +- .../Impl/Datastream/DataStreamerBatch.cs | 6 +- .../Impl/Datastream/DataStreamerImpl.cs | 26 +- .../Impl/Datastream/StreamReceiverHolder.cs | 36 +- .../Apache.Ignite.Core/Impl/Events/Events.cs | 40 +- .../Impl/Events/RemoteListenEventFilter.cs | 4 +- .../Apache.Ignite.Core/Impl/ExceptionUtils.cs | 12 +- .../Apache.Ignite.Core/Impl/IInteropCallback.cs | 4 +- .../dotnet/Apache.Ignite.Core/Impl/Ignite.cs | 36 +- .../Apache.Ignite.Core/Impl/IgniteProxy.cs | 16 +- .../Apache.Ignite.Core/Impl/IgniteUtils.cs | 9 +- .../Impl/InteropExceptionHolder.cs | 18 +- .../Impl/Memory/PlatformMemoryStream.cs | 4 +- .../Impl/Messaging/MessageListenerHolder.cs | 20 +- .../Impl/Messaging/Messaging.cs | 4 +- .../Apache.Ignite.Core/Impl/PlatformTarget.cs | 106 +- .../Impl/Portable/DateTimeHolder.cs | 68 - .../Portable/IPortableSystemTypeSerializer.cs | 34 - .../Impl/Portable/IPortableTypeDescriptor.cs | 134 -- .../Impl/Portable/IPortableWriteAware.cs | 34 - .../Impl/Portable/Io/IPortableStream.cs | 322 ---- .../Impl/Portable/Io/PortableAbstractStream.cs | 1254 ------------ .../Impl/Portable/Io/PortableHeapStream.cs | 454 ----- .../Impl/Portable/Io/PortableStreamAdapter.cs | 114 -- .../Metadata/IPortableMetadataHandler.cs | 41 - .../Metadata/PortableHashsetMetadataHandler.cs | 69 - .../Portable/Metadata/PortableMetadataHolder.cs | 149 -- .../Portable/Metadata/PortableMetadataImpl.cs | 200 -- .../Impl/Portable/PortableBuilderField.cs | 89 - .../Impl/Portable/PortableBuilderImpl.cs | 1128 ----------- .../Impl/Portable/PortableFullTypeDescriptor.cs | 211 -- .../Impl/Portable/PortableHandleDictionary.cs | 188 -- .../Portable/PortableMarshalAwareSerializer.cs | 45 - .../Impl/Portable/PortableMarshaller.cs | 532 ----- .../Impl/Portable/PortableMode.cs | 40 - .../Impl/Portable/PortableObjectHandle.cs | 59 - .../Impl/Portable/PortableObjectHeader.cs | 469 ----- .../Impl/Portable/PortableObjectSchema.cs | 98 - .../Impl/Portable/PortableObjectSchemaField.cs | 48 - .../Impl/Portable/PortableObjectSchemaHolder.cs | 108 -- .../Impl/Portable/PortableReaderExtensions.cs | 52 - .../Portable/PortableReaderHandleDictionary.cs | 42 - .../Impl/Portable/PortableReaderImpl.cs | 940 --------- .../Impl/Portable/PortableReflectiveRoutines.cs | 440 ----- .../Portable/PortableReflectiveSerializer.cs | 218 --- .../Portable/PortableSurrogateTypeDescriptor.cs | 163 -- .../Impl/Portable/PortableSystemHandlers.cs | 832 -------- .../Portable/PortableSystemTypeSerializer.cs | 62 - .../Impl/Portable/PortableUserObject.cs | 354 ---- .../Impl/Portable/PortableUtils.cs | 1824 ------------------ .../Impl/Portable/PortableWriterImpl.cs | 1421 -------------- .../Impl/Portable/PortablesImpl.cs | 191 -- .../Impl/Portable/SerializableObjectHolder.cs | 73 - .../Portable/Structure/PortableStructure.cs | 333 ---- .../Structure/PortableStructureEntry.cs | 129 -- .../Structure/PortableStructureJumpTable.cs | 118 -- .../Structure/PortableStructureTracker.cs | 140 -- .../Structure/PortableStructureUpdate.cs | 84 - .../Impl/Portable/TypeResolver.cs | 231 --- .../Impl/Services/ServiceContext.cs | 4 +- .../Impl/Services/ServiceDescriptor.cs | 4 +- .../Impl/Services/ServiceProxySerializer.cs | 34 +- .../Impl/Services/Services.cs | 42 +- .../Impl/Transactions/TransactionMetricsImpl.cs | 4 +- .../Impl/Transactions/TransactionsImpl.cs | 8 +- .../Impl/Unmanaged/UnmanagedCallbacks.cs | 12 +- .../Impl/Unmanaged/UnmanagedUtils.cs | 30 +- .../Portable/IPortableBuilder.cs | 310 --- .../Portable/IPortableIdMapper.cs | 40 - .../Portable/IPortableMarshalAware.cs | 39 - .../Portable/IPortableMetadata.cs | 52 - .../Portable/IPortableNameMapper.cs | 39 - .../Portable/IPortableObject.cs | 60 - .../Portable/IPortableRawReader.cs | 223 --- .../Portable/IPortableRawWriter.cs | 220 --- .../Portable/IPortableReader.cs | 279 --- .../Portable/IPortableSerializer.cs | 39 - .../Portable/IPortableWriter.cs | 256 --- .../Apache.Ignite.Core/Portable/IPortables.cs | 120 -- .../Portable/PortableConfiguration.cs | 114 -- .../Portable/PortableException.cs | 64 - .../Portable/PortableTypeConfiguration.cs | 117 -- .../Portable/PortableTypeNames.cs | 121 -- .../Apache.Ignite.Core/Services/IServices.cs | 16 +- .../Services/ServiceInvocationException.cs | 22 +- .../Compute/TaskExample.cs | 3 +- .../Datagrid/CrossPlatformExample.cs | 51 +- .../Datagrid/DataStreamerExample.cs | 3 +- .../Datagrid/PutGetExample.cs | 48 +- .../Datagrid/QueryExample.cs | 3 +- .../Datagrid/StoreExample.cs | 3 +- .../Datagrid/TransactionExample.cs | 3 +- .../Events/EventsExample.cs | 3 +- .../Apache.Ignite.ExamplesDll.csproj | 12 +- .../Apache.Ignite.ExamplesDll/Binary/Account.cs | 60 + .../Apache.Ignite.ExamplesDll/Binary/Address.cs | 81 + .../Binary/Employee.cs | 93 + .../Binary/EmployeeKey.cs | 86 + .../Binary/Organization.cs | 84 + .../Binary/OrganizationType.cs | 43 + .../Compute/AverageSalaryJob.cs | 3 +- .../Compute/AverageSalaryTask.cs | 3 +- .../Datagrid/EmployeeStore.cs | 3 +- .../Datagrid/EmployeeStorePredicate.cs | 3 +- .../Portable/Account.cs | 60 - .../Portable/Address.cs | 81 - .../Portable/Employee.cs | 93 - .../Portable/EmployeeKey.cs | 86 - .../Portable/Organization.cs | 84 - .../Portable/OrganizationType.cs | 43 - .../examples/Config/example-cache-query.xml | 4 +- .../dotnet/examples/Config/example-cache.xml | 4 +- 281 files changed, 17986 insertions(+), 18027 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 22e3cc6..2eac5d9 100644 --- a/.gitignore +++ b/.gitignore @@ -22,9 +22,8 @@ pom-installed.xml git-patch-prop-local.sh /slurp.sh *.vcxproj.user -Apache.Ignite.sdf -ignite.sdf -ignite.opensdf +*.sdf +*.opensdf **/cpp/**/vs/x64/ **/cpp/**/vs/Win32/ **/dotnet/**/obj/ http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java index 4c0921a..14c040c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java @@ -39,8 +39,8 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration; -import org.apache.ignite.platform.dotnet.PlatformDotNetPortableConfiguration; -import org.apache.ignite.platform.dotnet.PlatformDotNetPortableTypeConfiguration; +import org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration; +import org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration; import org.jetbrains.annotations.Nullable; import javax.cache.CacheException; @@ -773,14 +773,14 @@ public class PlatformUtils { // 1. Write assemblies. writeNullableCollection(writer, cfg.getAssemblies()); - PlatformDotNetPortableConfiguration portableCfg = cfg.getPortableConfiguration(); + PlatformDotNetBinaryConfiguration binaryCfg = cfg.getBinaryConfiguration(); - if (portableCfg != null) { + if (binaryCfg != null) { writer.writeBoolean(true); - writeNullableCollection(writer, portableCfg.getTypesConfiguration(), - new PlatformWriterClosure<PlatformDotNetPortableTypeConfiguration>() { - @Override public void write(BinaryRawWriterEx writer, PlatformDotNetPortableTypeConfiguration typ) { + writeNullableCollection(writer, binaryCfg.getTypesConfiguration(), + new PlatformWriterClosure<PlatformDotNetBinaryTypeConfiguration>() { + @Override public void write(BinaryRawWriterEx writer, PlatformDotNetBinaryTypeConfiguration typ) { writer.writeString(typ.getTypeName()); writer.writeString(typ.getNameMapper()); writer.writeString(typ.getIdMapper()); @@ -790,11 +790,11 @@ public class PlatformUtils { } }); - writeNullableCollection(writer, portableCfg.getTypes()); - writer.writeString(portableCfg.getDefaultNameMapper()); - writer.writeString(portableCfg.getDefaultIdMapper()); - writer.writeString(portableCfg.getDefaultSerializer()); - writer.writeBoolean(portableCfg.isDefaultKeepDeserialized()); + writeNullableCollection(writer, binaryCfg.getTypes()); + writer.writeString(binaryCfg.getDefaultNameMapper()); + writer.writeString(binaryCfg.getDefaultIdMapper()); + writer.writeString(binaryCfg.getDefaultSerializer()); + writer.writeBoolean(binaryCfg.isDefaultKeepDeserialized()); } else writer.writeBoolean(false); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryConfiguration.java new file mode 100644 index 0000000..3914c32 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryConfiguration.java @@ -0,0 +1,170 @@ +/* + * 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.platform.dotnet; + +import org.apache.ignite.internal.util.typedef.internal.S; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Mirror of .Net class BinaryConfiguration.cs + */ +public class PlatformDotNetBinaryConfiguration { + /** Type cfgs. */ + private Collection<PlatformDotNetBinaryTypeConfiguration> typesCfg; + + /** Types. */ + private Collection<String> types; + + /** Default name mapper. */ + private String dfltNameMapper; + + /** Default id mapper. */ + private String dfltIdMapper; + + /** Default serializer. */ + private String dfltSerializer; + + /** Whether to cache deserialized value in IGridPortableObject */ + private boolean dfltKeepDeserialized = true; + + /** + * Default constructor. + */ + public PlatformDotNetBinaryConfiguration() { + // No-op. + } + + /** + * Copy constructor. + * @param cfg configuration to copy. + */ + public PlatformDotNetBinaryConfiguration(PlatformDotNetBinaryConfiguration cfg) { + if (cfg.getTypesConfiguration() != null) { + typesCfg = new ArrayList<>(); + + for (PlatformDotNetBinaryTypeConfiguration typeCfg : cfg.getTypesConfiguration()) + typesCfg.add(new PlatformDotNetBinaryTypeConfiguration(typeCfg)); + } + + if (cfg.getTypes() != null) + types = new ArrayList<>(cfg.getTypes()); + + dfltNameMapper = cfg.getDefaultNameMapper(); + dfltIdMapper = cfg.getDefaultIdMapper(); + dfltSerializer = cfg.getDefaultSerializer(); + dfltKeepDeserialized = cfg.isDefaultKeepDeserialized(); + } + + /** + * @return Type cfgs. + */ + public Collection<PlatformDotNetBinaryTypeConfiguration> getTypesConfiguration() { + return typesCfg; + } + + /** + * @param typesCfg New type cfgs. + */ + public void setTypesConfiguration(Collection<PlatformDotNetBinaryTypeConfiguration> typesCfg) { + this.typesCfg = typesCfg; + } + + /** + * @return Types. + */ + public Collection<String> getTypes() { + return types; + } + + /** + * @param types New types. + */ + public void setTypes(Collection<String> types) { + this.types = types; + } + + /** + * @return Default name mapper. + */ + public String getDefaultNameMapper() { + return dfltNameMapper; + } + + /** + * @param dfltNameMapper New default name mapper. + */ + public void setDefaultNameMapper(String dfltNameMapper) { + this.dfltNameMapper = dfltNameMapper; + } + + /** + * @return Default id mapper. + */ + public String getDefaultIdMapper() { + return dfltIdMapper; + } + + /** + * @param dfltIdMapper New default id mapper. + */ + public void setDefaultIdMapper(String dfltIdMapper) { + this.dfltIdMapper = dfltIdMapper; + } + + /** + * @return Default serializer. + */ + public String getDefaultSerializer() { + return dfltSerializer; + } + + /** + * @param dfltSerializer New default serializer. + */ + public void setDefaultSerializer(String dfltSerializer) { + this.dfltSerializer = dfltSerializer; + } + + /** + * Gets default keep deserialized flag. See {@link #setDefaultKeepDeserialized(boolean)} for more information. + * + * @return Flag indicates whether to cache deserialized value in IGridPortableObject. + */ + public boolean isDefaultKeepDeserialized() { + return dfltKeepDeserialized; + } + + /** + * Sets default keep deserialized flag. + * <p /> + * Can be overridden for particular type using + * {@link PlatformDotNetBinaryTypeConfiguration#setKeepDeserialized(Boolean)}. + * + * @param keepDeserialized Keep deserialized flag. + */ + public void setDefaultKeepDeserialized(boolean keepDeserialized) { + this.dfltKeepDeserialized = keepDeserialized; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(PlatformDotNetBinaryConfiguration.class, this); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryTypeConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryTypeConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryTypeConfiguration.java new file mode 100644 index 0000000..df28aef --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetBinaryTypeConfiguration.java @@ -0,0 +1,171 @@ +/* + * 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.platform.dotnet; + +import org.apache.ignite.internal.util.typedef.internal.S; +import org.jetbrains.annotations.Nullable; + +/** + * Mirror of .Net class BinaryTypeConfiguration.cs + */ +public class PlatformDotNetBinaryTypeConfiguration { + /** Type name. */ + private String typeName; + + /** Name mapper. */ + private String nameMapper; + + /** Id mapper. */ + private String idMapper; + + /** Serializer. */ + private String serializer; + + /** Affinity key field name. */ + private String affinityKeyFieldName; + + /** Whether to cache deserialized value. */ + private Boolean keepDeserialized; + + /** + * Default constructor. + */ + public PlatformDotNetBinaryTypeConfiguration() { + // No-op. + } + + /** + * Copy constructor. + * @param cfg configuration to copy. + */ + public PlatformDotNetBinaryTypeConfiguration(PlatformDotNetBinaryTypeConfiguration cfg) { + typeName = cfg.getTypeName(); + nameMapper = cfg.getNameMapper(); + idMapper = cfg.getIdMapper(); + serializer = cfg.getSerializer(); + affinityKeyFieldName = cfg.getAffinityKeyFieldName(); + keepDeserialized = cfg.isKeepDeserialized(); + } + + /** + * @return Type name. + */ + public String getTypeName() { + return typeName; + } + + /** + * @param typeName New type name. + */ + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + /** + * @return Name mapper. + */ + public String getNameMapper() { + return nameMapper; + } + + /** + * @param nameMapper New name mapper. + */ + public void setNameMapper(String nameMapper) { + this.nameMapper = nameMapper; + } + + /** + * @return Id mapper. + */ + public String getIdMapper() { + return idMapper; + } + + /** + * @param idMapper New id mapper. + */ + public void setIdMapper(String idMapper) { + this.idMapper = idMapper; + } + + /** + * @return Serializer. + */ + public String getSerializer() { + return serializer; + } + + /** + * @param serializer New serializer. + */ + public void setSerializer(String serializer) { + this.serializer = serializer; + } + + /** + * @return Affinity key field name. + */ + public String getAffinityKeyFieldName() { + return affinityKeyFieldName; + } + + /** + * @param affinityKeyFieldName Affinity key field name. + */ + public void setAffinityKeyFieldName(String affinityKeyFieldName) { + this.affinityKeyFieldName = affinityKeyFieldName; + } + + /** + * Gets keep deserialized flag. + * + * @return Flag indicates whether to cache deserialized value. + * @deprecated Use {@link #getKeepDeserialized()} instead. + */ + @Deprecated + @Nullable public Boolean isKeepDeserialized() { + return keepDeserialized; + } + + /** + * Gets keep deserialized flag. See {@link #setKeepDeserialized(Boolean)} for more information. + * + * @return Flag indicates whether to cache deserialized value. + */ + @Nullable public Boolean getKeepDeserialized() { + return keepDeserialized; + } + + /** + * Sets keep deserialized flag. + * <p /> + * When set to {@code null} default value taken from + * {@link PlatformDotNetBinaryConfiguration#isDefaultKeepDeserialized()} will be used. + * + * @param keepDeserialized Keep deserialized flag. + */ + public void setKeepDeserialized(@Nullable Boolean keepDeserialized) { + this.keepDeserialized = keepDeserialized; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(PlatformDotNetBinaryTypeConfiguration.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java index 0550bab..ff5656b 100644 --- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetConfiguration.java @@ -28,7 +28,7 @@ import java.util.List; */ public class PlatformDotNetConfiguration implements PlatformConfiguration { /** */ - private PlatformDotNetPortableConfiguration portableCfg; + private PlatformDotNetBinaryConfiguration binaryCfg; /** */ private List<String> assemblies; @@ -46,8 +46,8 @@ public class PlatformDotNetConfiguration implements PlatformConfiguration { * @param cfg Configuration to copy. */ public PlatformDotNetConfiguration(PlatformDotNetConfiguration cfg) { - if (cfg.getPortableConfiguration() != null) - portableCfg = new PlatformDotNetPortableConfiguration(cfg.getPortableConfiguration()); + if (cfg.getBinaryConfiguration() != null) + binaryCfg = new PlatformDotNetBinaryConfiguration(cfg.getBinaryConfiguration()); if (cfg.getAssemblies() != null) assemblies = new ArrayList<>(cfg.getAssemblies()); @@ -56,15 +56,15 @@ public class PlatformDotNetConfiguration implements PlatformConfiguration { /** * @return Configuration. */ - public PlatformDotNetPortableConfiguration getPortableConfiguration() { - return portableCfg; + public PlatformDotNetBinaryConfiguration getBinaryConfiguration() { + return binaryCfg; } /** * @param portableCfg Configuration. */ - public void setPortableConfiguration(PlatformDotNetPortableConfiguration portableCfg) { - this.portableCfg = portableCfg; + public void setBinaryConfiguration(PlatformDotNetBinaryConfiguration portableCfg) { + this.binaryCfg = portableCfg; } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java deleted file mode 100644 index ed25a0f..0000000 --- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableConfiguration.java +++ /dev/null @@ -1,170 +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.platform.dotnet; - -import org.apache.ignite.internal.util.typedef.internal.S; - -import java.util.ArrayList; -import java.util.Collection; - -/** - * Mirror of .Net class PortableConfiguration.cs - */ -public class PlatformDotNetPortableConfiguration { - /** Type cfgs. */ - private Collection<PlatformDotNetPortableTypeConfiguration> typesCfg; - - /** Types. */ - private Collection<String> types; - - /** Default name mapper. */ - private String dfltNameMapper; - - /** Default id mapper. */ - private String dfltIdMapper; - - /** Default serializer. */ - private String dfltSerializer; - - /** Whether to cache deserialized value in IGridPortableObject */ - private boolean dfltKeepDeserialized = true; - - /** - * Default constructor. - */ - public PlatformDotNetPortableConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * @param cfg configuration to copy. - */ - public PlatformDotNetPortableConfiguration(PlatformDotNetPortableConfiguration cfg) { - if (cfg.getTypesConfiguration() != null) { - typesCfg = new ArrayList<>(); - - for (PlatformDotNetPortableTypeConfiguration typeCfg : cfg.getTypesConfiguration()) - typesCfg.add(new PlatformDotNetPortableTypeConfiguration(typeCfg)); - } - - if (cfg.getTypes() != null) - types = new ArrayList<>(cfg.getTypes()); - - dfltNameMapper = cfg.getDefaultNameMapper(); - dfltIdMapper = cfg.getDefaultIdMapper(); - dfltSerializer = cfg.getDefaultSerializer(); - dfltKeepDeserialized = cfg.isDefaultKeepDeserialized(); - } - - /** - * @return Type cfgs. - */ - public Collection<PlatformDotNetPortableTypeConfiguration> getTypesConfiguration() { - return typesCfg; - } - - /** - * @param typesCfg New type cfgs. - */ - public void setTypesConfiguration(Collection<PlatformDotNetPortableTypeConfiguration> typesCfg) { - this.typesCfg = typesCfg; - } - - /** - * @return Types. - */ - public Collection<String> getTypes() { - return types; - } - - /** - * @param types New types. - */ - public void setTypes(Collection<String> types) { - this.types = types; - } - - /** - * @return Default name mapper. - */ - public String getDefaultNameMapper() { - return dfltNameMapper; - } - - /** - * @param dfltNameMapper New default name mapper. - */ - public void setDefaultNameMapper(String dfltNameMapper) { - this.dfltNameMapper = dfltNameMapper; - } - - /** - * @return Default id mapper. - */ - public String getDefaultIdMapper() { - return dfltIdMapper; - } - - /** - * @param dfltIdMapper New default id mapper. - */ - public void setDefaultIdMapper(String dfltIdMapper) { - this.dfltIdMapper = dfltIdMapper; - } - - /** - * @return Default serializer. - */ - public String getDefaultSerializer() { - return dfltSerializer; - } - - /** - * @param dfltSerializer New default serializer. - */ - public void setDefaultSerializer(String dfltSerializer) { - this.dfltSerializer = dfltSerializer; - } - - /** - * Gets default keep deserialized flag. See {@link #setDefaultKeepDeserialized(boolean)} for more information. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - */ - public boolean isDefaultKeepDeserialized() { - return dfltKeepDeserialized; - } - - /** - * Sets default keep deserialized flag. - * <p /> - * Can be overridden for particular type using - * {@link PlatformDotNetPortableTypeConfiguration#setKeepDeserialized(Boolean)}. - * - * @param keepDeserialized Keep deserialized flag. - */ - public void setDefaultKeepDeserialized(boolean keepDeserialized) { - this.dfltKeepDeserialized = keepDeserialized; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformDotNetPortableConfiguration.class, this); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java b/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java deleted file mode 100644 index 148272d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/platform/dotnet/PlatformDotNetPortableTypeConfiguration.java +++ /dev/null @@ -1,171 +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.platform.dotnet; - -import org.apache.ignite.internal.util.typedef.internal.S; -import org.jetbrains.annotations.Nullable; - -/** - * Mirror of .Net class GridDotNetPortableTypeConfiguration.cs - */ -public class PlatformDotNetPortableTypeConfiguration { - /** Type name. */ - private String typeName; - - /** Name mapper. */ - private String nameMapper; - - /** Id mapper. */ - private String idMapper; - - /** Serializer. */ - private String serializer; - - /** Affinity key field name. */ - private String affinityKeyFieldName; - - /** Whether to cache deserialized value in IGridPortableObject. */ - private Boolean keepDeserialized; - - /** - * Default constructor. - */ - public PlatformDotNetPortableTypeConfiguration() { - // No-op. - } - - /** - * Copy constructor. - * @param cfg configuration to copy. - */ - public PlatformDotNetPortableTypeConfiguration(PlatformDotNetPortableTypeConfiguration cfg) { - typeName = cfg.getTypeName(); - nameMapper = cfg.getNameMapper(); - idMapper = cfg.getIdMapper(); - serializer = cfg.getSerializer(); - affinityKeyFieldName = cfg.getAffinityKeyFieldName(); - keepDeserialized = cfg.isKeepDeserialized(); - } - - /** - * @return Type name. - */ - public String getTypeName() { - return typeName; - } - - /** - * @param typeName New type name. - */ - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - /** - * @return Name mapper. - */ - public String getNameMapper() { - return nameMapper; - } - - /** - * @param nameMapper New name mapper. - */ - public void setNameMapper(String nameMapper) { - this.nameMapper = nameMapper; - } - - /** - * @return Id mapper. - */ - public String getIdMapper() { - return idMapper; - } - - /** - * @param idMapper New id mapper. - */ - public void setIdMapper(String idMapper) { - this.idMapper = idMapper; - } - - /** - * @return Serializer. - */ - public String getSerializer() { - return serializer; - } - - /** - * @param serializer New serializer. - */ - public void setSerializer(String serializer) { - this.serializer = serializer; - } - - /** - * @return Affinity key field name. - */ - public String getAffinityKeyFieldName() { - return affinityKeyFieldName; - } - - /** - * @param affinityKeyFieldName Affinity key field name. - */ - public void setAffinityKeyFieldName(String affinityKeyFieldName) { - this.affinityKeyFieldName = affinityKeyFieldName; - } - - /** - * Gets keep deserialized flag. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - * @deprecated Use {@link #getKeepDeserialized()} instead. - */ - @Deprecated - @Nullable public Boolean isKeepDeserialized() { - return keepDeserialized; - } - - /** - * Gets keep deserialized flag. See {@link #setKeepDeserialized(Boolean)} for more information. - * - * @return Flag indicates whether to cache deserialized value in IGridPortableObject. - */ - @Nullable public Boolean getKeepDeserialized() { - return keepDeserialized; - } - - /** - * Sets keep deserialized flag. - * <p /> - * When set to {@code null} default value taken from - * {@link PlatformDotNetPortableConfiguration#isDefaultKeepDeserialized()} will be used. - * - * @param keepDeserialized Keep deserialized flag. - */ - public void setKeepDeserialized(@Nullable Boolean keepDeserialized) { - this.keepDeserialized = keepDeserialized; - } - - /** {@inheritDoc} */ - @Override public String toString() { - return S.toString(PlatformDotNetPortableTypeConfiguration.class, this); - } -} http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java index c12da82..6c683b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java @@ -97,13 +97,15 @@ public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends Ignite String initVal = "qwerty"; - IgniteAtomicReference<String> atomic = grid(0).atomicReference(atomicName, initVal, true); + IgniteAtomicReference<String> atomic = grid(0).atomicReference(atomicName, null, true); - assertEquals(initVal, atomic.get()); + assertEquals(null, atomic.get()); - atomic.compareAndSet("h", "j"); + boolean res = atomic.compareAndSet(null, "x"); - assertEquals(initVal, atomic.get()); + assertEquals(null, atomic.get()); // ok + assertTrue(res); // fail + assertEquals("x", atomic.get()); // fail atomic.compareAndSet(initVal, null); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs index 473859c..67809d5 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Interop/PlatformBenchmarkBase.cs @@ -20,7 +20,7 @@ namespace Apache.Ignite.Benchmarks.Interop using System.Collections.Generic; using Apache.Ignite.Benchmarks.Model; using Apache.Ignite.Core; - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Binary; /// <summary> /// Base class for all platform benchmarks. @@ -58,7 +58,7 @@ namespace Apache.Ignite.Benchmarks.Interop var cfg = new IgniteConfiguration { - PortableConfiguration = GetPortableConfiguration(), + BinaryConfiguration = GetPortableConfiguration(), JvmOptions = new List<string> { "-Xms2g", @@ -78,17 +78,17 @@ namespace Apache.Ignite.Benchmarks.Interop /// Get portable configuration. /// </summary> /// <returns>Portable configuration.</returns> - private static PortableConfiguration GetPortableConfiguration() + private static BinaryConfiguration GetPortableConfiguration() { - return new PortableConfiguration + return new BinaryConfiguration { - TypeConfigurations = new List<PortableTypeConfiguration> + TypeConfigurations = new List<BinaryTypeConfiguration> { - new PortableTypeConfiguration(typeof (Address)), - new PortableTypeConfiguration(typeof (Company)), - new PortableTypeConfiguration(typeof (Employee)), - new PortableTypeConfiguration(typeof (MyClosure)), - new PortableTypeConfiguration(typeof (MyJob)) + new BinaryTypeConfiguration(typeof (Address)), + new BinaryTypeConfiguration(typeof (Company)), + new BinaryTypeConfiguration(typeof (Employee)), + new BinaryTypeConfiguration(typeof (MyClosure)), + new BinaryTypeConfiguration(typeof (MyJob)) } }; } http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Address.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Address.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Address.cs index 871814c..e388a5e 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Address.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Address.cs @@ -17,12 +17,12 @@ namespace Apache.Ignite.Benchmarks.Model { - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Binary; /// <summary> /// Address. /// </summary> - internal class Address : IPortableMarshalAware + internal class Address : IBinarizable { /// <summary> /// City. @@ -60,7 +60,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { writer.WriteInt("streetNum", StreetNumber); writer.WriteInt("flatNum", FlatNumber); @@ -69,7 +69,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { StreetNumber = reader.ReadInt("streetNum"); FlatNumber = reader.ReadInt("flatNum"); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Company.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Company.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Company.cs index 3e99d34..f433c00 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Company.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Company.cs @@ -17,12 +17,12 @@ namespace Apache.Ignite.Benchmarks.Model { - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Binary; /// <summary> /// Company. /// </summary> - internal class Company : IPortableMarshalAware + internal class Company : IBinarizable { /// <summary> /// ID. @@ -67,7 +67,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { writer.WriteInt("id", Id); writer.WriteInt("size", Size); @@ -77,7 +77,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { Id = reader.ReadInt("id"); Size = reader.ReadInt("size"); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Employee.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Employee.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Employee.cs index 0061b79..7f082f3 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Employee.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/Employee.cs @@ -17,12 +17,12 @@ namespace Apache.Ignite.Benchmarks.Model { - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Binary; /// <summary> /// Employee. /// </summary> - internal class Employee : IPortableMarshalAware + internal class Employee : IBinarizable { /// <summary> /// ID. @@ -104,7 +104,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - void IPortableMarshalAware.WritePortable(IPortableWriter writer) + void IBinarizable.WriteBinary(IBinaryWriter writer) { writer.WriteInt("id", Id); writer.WriteInt("companyId", CompanyId); @@ -119,7 +119,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - void IPortableMarshalAware.ReadPortable(IPortableReader reader) + void IBinarizable.ReadBinary(IBinaryReader reader) { Id = reader.ReadInt("id"); CompanyId = reader.ReadInt("companyId"); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/TestModel.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/TestModel.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/TestModel.cs index c84b219..254f54e 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/TestModel.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Model/TestModel.cs @@ -18,12 +18,12 @@ namespace Apache.Ignite.Benchmarks.Model { using System; - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Binary; /// <summary> /// Model class with all kinds of fields to test serialization. /// </summary> - internal class TestModel : IPortableMarshalAware + internal class TestModel : IBinarizable { public byte Byte { get; set; } public byte[] ByteArray { get; set; } @@ -51,7 +51,7 @@ namespace Apache.Ignite.Benchmarks.Model public Guid?[] GuidArray { get; set; } /** <inheritDoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { writer.WriteByte("Byte", Byte); writer.WriteByteArray("ByteArray", ByteArray); @@ -80,7 +80,7 @@ namespace Apache.Ignite.Benchmarks.Model } /** <inheritDoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { Byte = reader.ReadByte("Byte"); ByteArray = reader.ReadByteArray("ByteArray"); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs index b698b0c..ad9ae39 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableReadBenchmark.cs @@ -21,9 +21,9 @@ namespace Apache.Ignite.Benchmarks.Portable using System.Collections.Generic; using System.Linq; using Apache.Ignite.Benchmarks.Model; + using Apache.Ignite.Core.Binary; + using Apache.Ignite.Core.Impl.Binary; using Apache.Ignite.Core.Impl.Memory; - using Apache.Ignite.Core.Impl.Portable; - using Apache.Ignite.Core.Portable; /// <summary> /// Portable read benchmark. @@ -31,7 +31,7 @@ namespace Apache.Ignite.Benchmarks.Portable internal class PortableReadBenchmark : BenchmarkBase { /** Marshaller. */ - private readonly PortableMarshaller _marsh; + private readonly Marshaller _marsh; /** Memory manager. */ private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); @@ -77,12 +77,12 @@ namespace Apache.Ignite.Benchmarks.Portable /// </summary> public PortableReadBenchmark() { - _marsh = new PortableMarshaller(new PortableConfiguration + _marsh = new Marshaller(new BinaryConfiguration { - TypeConfigurations = new List<PortableTypeConfiguration> + TypeConfigurations = new List<BinaryTypeConfiguration> { - new PortableTypeConfiguration(typeof (Address)), - new PortableTypeConfiguration(typeof (TestModel)) + new BinaryTypeConfiguration(typeof (Address)), + new BinaryTypeConfiguration(typeof (TestModel)) } }); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs index 425204d..a630161 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Portable/PortableWriteBenchmark.cs @@ -21,9 +21,9 @@ namespace Apache.Ignite.Benchmarks.Portable using System.Collections.Generic; using System.Linq; using Apache.Ignite.Benchmarks.Model; + using Apache.Ignite.Core.Binary; + using Apache.Ignite.Core.Impl.Binary; using Apache.Ignite.Core.Impl.Memory; - using Apache.Ignite.Core.Impl.Portable; - using Apache.Ignite.Core.Portable; /// <summary> /// Portable write benchmark. @@ -31,7 +31,7 @@ namespace Apache.Ignite.Benchmarks.Portable internal class PortableWriteBenchmark : BenchmarkBase { /** Marshaller. */ - private readonly PortableMarshaller _marsh; + private readonly Marshaller _marsh; /** Memory manager. */ private readonly PlatformMemoryManager _memMgr = new PlatformMemoryManager(1024); @@ -73,11 +73,11 @@ namespace Apache.Ignite.Benchmarks.Portable /// </summary> public PortableWriteBenchmark() { - _marsh = new PortableMarshaller(new PortableConfiguration + _marsh = new Marshaller(new BinaryConfiguration { - TypeConfigurations = new List<PortableTypeConfiguration> + TypeConfigurations = new List<BinaryTypeConfiguration> { - new PortableTypeConfiguration(typeof (Address)) + new BinaryTypeConfiguration(typeof (Address)) //new PortableTypeConfiguration(typeof (TestModel)) } }); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs index 26a142b..7df0e5a 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs @@ -24,13 +24,13 @@ namespace Apache.Ignite.Core.Tests.Cache using System.Text; using System.Threading; using System.Threading.Tasks; + using Apache.Ignite.Core.Binary; using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Cache.Expiry; using Apache.Ignite.Core.Cluster; using Apache.Ignite.Core.Common; using Apache.Ignite.Core.Impl; using Apache.Ignite.Core.Impl.Cache; - using Apache.Ignite.Core.Portable; using Apache.Ignite.Core.Tests.Query; using Apache.Ignite.Core.Transactions; using NUnit.Framework; @@ -206,10 +206,10 @@ namespace Apache.Ignite.Core.Tests.Cache /// <summary> /// Portable add processor. /// </summary> - public class PortableAddArgCacheEntryProcessor : AddArgCacheEntryProcessor, IPortableMarshalAware + public class PortableAddArgCacheEntryProcessor : AddArgCacheEntryProcessor, IBinarizable { /** <inheritdoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { var w = writer.GetRawWriter(); @@ -222,7 +222,7 @@ namespace Apache.Ignite.Core.Tests.Cache } /** <inheritdoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { var r = reader.GetRawReader(); @@ -246,7 +246,7 @@ namespace Apache.Ignite.Core.Tests.Cache /// <summary> /// Portable exception. /// </summary> - public class PortableTestException : Exception, IPortableMarshalAware + public class PortableTestException : Exception, IBinarizable { /// <summary> /// Gets or sets exception info. @@ -260,13 +260,13 @@ namespace Apache.Ignite.Core.Tests.Cache } /** <inheritdoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { writer.GetRawWriter().WriteString(Info); } /** <inheritdoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { Info = reader.GetRawReader().ReadString(); } @@ -294,19 +294,19 @@ namespace Apache.Ignite.Core.Tests.Cache IgniteConfigurationEx cfg = new IgniteConfigurationEx(); - PortableConfiguration portCfg = new PortableConfiguration(); + BinaryConfiguration portCfg = new BinaryConfiguration(); - ICollection<PortableTypeConfiguration> portTypeCfgs = new List<PortableTypeConfiguration>(); + ICollection<BinaryTypeConfiguration> portTypeCfgs = new List<BinaryTypeConfiguration>(); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortablePerson))); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(CacheTestKey))); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(TestReferenceObject))); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortableAddArgCacheEntryProcessor))); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(PortableTestException))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(PortablePerson))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(CacheTestKey))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(TestReferenceObject))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(PortableAddArgCacheEntryProcessor))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(PortableTestException))); portCfg.TypeConfigurations = portTypeCfgs; - cfg.PortableConfiguration = portCfg; + cfg.BinaryConfiguration = portCfg; cfg.JvmClasspath = TestUtils.CreateTestClasspath(); cfg.JvmOptions = TestUtils.TestJavaOptions(); cfg.SpringConfigUrl = "config\\native-client-test-cache.xml"; @@ -342,7 +342,7 @@ namespace Apache.Ignite.Core.Tests.Cache [TearDown] public virtual void AfterTest() { for (int i = 0; i < GridCount(); i++) - Cache(i).WithKeepPortable<object, object>().RemoveAll(); + Cache(i).WithKeepBinary<object, object>().RemoveAll(); for (int i = 0; i < GridCount(); i++) { @@ -399,7 +399,7 @@ namespace Apache.Ignite.Core.Tests.Cache [Test] public void TestCircularReference() { - var cache = Cache().WithKeepPortable<int, object>(); + var cache = Cache().WithKeepBinary<int, object>(); TestReferenceObject obj1 = new TestReferenceObject(); @@ -407,7 +407,7 @@ namespace Apache.Ignite.Core.Tests.Cache cache.Put(1, obj1); - var po = (IPortableObject) cache.Get(1); + var po = (IBinaryObject) cache.Get(1); Assert.IsNotNull(po); @@ -1767,8 +1767,8 @@ namespace Apache.Ignite.Core.Tests.Cache //[Category(TestUtils.CATEGORY_INTENSIVE)] public void TestAsyncMultithreadedKeepPortable() { - var cache = Cache().WithKeepPortable<CacheTestKey, PortablePerson>(); - var portCache = Cache().WithKeepPortable<CacheTestKey, IPortableObject>(); + var cache = Cache().WithKeepBinary<CacheTestKey, PortablePerson>(); + var portCache = Cache().WithKeepBinary<CacheTestKey, IBinaryObject>(); const int threads = 10; const int objPerThread = 1000; @@ -1803,7 +1803,7 @@ namespace Apache.Ignite.Core.Tests.Cache { int key = threadIdx * objPerThread + i; - IPortableObject p = portCache.Get(new CacheTestKey(key)); + IBinaryObject p = portCache.Get(new CacheTestKey(key)); Assert.IsNotNull(p); Assert.AreEqual(key, p.GetField<int>("age")); @@ -1817,7 +1817,7 @@ namespace Apache.Ignite.Core.Tests.Cache { int threadIdx = Interlocked.Increment(ref cntr); - var futs = new List<Task<IPortableObject>>(); + var futs = new List<Task<IBinaryObject>>(); for (int i = 0; i < objPerThread; i++) { @@ -2801,7 +2801,7 @@ namespace Apache.Ignite.Core.Tests.Cache cache.Put(1, obj); - var portableResult = cache.WithKeepPortable<int, IPortableObject>().Get(1); + var portableResult = cache.WithKeepBinary<int, IBinaryObject>().Get(1); var resultObj = portableResult.Deserialize<TestSerializableObject>(); @@ -2830,7 +2830,7 @@ namespace Apache.Ignite.Core.Tests.Cache TestInvoke<NonSerializableCacheEntryProcessor>(async); Assert.Fail(); } - catch (PortableException) + catch (BinaryObjectException) { // Expected } @@ -2865,7 +2865,7 @@ namespace Apache.Ignite.Core.Tests.Cache AssertThrowsCacheEntryProcessorException( () => cache.Invoke(key, new T {ThrowErrPortable = true}, arg)); AssertThrowsCacheEntryProcessorException( - () => cache.Invoke(key, new T { ThrowErrNonSerializable = true }, arg), "PortableException"); + () => cache.Invoke(key, new T { ThrowErrNonSerializable = true }, arg), "BinaryObjectException"); } private static void AssertThrowsCacheEntryProcessorException(Action action, string containsText = null) @@ -2911,7 +2911,7 @@ namespace Apache.Ignite.Core.Tests.Cache TestInvokeAll<NonSerializableCacheEntryProcessor>(async, i); Assert.Fail(); } - catch (PortableException) + catch (BinaryObjectException) { // Expected } @@ -2958,8 +2958,8 @@ namespace Apache.Ignite.Core.Tests.Cache TestInvokeAllException(cache, entries, new T { ThrowErr = true, ThrowOnKey = errKey }, arg, errKey); TestInvokeAllException(cache, entries, new T { ThrowErrPortable = true, ThrowOnKey = errKey }, arg, errKey); - TestInvokeAllException(cache, entries, new T { ThrowErrNonSerializable = true, ThrowOnKey = errKey }, - arg, errKey, "PortableException"); + TestInvokeAllException(cache, entries, new T { ThrowErrNonSerializable = true, ThrowOnKey = errKey }, + arg, errKey, "BinaryObjectException"); } @@ -3002,7 +3002,7 @@ namespace Apache.Ignite.Core.Tests.Cache Assert.AreSame(cacheSkipStore1, cacheSkipStore2); // Ensure other flags are preserved. - Assert.IsTrue(((CacheImpl<int, int>) cache.WithKeepPortable<int, int>().WithSkipStore()).IsKeepPortable); + Assert.IsTrue(((CacheImpl<int, int>) cache.WithKeepBinary<int, int>().WithSkipStore()).IsKeepBinary); } [Test] @@ -3092,9 +3092,9 @@ namespace Apache.Ignite.Core.Tests.Cache { var cache0 = async ? Cache().WrapAsync() : Cache(); - var cache = cache0.WithKeepPortable<int, PortablePerson>(); + var cache = cache0.WithKeepBinary<int, PortablePerson>(); - var portCache = cache0.WithKeepPortable<int, IPortableObject>(); + var portCache = cache0.WithKeepBinary<int, IBinaryObject>(); int cnt = 10; @@ -3106,7 +3106,7 @@ namespace Apache.Ignite.Core.Tests.Cache keys.Add(i); } - IList<IPortableObject> objs = new List<IPortableObject>(); + IList<IBinaryObject> objs = new List<IBinaryObject>(); for (int i = 0; i < cnt; i++) { @@ -3120,7 +3120,7 @@ namespace Apache.Ignite.Core.Tests.Cache // Check objects weren't corrupted by subsequent cache operations. for (int i = 0; i < cnt; i++) { - IPortableObject obj = objs[i]; + IBinaryObject obj = objs[i]; CheckPersonData(obj, "person-" + i, i); } @@ -3145,7 +3145,7 @@ namespace Apache.Ignite.Core.Tests.Cache Assert.AreEqual(true, success1); } - private void CheckPersonData(IPortableObject obj, string expName, int expAge) + private void CheckPersonData(IBinaryObject obj, string expName, int expAge) { Assert.AreEqual(expName, obj.GetField<string>("name")); Assert.AreEqual(expAge, obj.GetField<int>("age")); http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs index 469887d..abb9e02 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs @@ -17,10 +17,10 @@ namespace Apache.Ignite.Core.Tests.Cache { + using Apache.Ignite.Core.Binary; using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Cluster; using Apache.Ignite.Core.Impl; - using Apache.Ignite.Core.Portable; using NUnit.Framework; /// <summary> @@ -86,14 +86,14 @@ namespace Apache.Ignite.Core.Tests.Cache ICacheAffinity aff = g.GetAffinity(null); - IPortableObject affKey = g.GetPortables().ToPortable<IPortableObject>(new AffinityTestKey(0, 1)); + IBinaryObject affKey = g.GetBinary().ToBinary<IBinaryObject>(new AffinityTestKey(0, 1)); IClusterNode node = aff.MapKeyToNode(affKey); for (int i = 0; i < 10; i++) { - IPortableObject otherAffKey = - g.GetPortables().ToPortable<IPortableObject>(new AffinityTestKey(i, 1)); + IBinaryObject otherAffKey = + g.GetBinary().ToBinary<IBinaryObject>(new AffinityTestKey(i, 1)); Assert.AreEqual(node.Id, aff.MapKeyToNode(otherAffKey).Id); } http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs index abef473..693a664 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs @@ -19,9 +19,9 @@ namespace Apache.Ignite.Core.Tests.Cache { using System; using System.Collections.Generic; + using Apache.Ignite.Core.Binary; using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Impl; - using Apache.Ignite.Core.Portable; using Apache.Ignite.Core.Tests.Query; using NUnit.Framework; @@ -55,6 +55,7 @@ namespace Apache.Ignite.Core.Tests.Cache public void SetUp() { TestUtils.KillProcesses(); + Ignition.StopAll(true); Ignition.Start(CreateConfiguration(GridData, @"config/dynamic/dynamic-data.xml")); Ignition.Start(CreateConfiguration(GridDataNoCfg, @"config/dynamic/dynamic-data-no-cfg.xml")); @@ -82,17 +83,17 @@ namespace Apache.Ignite.Core.Tests.Cache { IgniteConfigurationEx cfg = new IgniteConfigurationEx(); - PortableConfiguration portCfg = new PortableConfiguration(); + BinaryConfiguration portCfg = new BinaryConfiguration(); - ICollection<PortableTypeConfiguration> portTypeCfgs = new List<PortableTypeConfiguration>(); + ICollection<BinaryTypeConfiguration> portTypeCfgs = new List<BinaryTypeConfiguration>(); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(DynamicTestKey))); - portTypeCfgs.Add(new PortableTypeConfiguration(typeof(DynamicTestValue))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(DynamicTestKey))); + portTypeCfgs.Add(new BinaryTypeConfiguration(typeof(DynamicTestValue))); portCfg.TypeConfigurations = portTypeCfgs; cfg.GridName = name; - cfg.PortableConfiguration = portCfg; + cfg.BinaryConfiguration = portCfg; cfg.JvmClasspath = TestUtils.CreateTestClasspath(); cfg.JvmOptions = TestUtils.TestJavaOptions(); cfg.SpringConfigUrl = springCfg; http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs index f6deb42..430272f 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs @@ -65,9 +65,9 @@ namespace Apache.Ignite.Core.Tests.Cache } /** <inheritDoc /> */ - public bool IsKeepPortable + public bool IsKeepBinary { - get { return _cache.IsKeepPortable; } + get { return _cache.IsKeepBinary; } } /** <inheritDoc /> */ @@ -83,9 +83,9 @@ namespace Apache.Ignite.Core.Tests.Cache } /** <inheritDoc /> */ - public ICache<TK1, TV1> WithKeepPortable<TK1, TV1>() + public ICache<TK1, TV1> WithKeepBinary<TK1, TV1>() { - return _cache.WithKeepPortable<TK1, TV1>().WrapAsync(); + return _cache.WithKeepBinary<TK1, TV1>().WrapAsync(); } /** <inheritDoc /> */ http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs ---------------------------------------------------------------------- diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs index 78173e0..7c7fe35 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs +++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs @@ -22,12 +22,12 @@ namespace Apache.Ignite.Core.Tests.Cache.Query using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text; + using Apache.Ignite.Core.Binary; using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Cache.Query; using Apache.Ignite.Core.Common; using Apache.Ignite.Core.Impl; - using Apache.Ignite.Core.Impl.Portable; - using Apache.Ignite.Core.Portable; + using Apache.Ignite.Core.Impl.Binary; using NUnit.Framework; /// <summary> @@ -58,13 +58,13 @@ namespace Apache.Ignite.Core.Tests.Cache.Query IgniteConfigurationEx cfg = new IgniteConfigurationEx { - PortableConfiguration = new PortableConfiguration + BinaryConfiguration = new BinaryConfiguration { TypeConfigurations = new[] { - new PortableTypeConfiguration(typeof (QueryPerson)), - new PortableTypeConfiguration(typeof (PortableScanQueryFilter<QueryPerson>)), - new PortableTypeConfiguration(typeof (PortableScanQueryFilter<PortableUserObject>)) + new BinaryTypeConfiguration(typeof (QueryPerson)), + new BinaryTypeConfiguration(typeof (PortableScanQueryFilter<QueryPerson>)), + new BinaryTypeConfiguration(typeof (PortableScanQueryFilter<BinaryObject>)) } }, JvmClasspath = TestUtils.CreateTestClasspath(), @@ -386,7 +386,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// </summary> /// <param name="cnt">Amount of cache entries to create.</param> /// <param name="loc">Local query flag.</param> - /// <param name="keepPortable">Keep portable flag.</param> + /// <param name="keepPortable">Keep binary flag.</param> private void CheckSqlQuery(int cnt, bool loc, bool keepPortable) { var cache = Cache(); @@ -506,7 +506,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// </summary> /// <param name="cnt">Amount of cache entries to create.</param> /// <param name="loc">Local query flag.</param> - /// <param name="keepPortable">Keep portable flag.</param> + /// <param name="keepPortable">Keep binary flag.</param> private void CheckTextQuery(int cnt, bool loc, bool keepPortable) { var cache = Cache(); @@ -536,7 +536,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query [Test] public void TestScanQueryPortable() { - CheckScanQuery<PortableUserObject>(MaxItemCnt, false, true); + CheckScanQuery<BinaryObject>(MaxItemCnt, false, true); } /// <summary> @@ -554,7 +554,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query [Test] public void TestScanQueryLocalPortable() { - CheckScanQuery<PortableUserObject>(MaxItemCnt, true, true); + CheckScanQuery<BinaryObject>(MaxItemCnt, true, true); } /// <summary> @@ -574,7 +574,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query [Ignore("IGNITE-1012")] public void TestScanQueryPartitionsPortable([Values(true, false)] bool loc) { - CheckScanQueryPartitions<PortableUserObject>(MaxItemCnt, loc, true); + CheckScanQueryPartitions<BinaryObject>(MaxItemCnt, loc, true); } /// <summary> @@ -605,7 +605,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// </summary> /// <param name="cnt">Amount of cache entries to create.</param> /// <param name="loc">Local query flag.</param> - /// <param name="keepPortable">Keep portable flag.</param> + /// <param name="keepPortable">Keep binary flag.</param> private void CheckScanQuery<TV>(int cnt, bool loc, bool keepPortable) { var cache = Cache(); @@ -638,7 +638,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// </summary> /// <param name="cnt">Amount of cache entries to create.</param> /// <param name="loc">Local query flag.</param> - /// <param name="keepPortable">Keep portable flag.</param> + /// <param name="keepPortable">Keep binary flag.</param> private void CheckScanQueryPartitions<TV>(int cnt, bool loc, bool keepPortable) { StopGrids(); @@ -688,13 +688,13 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// <param name="cache">Cache.</param> /// <param name="qry">Query.</param> /// <param name="exp">Expected keys.</param> - /// <param name="keepPortable">Keep portable flag.</param> + /// <param name="keepPortable">Keep binary flag.</param> private static void ValidateQueryResults(ICache<int, QueryPerson> cache, QueryBase qry, HashSet<int> exp, bool keepPortable) { if (keepPortable) { - var cache0 = cache.WithKeepPortable<int, IPortableObject>(); + var cache0 = cache.WithKeepBinary<int, IBinaryObject>(); using (var cursor = cache0.Query(qry)) { @@ -899,10 +899,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query /// <summary> /// Portable query filter. /// </summary> - public class PortableScanQueryFilter<TV> : ScanQueryFilter<TV>, IPortableMarshalAware + public class PortableScanQueryFilter<TV> : ScanQueryFilter<TV>, IBinarizable { /** <inheritdoc /> */ - public void WritePortable(IPortableWriter writer) + public void WriteBinary(IBinaryWriter writer) { var w = writer.GetRawWriter(); @@ -910,7 +910,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query } /** <inheritdoc /> */ - public void ReadPortable(IPortableReader reader) + public void ReadBinary(IBinaryReader reader) { var r = reader.GetRawReader();
