diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 674c59cbd2..bf56aa15fe 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "docfx": { - "version": "2.65.3", + "version": "2.74.1", "commands": [ "docfx" ] diff --git a/Hazelcast.Net.sln b/Hazelcast.Net.sln index b0f7d73761..f0255c3415 100644 --- a/Hazelcast.Net.sln +++ b/Hazelcast.Net.sln @@ -26,8 +26,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hazelcast.Net.JetBrainsAnno EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{25300DF5-472C-4D9B-898A-820577F2F9C7}" ProjectSection(SolutionItems) = preProject - build\build.proj = build\build.proj build\AnalysisRules.props = build\AnalysisRules.props + build\build.proj = build\build.proj build\certs-root-ca.conf = build\certs-root-ca.conf build\certs-sub-ca.conf = build\certs-sub-ca.conf build\certs.ps1 = build\certs.ps1 @@ -57,17 +57,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ ProjectSection(SolutionItems) = preProject .github\workflows\assign-milestones.js = .github\workflows\assign-milestones.js .github\workflows\assign-milestones.yml = .github\workflows\assign-milestones.yml - .github\workflows\build-branch.yml = .github\workflows\build-branch.yml .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml - .github\workflows\build-release.yml = .github\workflows\build-release.yml + .github\workflows\build-branch.yml = .github\workflows\build-branch.yml .github\workflows\build-guest-pr.yml = .github\workflows\build-guest-pr.yml .github\workflows\build-pr.yml = .github\workflows\build-pr.yml + .github\workflows\build-release.yml = .github\workflows\build-release.yml .github\workflows\create-checks.yml = .github\workflows\create-checks.yml .github\workflows\get-frameworks.yml = .github\workflows\get-frameworks.yml .github\workflows\jira-label.yml = .github\workflows\jira-label.yml .github\workflows\release-scripts.js = .github\workflows\release-scripts.js - .github\workflows\trigger-release.yml = .github\workflows\trigger-release.yml .github\workflows\report-guest-pr.yml = .github\workflows\report-guest-pr.yml + .github\workflows\trigger-release.yml = .github\workflows\trigger-release.yml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{48E8586E-CD6C-43B8-B353-0B3F3BDCDDCA}" @@ -97,12 +97,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "install", "install", "{7A5D .github\actions\install\action.yml = .github\actions\install\action.yml EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hazelcast.Net.Linq.Async", "src\Hazelcast.Net.Linq.Async\Hazelcast.Net.Linq.Async.csproj", "{1E7F4AE0-25A0-4C8C-9C0C-4C89DCB193F5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hazelcast.Net.Linq.Async", "src\Hazelcast.Net.Linq.Async\Hazelcast.Net.Linq.Async.csproj", "{1E7F4AE0-25A0-4C8C-9C0C-4C89DCB193F5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hazelcast.Net.Caching", "src\Hazelcast.Net.Caching\Hazelcast.Net.Caching.csproj", "{21FAFF1E-B0D6-46E0-8EE3-1D7D1C67CBC8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hazelcast.Net.Caching", "src\Hazelcast.Net.Caching\Hazelcast.Net.Caching.csproj", "{21FAFF1E-B0D6-46E0-8EE3-1D7D1C67CBC8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hazelcast.Net.CodeGenerator", "src\Hazelcast.Net.CodeGenerator\Hazelcast.Net.CodeGenerator.csproj", "{91211959-EC26-4FC9-84A8-E8C924300BF7}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protocol", "protocol", "{3950534A-4217-4138-A7D7-05C0E828221C}" + ProjectSection(SolutionItems) = preProject + protocol\cs\__init__.py = protocol\cs\__init__.py + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -171,6 +176,7 @@ Global {3C970CF6-DF19-4FD0-9BE3-F63EE72AC4CC} = {48E8586E-CD6C-43B8-B353-0B3F3BDCDDCA} {295E2764-401E-4604-8C2E-E20B99171705} = {48E8586E-CD6C-43B8-B353-0B3F3BDCDDCA} {7A5DDB5C-A126-4A4E-914E-87E7E54941DB} = {48E8586E-CD6C-43B8-B353-0B3F3BDCDDCA} + {3950534A-4217-4138-A7D7-05C0E828221C} = {FD4710D4-ECC2-452E-A7C6-0320AFAFF124} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F18DBBE5-FCEE-4B50-AF9E-D01D5B871564} diff --git a/Hazelcast.Net.sln.DotSettings b/Hazelcast.Net.sln.DotSettings index cfd4d58a3e..13cc22e728 100644 --- a/Hazelcast.Net.sln.DotSettings +++ b/Hazelcast.Net.sln.DotSettings @@ -26,10 +26,14 @@ True True True + True + True True + True True True True + True True True True @@ -50,5 +54,6 @@ 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. + True diff --git a/build/AnalysisRules.props b/build/AnalysisRules.props index 08d3d89bd1..9f75d342a2 100644 --- a/build/AnalysisRules.props +++ b/build/AnalysisRules.props @@ -55,10 +55,56 @@ - $(WarningsAsErrors);RS0016;RS0017;RS0022;RS0024;RS0025;RS0026;RS0027;RS0036;RS0037;RS0041;RS0048;RS0050;RS0051;RS0052;RS0053;RS0054;RS0055;RS0056;RS0057;RS0058;RS0059;RS0060;RS0061 + + $(WarningsAsErrors);RS0016 + + $(WarningsAsErrors);RS0017 + + $(WarningsAsErrors);RS0022 + + $(WarningsAsErrors);RS0024 + + $(WarningsAsErrors);RS0025 + + $(WarningsAsErrors);RS0026 + + $(WarningsAsErrors);RS0027 + + $(WarningsAsErrors);RS0036 + + $(WarningsAsErrors);RS0037 + + $(WarningsAsErrors);RS0041 + + $(WarningsAsErrors);RS0048 + + $(WarningsAsErrors);RS0050 + + + + + + + $(WarningsAsErrors);RS0053 + + $(WarningsAsErrors);RS0054 + + $(WarningsAsErrors);RS0055 + + + + $(WarningsAsErrors);RS0057 + + $(WarningsAsErrors);RS0058 + + + + + + $(WarningsAsErrors);RS0061 \ No newline at end of file diff --git a/doc/dev/doc/dynamic-configuration.md b/doc/dev/doc/dynamic-configuration.md new file mode 100644 index 0000000000..aecf5b3854 --- /dev/null +++ b/doc/dev/doc/dynamic-configuration.md @@ -0,0 +1,28 @@ +# Dynamic Configuration + +Starting with version 5.4.0, the Hazelcast .NET client supports dynamic configuration of the cluster as described in the main [Dynamic Configuration for Members](https://docs.hazelcast.com/hazelcast/latest/configuration/dynamic-config) documentation, for the following structures: + +* Maps +* Ring buffers + +The dynamic configuration feature is accessible via the `IHazelcastClient.DynamicOptions` service. For instance, assuming that `client` is an `IHazelcastClient` instance, the following code can be used to configure a ring buffer: + +``` +await client.DynamicOptions.ConfigureRingbufferAsync("buffer-name", options => +{ + options.Name = "buffer-name"; + options.AsyncBackupCount = 1; + options.BackupCount = 1; + options.Capacity = 1; + options.InMemoryFormat = InMemoryFormat.Binary; + options.MergePolicy.BatchSize = 1; + options.MergePolicy.Policy = "policy"; + options.TimeToLiveSeconds = 1; + options.SplitBrainProtectionName = "splitBrainProtectionName"; + options.RingbufferStore.Enabled = true; + options.RingbufferStore.ClassName = "classNam"; + options.RingbufferStore.FactoryClassName = "factoryClassName"; +}); +``` + +Refer to the main [Dynamic Configuration with Programmatic APIs](https://docs.hazelcast.com/hazelcast/latest/configuration/dynamic-config-programmatic-api) for a complete list of options that can be configured, and explainations of their effects. The .NET API closely follows the Java API. \ No newline at end of file diff --git a/doc/dev/doc/toc.md b/doc/dev/doc/toc.md index d1aa71bc66..4b0d8df22f 100644 --- a/doc/dev/doc/toc.md +++ b/doc/dev/doc/toc.md @@ -43,6 +43,7 @@ # [Events](events.md) # [Data Affinity](data-affinity.md) # [Transactions](transactions.md) +# [Dynamic COnfiguration](dynamic-configuration.md) # [Examples](examples.md) # [Extensions](extensions.md) ## [Dependency Injection](extensions/dependency-injection.md) diff --git a/hz.ps1 b/hz.ps1 index aec36c067b..89966cc8e9 100644 --- a/hz.ps1 +++ b/hz.ps1 @@ -145,10 +145,13 @@ $params = @( @{ name = "yolo"; type = [switch]; default = $false; desc = "confirms excution of sensitive actions" }, - @{ name="copy-files-source"; type = [string]; default = $null; + @{ name = "copy-files-source"; type = [string]; default = $null; desc = "source folder to be copied" }, - @{ name="beta"; type = [switch]; default = $false; + @{ name = "publicApi"; type = [switch]; default = $false; alias = "public-api"; + desc = "Whether to enforce Roslyn Public API rules" + }, + @{ name = "beta"; type = [switch]; default = $false; desc = "whether to run beta features and tests" } ) @@ -1445,7 +1448,10 @@ function hz-generate-codecs { remove-item -force $srcDir/Hazelcast.Net/Protocol/CustomCodecs/*.cs Write-Output "Generate codecs" + $preserve = $pwd + cd $slnRoot/protocol # required for python to pick the correct protocol git commit python $slnRoot/protocol/generator.py -l cs --no-binary -r $slnRoot + cd $preserve Write-Output "Cleanup codecs" @@ -1571,7 +1577,9 @@ function hz-build { $buildArgs += "-p:VersionSuffix=$versionSuffix" } - $buildArgs += "-p:ReleaseBranch=$isReleaseBranch" + if ($isReleaseBranch -or $options.publicApi) { + $buildArgs += "-p:ReleaseBranch=$true" + } $projs | foreach { Write-Output "" diff --git a/src/Hazelcast.Net.Testing/Hazelcast.Net.Testing.csproj b/src/Hazelcast.Net.Testing/Hazelcast.Net.Testing.csproj index 4662021231..e2ad357fe0 100644 --- a/src/Hazelcast.Net.Testing/Hazelcast.Net.Testing.csproj +++ b/src/Hazelcast.Net.Testing/Hazelcast.Net.Testing.csproj @@ -16,6 +16,11 @@ $(DefineConstants);SERVER_CODEC + + + $(NoWarn);CS1591 + + diff --git a/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureMapTests.cs b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureMapTests.cs new file mode 100644 index 0000000000..40e4215b60 --- /dev/null +++ b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureMapTests.cs @@ -0,0 +1,302 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Messaging.FrameFields; +using Hazelcast.Models; +using Hazelcast.NearCaching; +using Hazelcast.Protocol.Codecs; +using Hazelcast.Protocol.Models; +using Hazelcast.Testing; +using Hazelcast.Testing.Remote; +using NUnit.Framework; + +namespace Hazelcast.Tests.Configuration.Dynamic; + +[TestFixture] +public class DynamicConfigureMapTests : DynamicConfigureTestBase +{ + [Test] + public async Task CanConfigureEverything() + { + var options = CreateHazelcastOptions(); + options.ClusterName = RcCluster.Id; + await using var client = await HazelcastClientFactory.StartNewClientAsync(options).CfAwait(); + + await client.DynamicOptions.ConfigureMapAsync("map-name", options => + { + // everything below is just values + + options.Name = "map-name"; // there is no default for that one + options.SplitBrainProtectionName = MapOptions.Defaults.SplitBrainProtectionName; + + options.BackupCount = MapOptions.Defaults.BackupCount; + options.AsyncBackupCount = MapOptions.Defaults.AsyncBackupCount; + options.TimeToLiveSeconds = MapOptions.Defaults.TtlSeconds; + options.MaxIdleSeconds = MapOptions.Defaults.MaxIdleSeconds; + options.StatisticsEnabled = MapOptions.Defaults.StatisticsEnabled; + options.PerEntryStatsEnabled = MapOptions.Defaults.EntryStatsEnabled; + options.ReadBackupData = MapOptions.Defaults.ReadBackupData; + + options.CacheDeserializedValues = MapOptions.Defaults.CachedDeserializedValues; + options.InMemoryFormat = MapOptions.Defaults.InMemoryFormat; + options.MetadataPolicy = MapOptions.Defaults.MetadataPolicy; + + // everything below is pre-existing objects + + options.MapStore.Enabled = MapStoreOptions.Defaults.Enabled; + options.MapStore.Offload = MapStoreOptions.Defaults.Offload; + options.MapStore.InitialLoadMode = MapStoreOptions.Defaults.InitialLoadMode; + options.MapStore.WriteCoalescing = MapStoreOptions.Defaults.WriteCoalescing; + options.MapStore.ClassName = "className"; // cannot be default 'null' value + options.MapStore.FactoryClassName = "factoryClassName"; // cannot be default 'null' value + + options.MergePolicy.BatchSize = MergePolicyOptions.Defaults.BatchSize; + options.MergePolicy.Policy = MergePolicyOptions.Defaults.MergePolicy; + + options.HotRestart.Enabled = HotRestartOptions.Defaults.Enabled; + options.HotRestart.Fsync = HotRestartOptions.Defaults.Fsync; + + options.DataPersistence.Enabled = DataPersistenceOptions.Defaults.Enabled; + options.DataPersistence.Fsync = DataPersistenceOptions.Defaults.Fsync; + + //mapOptions.MerkleTree.Enabled = ; // default is unset + options.MerkleTree.Depth = MerkleTreeOptions.Defaults.Depth; + + options.EventJournal.Enabled = EventJournalOptions.Defaults.Enabled; + options.EventJournal.Capacity = EventJournalOptions.Defaults.Capacity; + options.EventJournal.TimeToLiveSeconds = 123; // cannot be default 'zero' value + + options.Eviction.EvictionPolicy = EvictionOptions.Defaults.EvictionPolicy; + options.Eviction.MaxSizePolicy = EvictionOptions.Defaults.MaxSizePolicy; + options.Eviction.Size = EvictionOptions.Defaults.Size; + options.Eviction.ComparatorClassName = "comparatorClassName"; // cannot be default 'null' value + + options.TieredStore.Enabled = TieredStoreOptions.Defaults.Enabled; + options.TieredStore.DiskTier.Enabled = DiskTierOptions.Defaults.Enabled; + options.TieredStore.DiskTier.DeviceName = DiskTierOptions.Defaults.DeviceName; + options.TieredStore.MemoryTier.Capacity = MemoryTierOptions.Defaults.Capacity; + + // everything below is initially null + // collections are auto-initialized + + options.PartitioningAttributes.Add(new PartitioningAttributeOptions("name")); + + options.NearCache = new NearCacheOptions + { + Name = "name", + InMemoryFormat = InMemoryFormat.Native, + CacheLocalEntries = true, + InvalidateOnChange = true, + SerializeKeys = true, + LocalUpdatePolicy = UpdatePolicy.CacheOnUpdate, + MaxIdleSeconds = 120, + TimeToLiveSeconds = 120, + Eviction = // initially not null + { + ComparatorClassName = "comparatorClassName", + EvictionPolicy = EvictionPolicy.Lfu, + MaxSizePolicy = MaxSizePolicy.EntryCount, + Size = 120 + }, + Preloader = // initially not null + { + Enabled = true, + Directory = "directory", + StoreInitialDelaySeconds = 100, + StoreIntervalSeconds = 100 + } + }; + + options.WanReplicationRef = new WanReplicationRef + { + Name = "name", + MergePolicyClassName = "className", + RepublishingEnabled = true, + Filters = // initially not null + { + "filter" + } + }; + + options.EntryListeners.Add(new EntryListenerOptions("className", true, true)); + + options.PartitionLostListeners.Add(new MapPartitionLostListenerOptions("className")); + + options.Indexes.Add(new IndexOptions + { + Name = "name", + Type = IndexType.Hashed, + Attributes = // initially not null + { + "attribute1", + "attribute2" + }, + BitmapIndex = // initially not null + { + UniqueKey = "uniqueKey", + UniqueKeyTransformation = UniqueKeyTransformation.Raw + }, + BTreeIndex = // initially not null + { + PageSize = Capacity.Of(120, MemoryUnit.KiloBytes), + MemoryTier = // initially not null + { + Capacity = Capacity.Of(120, MemoryUnit.KiloBytes) + } + } + }); + + options.Attributes.Add(new AttributeOptions("name", "extractorClassName")); + + options.QueryCaches.Add(new QueryCacheOptions("name") + { + Name = "name", + BatchSize = 120, + BufferSize = 120, + DelaySeconds = 120, + EntryListeners = // initially not null + { + new() + { + ClassName = "className", + IncludeValue = true, + Local = true + } + }, + Eviction = // initially not null + { + ComparatorClassName = "comparatorClassName", + EvictionPolicy = EvictionPolicy.Lfu, + MaxSizePolicy = MaxSizePolicy.EntryCount, + Size = 120 + }, + Predicate = // initially not null + { + ClassName = "className", + Sql = "SQL" + }, + Indexes = // initially not null + { + new() + { + Name = "name", + Attributes = new List {"attribute1", "attribute2"}, + BitmapIndex = // initially not null + { + UniqueKey = "uniqueKey", + UniqueKeyTransformation = UniqueKeyTransformation.Raw + }, + BTreeIndex = // initially not null + { + PageSize = Capacity.Of(120, MemoryUnit.KiloBytes), + MemoryTier = // initially not null + { + Capacity = Capacity.Of(120, MemoryUnit.KiloBytes) + } + }, + Type = IndexType.Hashed + } + }, + InMemoryFormat = InMemoryFormat.Binary, + Coalesce = true, + IncludeValue = true, + }); + + options.PartitioningStrategy = new PartitioningStrategyOptions("partitioningStrategyClass"); + }); + } + + [Test] + public async Task DefaultOptionsEncodeToSameMessageAsJava() + { + const string script = @" + +var serializationService = instance_0.serializationService + +// alas... it wants a 'client instance'... so we're not going to 'adapt' the +// inner collections because it would be a real pain to re-code it all here +//var ClientDynamicClusterConfig = Java.type(""com.hazelcast.client.impl.clientside.ClientDynamicClusterConfig"") +//var clientDynamicClusterConfig = new ClientDynamicClusterConfig(instance_0.getOriginal()) + +var DynamicConfigAddMapConfigCodec = Java.type(""com.hazelcast.client.impl.protocol.codec.DynamicConfigAddMapConfigCodec"") +var EvictionConfigHolder = Java.type(""com.hazelcast.client.impl.protocol.task.dynamicconfig.EvictionConfigHolder"") +var MapStoreConfigHolder = Java.type(""com.hazelcast.client.impl.protocol.task.dynamicconfig.MapStoreConfigHolder"") +var NearCacheConfigHolder = Java.type(""com.hazelcast.client.impl.protocol.task.dynamicconfig.NearCacheConfigHolder"") + +var MapConfig = Java.type(""com.hazelcast.config.MapConfig"") +var mapConfig = new MapConfig(""map-name"") + +var message = DynamicConfigAddMapConfigCodec.encodeRequest( + mapConfig.getName(), + mapConfig.getBackupCount(), mapConfig.getAsyncBackupCount(), mapConfig.getTimeToLiveSeconds(), + mapConfig.getMaxIdleSeconds(), EvictionConfigHolder.of(mapConfig.getEvictionConfig(), serializationService), + mapConfig.isReadBackupData(), mapConfig.getCacheDeserializedValues().name(), + mapConfig.getMergePolicyConfig().getPolicy(), mapConfig.getMergePolicyConfig().getBatchSize(), + mapConfig.getInMemoryFormat().name(), + null/*listenerConfigs*/, + null/*partitionLostListenerConfigs*/, + mapConfig.isStatisticsEnabled(), mapConfig.getSplitBrainProtectionName(), + MapStoreConfigHolder.of(mapConfig.getMapStoreConfig(), serializationService), + NearCacheConfigHolder.of(mapConfig.getNearCacheConfig(), serializationService), + mapConfig.getWanReplicationRef(), mapConfig.getIndexConfigs(), mapConfig.getAttributeConfigs(), + null/*queryCacheConfigHolders*/, null/*partitioningStrategyClassName*/, null/*partitioningStrategy*/, mapConfig.getHotRestartConfig(), + mapConfig.getEventJournalConfig(), mapConfig.getMerkleTreeConfig(), mapConfig.getMetadataPolicy().getId(), + mapConfig.isPerEntryStatsEnabled(), mapConfig.getDataPersistenceConfig(), mapConfig.getTieredStoreConfig(), + mapConfig.getPartitioningAttributeConfigs(), + null /*namespace*/) + +" + ResultIsJavaMessageBytes; + + var javaBytes = await ScriptToBytes(script); + + var options = new MapOptions("map-name"); + var message = DynamicConfigAddMapConfigCodec.EncodeRequest( + options.Name, + options.BackupCount, options.AsyncBackupCount, + options.TimeToLiveSeconds, options.MaxIdleSeconds, + EvictionConfigHolder.Of(options.Eviction), + options.ReadBackupData, + options.CacheDeserializedValues.ToJavaString(), + options.MergePolicy.Policy, options.MergePolicy.BatchSize, + options.InMemoryFormat.ToJavaString(), + null, //MapListenerConfigs(mapOptions.EntryListeners), + null, //MapListenerConfigs(mapOptions.PartitionLostListeners), + options.StatisticsEnabled, + options.SplitBrainProtectionName, + MapStoreConfigHolder.Of(options.MapStore), + NearCacheConfigHolder.Of(options.NearCache), + options.WanReplicationRef, + options.Indexes, + options.Attributes, + null, //MapQueryCacheConfigs(mapOptions.QueryCaches), + null,/*mapOptions.PartitioningStrategy?.PartitioningStrategyClass*/ + null, + options.HotRestart, options.EventJournal, options.MerkleTree, + (int)options.MetadataPolicy, options.PerEntryStatsEnabled, + options.DataPersistence, options.TieredStore, options.PartitioningAttributes, + null /*namespace*/); + + var dotnetBytes = MessageToBytes(message); + + AssertMessagesAreIdentical(javaBytes, dotnetBytes); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureRingBufferTests.cs b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureRingBufferTests.cs new file mode 100644 index 0000000000..8bc308bcdf --- /dev/null +++ b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureRingBufferTests.cs @@ -0,0 +1,125 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System.Threading.Tasks; +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.Protocol.Codecs; +using Hazelcast.Protocol.Models; +using NUnit.Framework; + +namespace Hazelcast.Tests.Configuration.Dynamic; + +[TestFixture] +public class DynamicConfigureRingBufferTests : DynamicConfigureTestBase +{ + [Test] + public async Task CanConfigureEverything() + { + var options = CreateHazelcastOptions(); + options.ClusterName = RcCluster.Id; + await using var client = await HazelcastClientFactory.StartNewClientAsync(options).CfAwait(); + + await client.DynamicOptions.ConfigureRingbufferAsync("buffer-name", options => + { + options.Name = "buffer-name"; + options.AsyncBackupCount = 1; + options.BackupCount = 1; + options.Capacity = 1; + options.InMemoryFormat = InMemoryFormat.Binary; + options.MergePolicy.BatchSize = 1; + options.MergePolicy.Policy = "policy"; + options.TimeToLiveSeconds = 1; + options.SplitBrainProtectionName = "splitBrainProtectionName"; + options.RingbufferStore.Enabled = true; + options.RingbufferStore.ClassName = "classNam"; + options.RingbufferStore.FactoryClassName = "factoryClassName"; + }); + } + + [Test] + public async Task DefaultOptionsEncodeToSameMessageAsJava() + { + // CI error: trying to invoke this: + // com.hazelcast.client.impl.protocol.codec.DynamicConfigAddRingbufferConfigCodec.encodeRequest( + // String, + // int,int,int,int, + // String, + // RingbufferStoreConfigHolder, + // String,String, + // int, + // String)] + // + // this what we have in Java codebase: + // encodeRequest( + // java.lang.String name, + // int capacity, int backupCount, int asyncBackupCount, int timeToLiveSeconds, + // java.lang.String inMemoryFormat, + // @Nullable com.hazelcast.client.impl.protocol.task.dynamicconfig.RingbufferStoreConfigHolder ringbufferStoreConfig, + // @Nullable java.lang.String splitBrainProtectionName, java.lang.String mergePolicy, + // int mergeBatchSize) { + // + // now what is the trailing string?! + // + // in hazelcast-repo 5.4 it's + // encodeRequest(..., @Nullable java.lang.String namespace) { + + const string script = @" + +var serializationService = instance_0.serializationService + +var RingbufferConfig = Java.type(""com.hazelcast.config.RingbufferConfig"") +var ringbufferConfig = new RingbufferConfig(""buffer-name"") + +var RingbufferStoreConfigHolder = Java.type(""com.hazelcast.client.impl.protocol.task.dynamicconfig.RingbufferStoreConfigHolder"") +var ringbufferStoreConfig = ringbufferConfig.getRingbufferStoreConfig() != null && + ringbufferConfig.getRingbufferStoreConfig().isEnabled() + ? RingbufferStoreConfigHolder.of(ringbufferConfig.getRingbufferStoreConfig(), serializationService) + : null + +var DynamicConfigAddRingbufferConfigCodec = Java.type(""com.hazelcast.client.impl.protocol.codec.DynamicConfigAddRingbufferConfigCodec"") +var message = DynamicConfigAddRingbufferConfigCodec.encodeRequest( + ringbufferConfig.getName(), + ringbufferConfig.getCapacity(), ringbufferConfig.getBackupCount(), + ringbufferConfig.getAsyncBackupCount(), ringbufferConfig.getTimeToLiveSeconds(), + ringbufferConfig.getInMemoryFormat().name(), + ringbufferStoreConfig, + ringbufferConfig.getSplitBrainProtectionName(), ringbufferConfig.getMergePolicyConfig().getPolicy(), + ringbufferConfig.getMergePolicyConfig().getBatchSize(), + null /*namespace*/) + +" + ResultIsJavaMessageBytes; + + var javaBytes = await ScriptToBytes(script); + + var options = new RingbufferOptions("buffer-name"); + var message = DynamicConfigAddRingbufferConfigCodec.EncodeRequest( + options.Name, + options.Capacity, + options.BackupCount, + options.AsyncBackupCount, + options.TimeToLiveSeconds, + options.InMemoryFormat.ToJavaString(), + options.RingbufferStore is { Enabled: true } ? RingbufferStoreConfigHolder.Of(options.RingbufferStore) : null, + options.SplitBrainProtectionName, + options.MergePolicy.Policy, + options.MergePolicy.BatchSize, + null /*namespace*/ + ); + + var dotnetBytes = MessageToBytes(message); + + AssertMessagesAreIdentical(javaBytes, dotnetBytes); + } +} diff --git a/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureTestBase.cs b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureTestBase.cs new file mode 100644 index 0000000000..16079810bf --- /dev/null +++ b/src/Hazelcast.Net.Tests/Configuration/Dynamic/DynamicConfigureTestBase.cs @@ -0,0 +1,162 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Globalization; +using System.Text; +using System.Threading.Tasks; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Testing; +using Hazelcast.Testing.Remote; +using NUnit.Framework; + +namespace Hazelcast.Tests.Configuration.Dynamic; + +public class DynamicConfigureTestBase : SingleMemberRemoteTestBase +{ + public const string ResultIsJavaMessageBytes = @" +var ArrayOfBytes = Java.type(""byte[]"") +var bytes = new ArrayOfBytes(message.getBufferLength()) +var frame = message.getStartFrame() +var ix = 0; +while (frame != null) +{ + //writeIntL(frame.content.length + 6) + var len = frame.content.length + 6 + bytes[ix++] = len & 0xff + bytes[ix++] = (len >>> 8) & 0xff + bytes[ix++] = (len >>> 16) & 0xff + bytes[ix++] = (len >>> 24) & 0xff + var flags = frame.flags + if (frame == message.getEndFrame()) flags |= 8192 // IS_FINAL_FLAG + //writeShortL(flags) + bytes[ix++] = flags & 0xff + bytes[ix++] = (flags >>> 8) & 0xff + //writeBytes(frame.content) + for (var i = 0; i < frame.content.length; i++) bytes[ix++] = frame.content[i] + frame = frame.next +} + +function h2s(b) { + if (b < 0) b = 0xFF + b + 1 + var s = b.toString(16) + if (s.length < 2) s = ""0"" + s + return s +} + +var result = """" +for (var i = 0; i < bytes.length; i++) result += h2s(bytes[i]) +"; + + public async Task ScriptToBytes(string script) + { + var response = await RcClient.ExecuteOnControllerAsync(RcCluster.Id, script, Lang.JAVASCRIPT); + Assert.That(response.Success, $"message: {response.Message}"); + Assert.That(response.Result, Is.Not.Null); + var stringData = Encoding.ASCII.GetString(response.Result); + var javaBytesLength = stringData.Length / 2; + var javaBytes = new byte[javaBytesLength]; + for (var i = 0; i < javaBytesLength; i++) + javaBytes[i] = byte.Parse(stringData.Substring(i * 2, 2), NumberStyles.HexNumber); + return javaBytes; + } + + internal byte[] MessageToBytes(ClientMessage message) + { + var dotnetBytesLength = 0; + for (var frame = message.FirstFrame; frame != null; frame = frame.Next) + dotnetBytesLength += frame.Length; + + var dotnetBytes = new byte[dotnetBytesLength]; + var ix = 0; + for (var frame = message.FirstFrame; frame != null; frame = frame.Next) + { + //writeIntL(frame.content.length + 6) + var len = frame.Length; + dotnetBytes.WriteIntL(ix, len); + ix += BytesExtensions.SizeOfInt; + var flags = frame.Flags; + if (frame == message.LastFrame) flags |= FrameFlags.Final; + //writeShortL(flags) + dotnetBytes.WriteShortL(ix, (short)flags); + ix += BytesExtensions.SizeOfShort; + //writeBytes(frame.content) + for (var i = 0; i < frame.Bytes.Length; i++) dotnetBytes[ix++] = frame.Bytes[i]; + } + + return dotnetBytes; + } + + public void AssertMessagesAreIdentical(byte[] bytes0, byte[] bytes1) + { + Assert.That(bytes1.Length, Is.EqualTo(bytes0.Length), "Lengths are different"); + + var position = 0; + var f = 0; + while (position < bytes0.Length && position < bytes1.Length) + { + var frameLength0 = bytes0.ReadIntL(position) - 6; + var frameLength1 = bytes1.ReadIntL(position) - 6; + position += BytesExtensions.SizeOfInt; + + if (frameLength0 != frameLength1) + { + Console.WriteLine($"FRAME {f:000}: len {frameLength0} != {frameLength1}"); + for (var k = 0; k < 64; k++) + Console.Write($"{bytes0[position + k]:X2} "); + Console.WriteLine(); + for (var k = 0; k < 64; k++) + Console.Write($"{bytes1[position + k]:X2} "); + Console.WriteLine(); + } + Assert.That(frameLength1, Is.EqualTo(frameLength0), $"Frames {f} have different lengths"); + + var frameFlags0 = bytes0.ReadShortL(position); + var frameFlags1 = bytes0.ReadShortL(position); + position += BytesExtensions.SizeOfShort; + + if (frameFlags0 != frameFlags1) + { + Console.WriteLine($"FRAME {f:000}: flags {frameFlags1} != {frameFlags0}"); + } + Assert.That(frameFlags1, Is.EqualTo(frameFlags0), $"Frames {f} have different flags"); + + Console.Write($"FRAME {f++:000}: {frameFlags0:X4} {frameLength0:00000000} "); + var i = 0; + while (i < frameLength0) + { + if (bytes0[position + i] != bytes1[position + i]) break; + i++; + } + if (i == frameLength0) Console.WriteLine("OK"); + else + { + Console.WriteLine($"ERR at byte {i}"); + Console.Write(" - "); + for (var j = 0; j < frameLength0; j++) Console.Write($"{bytes0[position + j]:X2} "); + Console.WriteLine(); + Console.Write(" - "); + for (var j = 0; j < frameLength1; j++) Console.Write($"{bytes1[position + j]:X2} "); + Console.WriteLine(); + Console.Write(" "); + for (var j = 0; j < i; j++) Console.Write($" "); + Console.WriteLine("^^"); + } + Assert.That(i, Is.EqualTo(frameLength0), $"Frames {f} have different bytes"); + + position += frameLength0; + } + } +} diff --git a/src/Hazelcast.Net.Tests/Configuration/HazelcastOptionsTests.cs b/src/Hazelcast.Net.Tests/Configuration/HazelcastOptionsTests.cs index 5ed5c94a36..1873c38662 100644 --- a/src/Hazelcast.Net.Tests/Configuration/HazelcastOptionsTests.cs +++ b/src/Hazelcast.Net.Tests/Configuration/HazelcastOptionsTests.cs @@ -582,6 +582,8 @@ private static void AssertSameOptions(object obj, object expected) var oValue = property.GetValue(obj); var eValue = property.GetValue(expected); + if (oValue == eValue) continue; // same, obviously + if (type == typeof(string)) // string is enumerable, must test first { Assert.That(oValue, Is.EqualTo(eValue), $"{type}::{property.Name}"); diff --git a/src/Hazelcast.Net.Tests/Data/DataTests.cs b/src/Hazelcast.Net.Tests/Data/DataTests.cs index 42f00fb3ea..6f9bd8cab9 100644 --- a/src/Hazelcast.Net.Tests/Data/DataTests.cs +++ b/src/Hazelcast.Net.Tests/Data/DataTests.cs @@ -157,10 +157,10 @@ public void IndexConfigTest() Assert.That(x.Attributes, Does.Contain("bbb")); Assert.That(x.Attributes, Does.Contain("ccc")); - Assert.That(x.BitmapIndexOptions, Is.Not.Null); + Assert.That(x.BitmapIndex, Is.Not.Null); var y = new BitmapIndexOptions(); - x.BitmapIndexOptions = y; - Assert.That(x.BitmapIndexOptions, Is.SameAs(y)); + x.BitmapIndex = y; + Assert.That(x.BitmapIndex, Is.SameAs(y)); IndexOptions.ValidateAttribute(x, "flub"); diff --git a/src/Hazelcast.Net.Tests/Support/Issue823.cs b/src/Hazelcast.Net.Tests/Support/Issue823.cs index c143e87fba..441c7ce09e 100644 --- a/src/Hazelcast.Net.Tests/Support/Issue823.cs +++ b/src/Hazelcast.Net.Tests/Support/Issue823.cs @@ -24,17 +24,6 @@ using Hazelcast.Configuration.Binding; using Hazelcast.Testing; using Microsoft.Extensions.Configuration; - -/* Unmerged change from project 'Hazelcast.Net.Tests (net462)' -Before: -using Microsoft.Extensions.Logging; -After: -using Microsoft.Extensions.Logging; -using Hazelcast; -using Hazelcast.Tests; -using Hazelcast.Tests.Configuration; -using Hazelcast.Tests.Support; -*/ using Microsoft.Extensions.Logging; namespace Hazelcast.Tests.Support; diff --git a/src/Hazelcast.Net/Configuration/ConfigurationDataSerializerHook.cs b/src/Hazelcast.Net/Configuration/ConfigurationDataSerializerHook.cs new file mode 100644 index 0000000000..2f56134bbc --- /dev/null +++ b/src/Hazelcast.Net/Configuration/ConfigurationDataSerializerHook.cs @@ -0,0 +1,175 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using Hazelcast.Models; +using Hazelcast.NearCaching; +using Hazelcast.Serialization; + +namespace Hazelcast.Configuration; + +internal class ConfigurationDataSerializerHook : IDataSerializerHook +{ + public const int WanReplicationConfig = 0; + public const int WanCustomPublisherConfig = 1; + public const int WanBatchPublisherConfig = 2; + public const int WanConsumerConfig = 3; + public const int NearCacheConfig = 4; + public const int NearCachePreloaderConfig = 5; + public const int AddDynamicConfigOp = 6; + public const int DynamicConfigPreJoinOp = 7; + public const int MultimapConfig = 8; + public const int ListenerConfig = 9; + public const int EntryListenerConfig = 10; + public const int MapConfig = 11; + public const int RandomEvictionPolicy = 12; + public const int LfuEvictionPolicy = 13; + public const int LruEvictionPolicy = 14; + public const int MapStoreConfig = 15; + public const int MapPartitionLostListenerConfig = 16; + public const int IndexConfig = 17; + public const int MapAttributeConfig = 18; + public const int QueryCacheConfig = 19; + public const int PredicateConfig = 20; + public const int PartitionStrategyConfig = 21; + public const int HotRestartConfig = 22; + public const int TopicConfig = 23; + public const int ReliableTopicConfig = 24; + public const int ItemListenerConfig = 25; + public const int QueueStoreConfig = 26; + public const int QueueConfig = 27; + public const int ListConfig = 28; + public const int SetConfig = 29; + public const int ExecutorConfig = 30; + public const int DurableExecutorConfig = 31; + public const int ScheduledExecutorConfig = 32; + public const int ReplicatedMapConfig = 33; + public const int RingbufferConfig = 34; + public const int RingbufferStoreConfig = 35; + public const int CardinalityEstimatorConfig = 36; + public const int SimpleCacheConfig = 37; + public const int SimpleCacheConfigExpiryPolicyFactoryConfig = 38; + public const int SimpleCacheConfigTimedExpiryPolicyFactoryConfig = 39; + public const int SimpleCacheConfigDurationConfig = 40; + public const int SplitBrainProtectionConfig = 41; + public const int MapListenerToEntryListenerAdapter = 42; + public const int EventJournalConfig = 43; + public const int SplitBrainProtectionListenerConfig = 44; + public const int CachePartitionLostListenerConfig = 45; + public const int SimpleCacheEntryListenerConfig = 46; + public const int FlakeIdGeneratorConfig = 47; + public const int MergePolicyConfig = 48; + public const int PnCounterConfig = 49; + public const int MerkleTreeConfig = 50; + public const int WanSyncConfig = 51; + public const int KubernetesConfig = 52; + public const int EurekaConfig = 53; + public const int GcpConfig = 54; + public const int AzureConfig = 55; + public const int AwsConfig = 56; + public const int DiscoveryConfig = 57; + public const int DiscoveryStrategyConfig = 58; + public const int WanReplicationRef = 59; + public const int EvictionConfig = 60; + public const int PermissionConfig = 61; + public const int BitmapIndexOptions = 62; + public const int DataPersistenceConfig = 63; + public const int TieredStoreConfig = 64; + public const int MemoryTierConfig = 65; + public const int DiskTierConfig = 66; + public const int BtreeIndexConfig = 67; + public const int DataConnectionConfig = 68; + public const int PartitionAttributeConfig = 69; + + private const int Len = PartitionAttributeConfig + 1; + + // for reasons (?) Java can read this from system properties. we don't. + public const int FactoryIdConst = -31; + + public int FactoryId => FactoryIdConst; + + public IDataSerializableFactory CreateFactory() + { + var constructors = new Func[Len]; + + //constructors[WanReplicationConfig] = () => new WanReplicationConfig(); + //constructors[WanConsumerConfig] = () => new WanConsumerConfig(); + //constructors[WanCustomPublisherConfig] = () => new WanCustomPublisherConfig(); + //constructors[WanBatchPublisherConfig] = () => new WanBatchPublisherConfig(); + constructors[NearCacheConfig] = () => new NearCacheOptions(); + constructors[NearCachePreloaderConfig] = () => new NearCachePreloaderOptions(); + //constructors[AddDynamicConfigOp] = () => new AddDynamicConfigOperation(); + //constructors[DynamicConfigPreJoinOp] = () => new DynamicConfigPreJoinOperation(); + //constructors[MultimapConfig] = () => new MultiMapConfig(); + constructors[ListenerConfig] = () => new ListenerOptions(); + constructors[EntryListenerConfig] = () => new EntryListenerOptions(); + constructors[MapConfig] = () => new MapOptions(); + constructors[MapStoreConfig] = () => new MapStoreOptions(); + constructors[MapPartitionLostListenerConfig] = () => new MapPartitionLostListenerOptions(); + constructors[IndexConfig] = () => new IndexOptions(); + constructors[MapAttributeConfig] = () => new AttributeOptions(); + constructors[QueryCacheConfig] = () => new QueryCacheOptions(); + constructors[PredicateConfig] = () => new PredicateOptions(); + constructors[PartitionStrategyConfig] = () => new PartitioningStrategyOptions(); + constructors[HotRestartConfig] = () => new HotRestartOptions(); + //constructors[TopicConfig] = () => new TopicConfig(); + //constructors[ReliableTopicConfig] = () => new ReliableTopicConfig(); + //constructors[ItemListenerConfig] = () => new ItemListenerConfig(); + //constructors[QueueStoreConfig] = () => new QueueStoreConfig(); + //constructors[QueueConfig] = () => new QueueConfig(); + //constructors[ListConfig] = () => new ListConfig(); + //constructors[SetConfig] = () => new SetConfig(); + //constructors[ExecutorConfig] = () => new ExecutorConfig(); + //constructors[DurableExecutorConfig] = () => new DurableExecutorConfig(); + //constructors[ScheduledExecutorConfig] = () => new ScheduledExecutorConfig(); + //constructors[ReplicatedMapConfig] = () => new ReplicatedMapConfig(); + //constructors[RingbufferConfig] = () => new RingbufferConfig(); + //constructors[RingbufferStoreConfig] = () => new RingbufferStoreConfig(); + //constructors[CardinalityEstimatorConfig] = () => new CardinalityEstimatorConfig(); + //constructors[SimpleCacheConfig] = () => new CacheSimpleConfig(); + //constructors[SimpleCacheConfigExpiryPolicyFactoryConfig] = () => new CacheSimpleConfig.ExpiryPolicyFactoryConfig(); + //constructors[SimpleCacheConfigTimedExpiryPolicyFactoryConfig] = () => new CacheSimpleConfig.ExpiryPolicyFactoryConfig.TimedExpiryPolicyFactoryConfig(); + //constructors[SimpleCacheConfigDurationConfig] = () => new CacheSimpleConfig.ExpiryPolicyFactoryConfig.DurationConfig(); + //constructors[SplitBrainProtectionConfig] = () => new SplitBrainProtectionConfig(); + constructors[EventJournalConfig] = () => new EventJournalOptions(); + //constructors[SplitBrainProtectionListenerConfig] = () => new SplitBrainProtectionListenerConfig(); + //constructors[CachePartitionLostListenerConfig] = () => new CachePartitionLostListenerConfig(); + constructors[SimpleCacheEntryListenerConfig] = () => new CacheSimpleEntryListenerOptions(); + //constructors[FlakeIdGeneratorConfig] = () => new FlakeIdGeneratorConfig(); + constructors[MergePolicyConfig] = () => new MergePolicyOptions(); + //constructors[PnCounterConfig] = () => new PNCounterConfig(); + constructors[MerkleTreeConfig] = () => new MerkleTreeOptions(); + //constructors[WanSyncConfig] = () => new WanSyncConfig(); + //constructors[KubernetesConfig] = () => new KubernetesConfig(); + //constructors[EurekaConfig] = () => new EurekaConfig(); + //constructors[GcpConfig] = () => new GcpConfig(); + //constructors[AzureConfig] = () => new AzureConfig(); + //constructors[AwsConfig] = () => new AwsConfig(); + //constructors[DiscoveryConfig] = () => new DiscoveryConfig(); + //constructors[DiscoveryStrategyConfig] = () => new DiscoveryStrategyConfig(); + constructors[WanReplicationRef] = () => new WanReplicationRef(); + constructors[EvictionConfig] = () => new EvictionOptions(); + //constructors[PermissionConfig] = () => new PermissionConfig(); + constructors[BitmapIndexOptions] = () => new BitmapIndexOptions(); + constructors[DataPersistenceConfig] = () => new DataPersistenceOptions(); + constructors[TieredStoreConfig] = () => new TieredStoreOptions(); + constructors[MemoryTierConfig] = () => new MemoryTierOptions(); + constructors[DiskTierConfig] = () => new DiskTierOptions(); + constructors[BtreeIndexConfig] = () => new BTreeIndexOptions(); + //constructors[DataConnectionConfig] = () => new DataConnectionConfig(); + constructors[PartitionAttributeConfig] = () => new PartitioningAttributeOptions(); + + return new ArrayDataSerializableFactory(constructors); + } +} diff --git a/src/Hazelcast.Net/Configuration/DynamicOptions.cs b/src/Hazelcast.Net/Configuration/DynamicOptions.cs new file mode 100644 index 0000000000..f6c57c6530 --- /dev/null +++ b/src/Hazelcast.Net/Configuration/DynamicOptions.cs @@ -0,0 +1,138 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.Protocol.Codecs; +using Hazelcast.Protocol.Models; + +namespace Hazelcast.Configuration; + +/// +/// Represents a service that can dynamically configure cluster-side objects. +/// +public class DynamicOptions +{ + private readonly HazelcastClient _client; + + internal DynamicOptions(HazelcastClient client) + { + _client = client; + } + + /// + /// Dynamically configures a map. + /// + /// The map configuration. + public async Task ConfigureMapAsync(MapOptions mapOptions) + { + var requestMessage = DynamicConfigAddMapConfigCodec.EncodeRequest( + mapOptions.Name, + mapOptions.BackupCount, mapOptions.AsyncBackupCount, + mapOptions.TimeToLiveSeconds, mapOptions.MaxIdleSeconds, + EvictionConfigHolder.Of(mapOptions.Eviction), + mapOptions.ReadBackupData, + mapOptions.CacheDeserializedValues.ToJavaString(), + mapOptions.MergePolicy.Policy, mapOptions.MergePolicy.BatchSize, + mapOptions.InMemoryFormat.ToJavaString(), + MapListenerConfigs(mapOptions.EntryListeners), + MapListenerConfigs(mapOptions.PartitionLostListeners), + mapOptions.StatisticsEnabled, + mapOptions.SplitBrainProtectionName, + MapStoreConfigHolder.Of(mapOptions.MapStore), + NearCacheConfigHolder.Of(mapOptions.NearCache), + mapOptions.WanReplicationRef, + mapOptions.Indexes, + mapOptions.Attributes, + MapQueryCacheConfigs(mapOptions.QueryCaches), + mapOptions.PartitioningStrategy?.PartitioningStrategyClass, + null, + mapOptions.HotRestart, mapOptions.EventJournal, mapOptions.MerkleTree, + (int)mapOptions.MetadataPolicy, mapOptions.PerEntryStatsEnabled, + mapOptions.DataPersistence, mapOptions.TieredStore, mapOptions.PartitioningAttributes, + null /*namespace*/); + + var responseMessage = await _client.Cluster.Messaging.SendAsync(requestMessage); + var response = DynamicConfigAddMapConfigCodec.DecodeResponse(responseMessage); + } + + /// + /// Dynamically configures a map. + /// + /// The name of the map. + /// A function that configures the map. + public Task ConfigureMapAsync(string name, Action configure) + { + var mapConfig = new MapOptions(name); + configure(mapConfig); + return ConfigureMapAsync(mapConfig); + } + + /// + /// Dynamically configures a map. + /// + /// The ring buffer configuration. + public async Task ConfigureRingbufferAsync(RingbufferOptions ringbufferOptions) + { + RingbufferStoreConfigHolder ringbufferStoreConfig = null; + if (ringbufferOptions.RingbufferStore is {Enabled: true}) + { + ringbufferStoreConfig = RingbufferStoreConfigHolder.Of(ringbufferOptions.RingbufferStore); + } + var requestMessage = DynamicConfigAddRingbufferConfigCodec.EncodeRequest( + ringbufferOptions.Name, ringbufferOptions.Capacity, ringbufferOptions.BackupCount, + ringbufferOptions.AsyncBackupCount, ringbufferOptions.TimeToLiveSeconds, + ringbufferOptions.InMemoryFormat.ToJavaString(), ringbufferStoreConfig, + ringbufferOptions.SplitBrainProtectionName, ringbufferOptions.MergePolicy.Policy, + ringbufferOptions.MergePolicy.BatchSize, + null /*namespace*/); + + var responseMessage = await _client.Cluster.Messaging.SendAsync(requestMessage); + var response = DynamicConfigAddMapConfigCodec.DecodeResponse(responseMessage); + } + + /// + /// Dynamically configures a ring buffer. + /// + /// The name of the ring buffer. + /// A function that configures the ring buffer. + public Task ConfigureRingbufferAsync(string name, Action configure) + { + var ringBufferOptions = new RingbufferOptions(name); + configure(ringBufferOptions); + return ConfigureRingbufferAsync(ringBufferOptions); + } + + private List MapQueryCacheConfigs(List queryCacheConfigs) + { + if (queryCacheConfigs == null || queryCacheConfigs.Count == 0) return null; + var mapped = new List(queryCacheConfigs.Count); + foreach (var queryCacheConfig in queryCacheConfigs) + mapped.Add(QueryCacheConfigHolder.Of(queryCacheConfig, _client.SerializationService)); + return mapped; + } + + private List MapListenerConfigs(List listenerConfigs) + where T : ListenerOptions + { + if (listenerConfigs == null || listenerConfigs.Count == 0) return null; + var mapped = new List(listenerConfigs.Count); + foreach (var listenerConfig in listenerConfigs) + mapped.Add(ListenerConfigHolder.Of(listenerConfig)); + return mapped; + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Core/EnumExtensions.cs b/src/Hazelcast.Net/Core/EnumExtensions.cs index e1c2a12ce8..20ee9fb09d 100644 --- a/src/Hazelcast.Net/Core/EnumExtensions.cs +++ b/src/Hazelcast.Net/Core/EnumExtensions.cs @@ -22,6 +22,18 @@ namespace Hazelcast.Core /// internal static class EnumExtensions { + /// + /// Ensures that the specified value is a defined value for its enum type. + /// + /// The enum type. + /// The value. + /// The value, if it is a defined value for the type. + /// The value is not a defined value for the type. + public static TEnum ThrowIfUndefined(this TEnum value) where TEnum : Enum + => Enum.IsDefined(typeof(TEnum), value) + ? value + : throw new ArgumentException($"Not a valid {typeof(TEnum).Name} value.", nameof(value)); + /// /// Determines whether one or more bit fields are set in the current instance. /// diff --git a/src/Hazelcast.Net/Core/EnumerableExtensions.cs b/src/Hazelcast.Net/Core/EnumerableExtensions.cs index 1a0c93ee46..aa136df9cb 100644 --- a/src/Hazelcast.Net/Core/EnumerableExtensions.cs +++ b/src/Hazelcast.Net/Core/EnumerableExtensions.cs @@ -211,6 +211,21 @@ public static int LastIndexOf(this IList list, Func predicate) return f; } + /// + /// Maps a list. + /// + /// The source type. + /// The destination type. + /// The source list. + /// The mapping function. + /// The mapped list. + public static List Map(this IList list, Func map) + { + var result = new List(list.Count); + result.AddRange(list.Select(map)); + return result; + } + /// /// Filters a sequence of based on a predicate. /// diff --git a/src/Hazelcast.Net/Core/Enums.cs b/src/Hazelcast.Net/Core/Enums.cs new file mode 100644 index 0000000000..3489ef94f9 --- /dev/null +++ b/src/Hazelcast.Net/Core/Enums.cs @@ -0,0 +1,115 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Hazelcast.Exceptions; + +namespace Hazelcast.Core; + +/// +/// Parses enumerations. +/// +internal static class Enums +{ + // static cache for values + private static readonly ConcurrentDictionary, Dictionary)> Cache = new(); + + /// + /// Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. + /// + /// An enumeration type. + /// A string containing the name or value to convert. + /// An object of type whose value is represented by . + public static T Parse(string value) => (T) Enum.Parse(typeof(T), value); + + private static (Dictionary, Dictionary) GetCaches(Type enumType) + { + return Cache.GetOrAdd(enumType, type => + { + var dotnetToJava = new Dictionary(); + var javaToDotnet = new Dictionary(); + foreach (var fieldInfo in enumType.GetFields().Where(x => x.FieldType.IsEnum)) + { + var dotnetName = fieldInfo.Name; + var javaNameAttribute = fieldInfo.GetCustomAttribute(); + var javaName = javaNameAttribute == null ? dotnetName : javaNameAttribute.Name; + dotnetToJava.Add(dotnetName, javaName); + javaToDotnet.Add(javaName, dotnetName); + } + return (dotnetToJava, javaToDotnet); + }); + } + + /// + /// Converts the string representation of the Java name of one or more enumerated constants to an equivalent enumerated object. + /// + /// An enumeration type. + /// A string containing the Java name to convert. + /// An object of type whose value is represented by . + public static T ParseJava(string javaValue) + { + if (string.IsNullOrWhiteSpace(javaValue)) throw new ArgumentException(ExceptionMessages.NullOrEmpty, nameof(javaValue)); + + var (_, javaToDotnet) = GetCaches(typeof(T)); + return javaToDotnet.TryGetValue(javaValue, out var dotnetValue) + ? (T) Enum.Parse(typeof(T), dotnetValue) + : throw new ArgumentException("Value is not one of the named constants defined for the enumeration.", nameof(javaValue)); + } + + /// + /// Converts an enum value to its equivalent Java string representation. + /// + /// An enumeration type. + /// The enum value. + /// The Java string representation of the enum value. + public static string ToJavaString(this T value) where T : Enum + { + var (dotnetToJava, _) = GetCaches(typeof(T)); + var dotnetValue = value.ToString(); + return dotnetToJava.TryGetValue(dotnetValue, out var javaValue) + ? javaValue + : dotnetValue; + } + + /// + /// Specifies the name that Java uses for this value. + /// + /// + /// The Java name is used when the enum value is serialized as a string. + /// + [AttributeUsage(AttributeTargets.Field)] + internal class JavaNameAttribute : Attribute + { + /// + /// Specifies the name that Java uses for this value. + /// + /// The name that Java uses for this value. + /// + /// The Java name is used when the enum value is serialized as a string. + /// + public JavaNameAttribute(string name) + { + Name = !string.IsNullOrWhiteSpace(name) ? name : throw new ArgumentException(ExceptionMessages.NullOrEmpty, nameof(name)); + } + + /// + /// Gets the name that Java uses for the value. + /// + public string Name { get; } + } +} diff --git a/src/Hazelcast.Net/Core/InMemoryFormat.cs b/src/Hazelcast.Net/Core/InMemoryFormat.cs index 5ac8ef7692..a228a24666 100644 --- a/src/Hazelcast.Net/Core/InMemoryFormat.cs +++ b/src/Hazelcast.Net/Core/InMemoryFormat.cs @@ -26,12 +26,17 @@ public enum InMemoryFormat /// /// Binary (serialized ) format. /// - Binary, + [Enums.JavaName("BINARY")] Binary, /// /// Object (de-serialized) format. /// - Object + [Enums.JavaName("OBJECT")] Object, + + /// + /// Native storage. + /// + [Enums.JavaName("NATIVE")] Native, #pragma warning restore CA1720 } diff --git a/src/Hazelcast.Net/Core/PublisherAddressDataSerializerHook.cs b/src/Hazelcast.Net/Core/PublisherAddressDataSerializerHook.cs index 734825f2d1..10e4e42391 100644 --- a/src/Hazelcast.Net/Core/PublisherAddressDataSerializerHook.cs +++ b/src/Hazelcast.Net/Core/PublisherAddressDataSerializerHook.cs @@ -19,7 +19,7 @@ namespace Hazelcast.Core; -public class PublisherAddressDataSerializerHook : IDataSerializerHook +internal class PublisherAddressDataSerializerHook : IDataSerializerHook { public IDataSerializableFactory CreateFactory() { diff --git a/src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSeriazlierHook.cs b/src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSerializerHook.cs similarity index 94% rename from src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSeriazlierHook.cs rename to src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSerializerHook.cs index 694eec6c28..c635b449da 100644 --- a/src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSeriazlierHook.cs +++ b/src/Hazelcast.Net/DistributedObjects/ReliableTopicDataSerializerHook.cs @@ -19,7 +19,7 @@ namespace Hazelcast.Core; -public class ReliableTopicDataSeriazlierHook : IDataSerializerHook +internal class ReliableTopicDataSerializerHook : IDataSerializerHook { public IDataSerializableFactory CreateFactory() { diff --git a/src/Hazelcast.Net/Hazelcast.Net.csproj b/src/Hazelcast.Net/Hazelcast.Net.csproj index d262ea5f8a..9e5e51a7d1 100644 --- a/src/Hazelcast.Net/Hazelcast.Net.csproj +++ b/src/Hazelcast.Net/Hazelcast.Net.csproj @@ -61,7 +61,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Hazelcast.Net/HazelcastClient.cs b/src/Hazelcast.Net/HazelcastClient.cs index bea5dd68a4..1cdd26207b 100644 --- a/src/Hazelcast.Net/HazelcastClient.cs +++ b/src/Hazelcast.Net/HazelcastClient.cs @@ -18,6 +18,7 @@ using System.Threading; using System.Threading.Tasks; using Hazelcast.Clustering; +using Hazelcast.Configuration; using Hazelcast.Core; using Hazelcast.CP; using Hazelcast.DistributedObjects; @@ -201,6 +202,9 @@ private void WireComponents() /// public ClientState State => Cluster.State.ClientState; + /// + public DynamicOptions DynamicOptions => new(this); + /// /// Gets the . /// diff --git a/src/Hazelcast.Net/HazelcastClientFactory.cs b/src/Hazelcast.Net/HazelcastClientFactory.cs index d7e3d822f8..9227a85419 100644 --- a/src/Hazelcast.Net/HazelcastClientFactory.cs +++ b/src/Hazelcast.Net/HazelcastClientFactory.cs @@ -302,14 +302,13 @@ internal static SerializationService CreateSerializationService(SerializationOpt .SetPartitioningStrategy(new PartitionAwarePartitioningStragegy()) // TODO: should be configure-able .SetCompactSchemas(schemas) // transfer ownership, schemas will be disposed by serialization service - // add hooks that construct and provide IIdentifiedDataSerialization factories for more - // built-in types such as predicates, aggregators or projections. + // add hooks that construct and provide IIdentifiedDataSerialization factories for more built-in types .AddHook() .AddHook() .AddHook() - - .AddHook() + .AddHook() .AddHook() + .AddHook() // add a hook that constructs and provides the compact IIdentifiedDataSerialization factory // because some basic compact functionality such as schema distribution don't use compact diff --git a/src/Hazelcast.Net/HazelcastOptions.Misc.cs b/src/Hazelcast.Net/HazelcastOptions.Misc.cs index 31eca7272d..3ded11f5d9 100644 --- a/src/Hazelcast.Net/HazelcastOptions.Misc.cs +++ b/src/Hazelcast.Net/HazelcastOptions.Misc.cs @@ -69,7 +69,7 @@ public partial class HazelcastOptions // Misc public IPatternMatcher PatternMatcher { get; set; } = new MatchingPointPatternMatcher(); /// - /// Gets the dictionary which contains the for each near cache. + /// Gets the dictionary which contains the for each near cache. /// public IDictionary NearCaches { get; } = new Dictionary(); diff --git a/src/Hazelcast.Net/IHazelcastClient.cs b/src/Hazelcast.Net/IHazelcastClient.cs index 8944861234..76917ff45e 100644 --- a/src/Hazelcast.Net/IHazelcastClient.cs +++ b/src/Hazelcast.Net/IHazelcastClient.cs @@ -16,6 +16,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; +using Hazelcast.Configuration; using Hazelcast.CP; using Hazelcast.DistributedObjects; using Hazelcast.Models; @@ -283,5 +284,11 @@ public interface IHazelcastClient : IAsyncDisposable /// exist already in the cluster, a new object is created. /// Task GetFlakeIdGeneratorAsync(string name); + + /// + /// Gets a service that can dynamically configure cluster-side objects. + /// + /// A service that can dynamically configure cluster-side objects. + DynamicOptions DynamicOptions { get; } } } diff --git a/src/Hazelcast.Net/Messaging/DumpMessagingExtensions.cs b/src/Hazelcast.Net/Messaging/DumpMessagingExtensions.cs index b457830d29..fc11f47225 100644 --- a/src/Hazelcast.Net/Messaging/DumpMessagingExtensions.cs +++ b/src/Hazelcast.Net/Messaging/DumpMessagingExtensions.cs @@ -26,6 +26,18 @@ namespace Hazelcast.Messaging /// internal static class DumpMessagingExtensions { + /// + /// Gets the zero-based index of the last frame of the message. + /// + public static int LastFrameIndex(this ClientMessage message) + { + var index = 0; +#if DEBUG + for (var frame = message.FirstFrame; frame != null; frame = frame.Next, index++) ; +#endif + return index; + } + /// /// Dumps a client message into a readable string. /// diff --git a/src/Hazelcast.Net/Models/AttributeOptions.cs b/src/Hazelcast.Net/Models/AttributeOptions.cs new file mode 100644 index 0000000000..5d5615e907 --- /dev/null +++ b/src/Hazelcast.Net/Models/AttributeOptions.cs @@ -0,0 +1,110 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using System; +using System.Text.RegularExpressions; +using Hazelcast.Core; +using Hazelcast.Exceptions; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +public class AttributeOptions : IIdentifiedDataSerializable +{ + private static readonly Regex NamePattern = new Regex("^[a-zA-Z0-9][a-zA-Z0-9_]*$", RegexOptions.Compiled); + + private string _name; + private string _extractorClassName; + + /// + /// Initializes a new instance of the class. + /// + public AttributeOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public AttributeOptions(string name, string extractorClassName) + { + Name = name; + ExtractorClassName = extractorClassName; + } + + /// + /// Initializes a new instance of the class. + /// + public AttributeOptions(AttributeOptions config) + { + _name = config._name; + _extractorClassName = config._extractorClassName; + } + + /// + /// Gets or sets the name of the attribute extracted by the extractor. + /// + public string Name + { + get => _name; + set + { + if (string.IsNullOrEmpty(value)) throw new ArgumentException(ExceptionMessages.NullOrEmpty, nameof(value)); + if (!NamePattern.IsMatch(value)) throw new ArgumentException( + "Map attribute name is invalid. It may contain upper-case and lower-case" + + " letters, digits and underscores but an underscore may not be located at the first position).", nameof(value)); + if (QueryConstants.IsConstant(value)) + throw new ArgumentException($"Map attribute name must not contain query constant '{value}'."); + _name = value; + } + } + + /// + /// Gets or sets the extractor class name. + /// + public string ExtractorClassName + { + get => _extractorClassName; + set => _extractorClassName = value.ThrowIfNullNorWhiteSpace(); + } + + /// + public override string ToString() + { + return "AttributeConfig{" + + "name='" + _name + '\'' + + "extractorClassName='" + _extractorClassName + '\'' + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.MapAttributeConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_name); + output.WriteString(_extractorClassName); + } + + /// + public void ReadData(IObjectDataInput input) + { + _name = input.ReadString(); + _extractorClassName = input.ReadString(); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/BTreeIndexOptions.cs b/src/Hazelcast.Net/Models/BTreeIndexOptions.cs index c0305bfb76..facec1847c 100644 --- a/src/Hazelcast.Net/Models/BTreeIndexOptions.cs +++ b/src/Hazelcast.Net/Models/BTreeIndexOptions.cs @@ -14,17 +14,36 @@ #nullable enable +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + namespace Hazelcast.Models; // Configures indexing options for indexes. -internal class BTreeIndexOptions +public class BTreeIndexOptions : IIdentifiedDataSerializable { private Capacity? _pageSize; /// /// Gets the default page size. /// - public Capacity DefaultPageSize { get; } = new(16, MemoryUnit.KiloBytes); + public static Capacity DefaultPageSize { get; } = new(16, MemoryUnit.KiloBytes); + + /// + /// Initializes a new instance of the class. + /// + public BTreeIndexOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public BTreeIndexOptions(BTreeIndexOptions indexOptions) + { + PageSize = indexOptions.PageSize; + MemoryTier = new MemoryTierOptions(indexOptions.MemoryTier); + } /// /// Gets or sets the page size. @@ -38,5 +57,26 @@ public Capacity PageSize /// /// Gets or sets the memory tier options. /// - public MemoryTierOptions MemoryTierOptions { get; set; } = new(); + public MemoryTierOptions MemoryTier { get; set; } = new(); + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteLong(PageSize.Value); + output.WriteString(PageSize.Unit.ToJavaString()); + output.WriteObject(MemoryTier); + } + + /// + public void ReadData(IObjectDataInput input) + { + PageSize = Capacity.Of(input.ReadLong(), Enums.ParseJava(input.ReadString())); + MemoryTier = input.ReadObject(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.BtreeIndexConfig; } \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/BitmapIndexOptions.cs b/src/Hazelcast.Net/Models/BitmapIndexOptions.cs index 26632980ff..11e494e14d 100644 --- a/src/Hazelcast.Net/Models/BitmapIndexOptions.cs +++ b/src/Hazelcast.Net/Models/BitmapIndexOptions.cs @@ -12,21 +12,82 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + namespace Hazelcast.Models; /// /// Configures indexing options for indexes. /// -public class BitmapIndexOptions +public class BitmapIndexOptions : IIdentifiedDataSerializable { + private string _uniqueKey = Query.Predicates.KeyName; + private UniqueKeyTransformation _transformation = UniqueKeyTransformation.Object; + + /// + /// Initializes a new instance of the class. + /// + public BitmapIndexOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public BitmapIndexOptions(BitmapIndexOptions bitmapIndexOptions) + { + UniqueKey = bitmapIndexOptions.UniqueKey; + UniqueKeyTransformation = bitmapIndexOptions.UniqueKeyTransformation; + } + /// /// Gets or sets the unique key. /// - public string UniqueKey { get; set; } = Query.Predicates.KeyName; + public string UniqueKey + { + get => _uniqueKey; + set => _uniqueKey = value.ThrowIfNull(); + } + + /// + /// Sets the unique key. + /// + /// The unique key. + /// This instance. + public BitmapIndexOptions SetUniqueKey(string uniqueKey) + { + UniqueKey = uniqueKey; + return this; + } /// /// Gets or sets the which will be /// applied to the value. /// - public UniqueKeyTransformation UniqueKeyTransformation { get; set; } = UniqueKeyTransformation.Object; + public UniqueKeyTransformation UniqueKeyTransformation + { + get => _transformation; + set => _transformation = value.ThrowIfUndefined(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.BitmapIndexOptions; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_uniqueKey); + output.WriteInt((int) _transformation); + } + + /// + public void ReadData(IObjectDataInput input) + { + _uniqueKey = input.ReadString(); + _transformation = ((UniqueKeyTransformation) input.ReadInt()).ThrowIfUndefined(); + } } \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/CacheDeserializedValues.cs b/src/Hazelcast.Net/Models/CacheDeserializedValues.cs new file mode 100644 index 0000000000..f769f44bd4 --- /dev/null +++ b/src/Hazelcast.Net/Models/CacheDeserializedValues.cs @@ -0,0 +1,38 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Defines the caching control of de-serialized values. +/// +public enum CacheDeserializedValues +{ + /// + /// Never cache de-serialized values. + /// + [Enums.JavaName("NEVER")] Never, + + /// + /// Cache values only when using search indexes. + /// + [Enums.JavaName("INDEX_ONLY")] IndexOnly, + + /// + /// Always cache de-serialized values. + /// + [Enums.JavaName("ALWAYS")] Always, +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/CacheSimpleEntryListenerOptions.cs b/src/Hazelcast.Net/Models/CacheSimpleEntryListenerOptions.cs new file mode 100644 index 0000000000..05a0915069 --- /dev/null +++ b/src/Hazelcast.Net/Models/CacheSimpleEntryListenerOptions.cs @@ -0,0 +1,111 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Serialization; +using System; + +namespace Hazelcast.Models; + +internal class CacheSimpleEntryListenerOptions : IIdentifiedDataSerializable +{ + + private string _cacheEntryListenerFactory; + private string _cacheEntryEventFilterFactory; + private bool _oldValueRequired; + private bool _synchronous; + + public CacheSimpleEntryListenerOptions() + { } + + public CacheSimpleEntryListenerOptions(CacheSimpleEntryListenerOptions listenerConfig) + { + _cacheEntryEventFilterFactory = listenerConfig._cacheEntryEventFilterFactory; + _cacheEntryListenerFactory = listenerConfig._cacheEntryListenerFactory; + _oldValueRequired = listenerConfig._oldValueRequired; + _synchronous = listenerConfig._synchronous; + } + + /// + /// Gets or sets the name of the cache entry listener factory. + /// + /// + public string CacheEntryListenerFactory + { + get => _cacheEntryListenerFactory; + set => _cacheEntryListenerFactory = value; + } + + /// + /// Gets or sets the name of the cache entry filter factory. + /// + public string CacheEntryEventFilterFactory + { + get => _cacheEntryEventFilterFactory; + set => _cacheEntryEventFilterFactory = value; + } + + /// + /// Whether the old value is required. + /// + public bool OldValueRequired + { + get => _oldValueRequired; + set => _oldValueRequired = value; + } + + /// + /// Whether this cache entry listener implementation will be called in a synchronous manner. + /// + public bool Synchronous + { + get => _synchronous; + set => _synchronous = value; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.SimpleCacheEntryListenerConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_cacheEntryEventFilterFactory); + output.WriteString(_cacheEntryListenerFactory); + output.WriteBoolean(_oldValueRequired); + output.WriteBoolean(_synchronous); + } + + /// + public void ReadData(IObjectDataInput input) + { + _cacheEntryEventFilterFactory = input.ReadString(); + _cacheEntryListenerFactory = input.ReadString(); + _oldValueRequired = input.ReadBoolean(); + _synchronous = input.ReadBoolean(); + } + + /// + public override string ToString() + { + return "CacheSimpleEntryListenerConfig{" + + "cacheEntryListenerFactory='" + _cacheEntryListenerFactory + '\'' + + ", cacheEntryEventFilterFactory='" + _cacheEntryEventFilterFactory + '\'' + + ", oldValueRequired=" + _oldValueRequired + + ", synchronous=" + _synchronous + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/Capacity.cs b/src/Hazelcast.Net/Models/Capacity.cs index 55329fd6ee..b79f9bc1ae 100644 --- a/src/Hazelcast.Net/Models/Capacity.cs +++ b/src/Hazelcast.Net/Models/Capacity.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Core; using System; namespace Hazelcast.Models; @@ -19,7 +20,7 @@ namespace Hazelcast.Models; /// /// Represents a memory capacity. /// -internal class Capacity +public class Capacity { /// /// Initializes a new instance of the class. @@ -38,15 +39,8 @@ public Capacity(long value, MemoryUnit unit) { if (value < 0) throw new ArgumentException("Value must be greater than or equal to zero.", nameof(value)); - Value = value; - Unit = unit switch - { - MemoryUnit.Bytes or - MemoryUnit.KiloBytes or - MemoryUnit.MegaBytes or - MemoryUnit.GigaBytes => unit, - _ => throw new ArgumentException("Value must be a valid MemoryUnit.", nameof(unit)) - }; + Value = value.ThrowIfLessThanOrZero(); + Unit = unit.ThrowIfUndefined(); } /// @@ -59,7 +53,106 @@ MemoryUnit.MegaBytes or /// public MemoryUnit Unit { get; } - // NOTE: - // not implementing all the conversion logic for now - // (see Capacity.java and MemoryUnit.java) + /// + /// Gets the value of the capacity in bytes. + /// + public long Bytes => MemoryUnitExtensions.Convert(MemoryUnit.Bytes, Unit, Value); + + /// + /// Gets the value of the capacity in kilo-bytes. + /// + public long KiloBytes => MemoryUnitExtensions.Convert(MemoryUnit.KiloBytes, Unit, Value); + + /// + /// Gets the value of the capacity in mega-bytes. + /// + public long MegaBytes => MemoryUnitExtensions.Convert(MemoryUnit.MegaBytes, Unit, Value); + + /// + /// Gets the value of the capacity in giga-bytes. + /// + public long GigaBytes => MemoryUnitExtensions.Convert(MemoryUnit.GigaBytes, Unit, Value); + + /// + /// Creates a new instance of the class. + /// + /// The value. + /// The unit. + /// The new instance. + public static Capacity Of(long value, MemoryUnit unit) => new Capacity(value, unit); + + /// + /// Parses the string representation of a capacity. + /// + /// The string representation of a capacity. + /// The capacity. + public static Capacity Parse(string value) => Parse(value, MemoryUnit.Bytes); + + /// + /// Parses the string representation of a capacity. + /// + /// The string representation of a capacity. + /// The unit to use if none is specified in the string. + /// The capacity. + public static Capacity Parse(string value, MemoryUnit defaultUnit) + { + if (string.IsNullOrWhiteSpace(value)) return new Capacity(0, MemoryUnit.Bytes); + + var unitChar = value[^1]; + var hasUnit = !char.IsDigit(unitChar); + + var unit = defaultUnit; + if (hasUnit) + unit = unitChar switch + { + 'b' or 'B' => MemoryUnit.Bytes, + 'k' or 'K' => MemoryUnit.KiloBytes, + 'm' or 'M' => MemoryUnit.MegaBytes, + 'g' or 'G' => MemoryUnit.GigaBytes, + _ => throw new ArgumentException($"Invalid unit specifier '{unitChar}'.", nameof(value)) + }; + + return new Capacity(long.Parse(hasUnit ? value[..^1] : value), unit); + } + + /// + /// Formats this capacity. + /// + /// The formatted capacity. + public string ToPrettyString() => ToPrettyString(Value, Unit); + + /// + public override string ToString() => $"{Value} {Unit}"; + + /// + /// Formats the capacity. + /// + /// The capacity. + /// The formatted capacity. + public static string ToPrettyString(long capacity) + { + return ToPrettyString(capacity, MemoryUnit.Bytes); + } + + /// + /// Formats the capacity. + /// + /// The capacity. + /// The capacity unit. + /// The formatted capacity. + public static string ToPrettyString(long capacity, MemoryUnit unit) + { + // following Java's pattern + + var bytes = MemoryUnitExtensions.Convert(MemoryUnit.Bytes, unit, capacity); + return bytes switch + { + >= 10_000_000_000 => To(MemoryUnit.GigaBytes), + >= 10_000_000 => To(MemoryUnit.MegaBytes), + >= 10_000 => To(MemoryUnit.KiloBytes), + _ => To(MemoryUnit.Bytes) + }; + + string To(MemoryUnit toUnit) => $"{MemoryUnitExtensions.Convert(toUnit, unit, capacity)} {toUnit.Abbrev()}"; + } } diff --git a/src/Hazelcast.Net/Models/Constants.cs b/src/Hazelcast.Net/Models/Constants.cs new file mode 100644 index 0000000000..80302bc9ca --- /dev/null +++ b/src/Hazelcast.Net/Models/Constants.cs @@ -0,0 +1,24 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +namespace Hazelcast.Models; + +/// +/// Defines constants that match their Java counterparts. +/// +internal static class Constants +{ + public const int PartitionMaxBackupCount = 6; // from IPartition.MAX_BACKUP_COUNT; + public const string LocalDeviceDefaultDeviceName = "default-tiered-store-device"; // from LocalDeviceConfig.DEFAULT_DEVICE_NAME; +} diff --git a/src/Hazelcast.Net/Models/DataPersistenceOptions.cs b/src/Hazelcast.Net/Models/DataPersistenceOptions.cs new file mode 100644 index 0000000000..7c4617ae48 --- /dev/null +++ b/src/Hazelcast.Net/Models/DataPersistenceOptions.cs @@ -0,0 +1,96 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents options for a map data persistence. +/// +public class DataPersistenceOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default IsEnabled value. + /// + public const bool Enabled = false; + + /// + /// Gets the default IsFsync value. + /// + public const bool Fsync = false; + } +#pragma warning restore CA1034 + + /// + /// Initializes a new instance of the class. + /// + public DataPersistenceOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public DataPersistenceOptions(DataPersistenceOptions dataPersistenceConfig) + { + Enabled = dataPersistenceConfig.Enabled; + Fsync = dataPersistenceConfig.Fsync; + } + + /// + /// Whether data persistence is enabled. + /// + public bool Enabled { get; set; } = Defaults.Enabled; + + /// + /// Whether disk writes should be followed by an fsync system call. + /// + public bool Fsync { get; set; } = Defaults.Fsync; + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.DataPersistenceConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(Enabled); + output.WriteBoolean(Fsync); + } + + /// + public void ReadData(IObjectDataInput input) + { + Enabled = input.ReadBoolean(); + Fsync = input.ReadBoolean(); + } + + /// + public override string ToString() + { + return "DataPersistenceConfig{" + + "enabled=" + Enabled + + ", fsync=" + Fsync + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/DiskTierOptions.cs b/src/Hazelcast.Net/Models/DiskTierOptions.cs new file mode 100644 index 0000000000..5af2a221c8 --- /dev/null +++ b/src/Hazelcast.Net/Models/DiskTierOptions.cs @@ -0,0 +1,104 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using System; +using Hazelcast.Core; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +/// +/// Represents the disk-tier configuration of the tiered-store. +/// +public class DiskTierOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default value for whether disk tiered-store is enabled. + /// + public const bool Enabled = false; + + /// + /// Gets the default device name. + /// + public const string DeviceName = Constants.LocalDeviceDefaultDeviceName; + } +#pragma warning restore CA1034 + + private string _deviceName = Defaults.DeviceName; + + /// + /// Initializes a new instance of the class. + /// + public DiskTierOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public DiskTierOptions(DiskTierOptions diskTierConfig) + { + Enabled = diskTierConfig.Enabled; + _deviceName = diskTierConfig._deviceName; + } + + /// + /// Whether disk-tier is enabled. + /// + public bool Enabled { get; set; } = Defaults.Enabled; + + /// + /// Gets or sets the device name of this disk tier. + /// + public string DeviceName + { + get => _deviceName; + set => _deviceName = value.ThrowIfNull(); + } + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(Enabled); + output.WriteString(_deviceName); + } + + /// + public void ReadData(IObjectDataInput input) + { + Enabled = input.ReadBoolean(); + _deviceName = input.ReadString(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.DiskTierConfig; + + /// + public override string ToString() + { + return "DiskTierConfig{" + + "enabled=" + Enabled + + ", deviceName='" + _deviceName + '\'' + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/DurationOptions.cs b/src/Hazelcast.Net/Models/DurationOptions.cs new file mode 100644 index 0000000000..9d88f5b143 --- /dev/null +++ b/src/Hazelcast.Net/Models/DurationOptions.cs @@ -0,0 +1,70 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the options for a duration. +/// +public class DurationOptions : IIdentifiedDataSerializable +{ + private long _durationAmount; + private TimeUnit _timeUnit; + + public DurationOptions() + { } + + public DurationOptions(long durationAmount, TimeUnit timeUnit) + { + _durationAmount = durationAmount; + _timeUnit = timeUnit; + } + + public long DurationAmount => _durationAmount; + + public TimeUnit TimeUnit => _timeUnit; + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.SimpleCacheConfigDurationConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteLong(_durationAmount); + output.WriteString(_timeUnit.ToJavaString()); + } + + /// + public void ReadData(IObjectDataInput input) + { + _durationAmount = input.ReadLong(); + _timeUnit = Enums.ParseJava(input.ReadString()); + } + + /// + public override string ToString() + { + return "DurationConfig{" + + "durationAmount=" + _durationAmount + + ", timeUnit=" + _timeUnit + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/EntryListenerOptions.cs b/src/Hazelcast.Net/Models/EntryListenerOptions.cs new file mode 100644 index 0000000000..6e1b9b2462 --- /dev/null +++ b/src/Hazelcast.Net/Models/EntryListenerOptions.cs @@ -0,0 +1,91 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration for an entry listener. +/// +public class EntryListenerOptions : ListenerOptions +{ + + private bool _local; + private bool _includeValue = true; + + /// + /// Initializes a new instance of the class. + /// + public EntryListenerOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public EntryListenerOptions(string className, bool local, bool includeValue) + : base(className) + { + _local = local; + _includeValue = includeValue; + } + + /// + /// Initializes a new instance of the class. + /// + public EntryListenerOptions(EntryListenerOptions config) + : base(config) + { + _includeValue = config.IncludeValue; + _local = config.Local; + } + + public override bool Local + { + get => _local; + set => _local = value; + } + + public override bool IncludeValue + { + get => _includeValue; + set => _includeValue = value; + } + + /// + public override string ToString() + => $"EntryListenerConfig{{local={_local}, includeValue={_includeValue}}}"; + + /// + public override int ClassId => ConfigurationDataSerializerHook.EntryListenerConfig; + + /// + public override void WriteData(IObjectDataOutput output) + { + base.WriteData(output); + output.WriteBoolean(_local); + output.WriteBoolean(_includeValue); + } + + /// + public override void ReadData(IObjectDataInput input) + { + base.ReadData(input); + _local = input.ReadBoolean(); + _includeValue = input.ReadBoolean(); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/EventJournalOptions.cs b/src/Hazelcast.Net/Models/EventJournalOptions.cs new file mode 100644 index 0000000000..3134fe7d3f --- /dev/null +++ b/src/Hazelcast.Net/Models/EventJournalOptions.cs @@ -0,0 +1,127 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using Hazelcast.Core; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +/// +/// Represents options for a map event journal. +/// +public class EventJournalOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default IsEnabled value. + /// + public const bool Enabled = false; + + /// + /// Gets the default capacity of the event journal. + /// + public const int Capacity = 10 * 1000; + + /// + /// Gets the default time-to-live. + /// + public const int TtlSeconds = 0; + } +#pragma warning restore CA1034 + + private bool _enabled = Defaults.Enabled; + private int _capacity = Defaults.Capacity; + private int _timeToLiveSeconds = Defaults.TtlSeconds; + + /// + /// Initializes a new instance of the class. + /// + public EventJournalOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public EventJournalOptions(EventJournalOptions options) + { + _enabled = options._enabled; + _capacity = options._capacity; + _timeToLiveSeconds = options._timeToLiveSeconds; + } + + /// + /// Gets or sets the capacity of the event journal. + /// + public int Capacity + { + get => _capacity; + set => _capacity = value.ThrowIfLessThanOrZero(); + } + + /// + /// Gets or sets the time-to-live in seconds. + /// + public int TimeToLiveSeconds + { + get => _timeToLiveSeconds; + set => _timeToLiveSeconds = value.ThrowIfLessThanOrZero(); + } + + /// + /// Whether the event journal is enabled. + /// + public bool Enabled + { + get => _enabled; + set => _enabled = value; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.EventJournalConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(_enabled); + output.WriteInt(_capacity); + output.WriteInt(_timeToLiveSeconds); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadBoolean(); + _capacity = input.ReadInt(); + _timeToLiveSeconds = input.ReadInt(); + } + + /// + public override string ToString() + { + return "EventJournalConfig{" + + "enabled=" + _enabled + + ", capacity=" + _capacity + + ", timeToLiveSeconds=" + _timeToLiveSeconds + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/EvictionOptions.cs b/src/Hazelcast.Net/Models/EvictionOptions.cs new file mode 100644 index 0000000000..dc922bc0e5 --- /dev/null +++ b/src/Hazelcast.Net/Models/EvictionOptions.cs @@ -0,0 +1,151 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.NearCaching; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents options for a map eviction. +/// +public class EvictionOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default size. + /// + public const int Size = 10000; + + /// + /// Gets the default max-size policy. + /// + public const MaxSizePolicy MaxSizePolicy = Models.MaxSizePolicy.PerNode; + + /// + /// Gets the default eviction policy. + /// + public const EvictionPolicy EvictionPolicy = NearCaching.EvictionPolicy.None; + + /// + /// Gets the default comparator class name. + /// + public const string ComparatorClassName = null; + } +#pragma warning restore CA1034 + + private int _size = Defaults.Size; + private EvictionPolicy _evictionPolicy = Defaults.EvictionPolicy; + private string _comparatorClassName = Defaults.ComparatorClassName; + + /// + /// Initializes a new instance of the class. + /// + public EvictionOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public EvictionOptions(EvictionOptions config) + { + _size = config._size; + MaxSizePolicy = config.MaxSizePolicy; + _evictionPolicy = config._evictionPolicy; + _comparatorClassName = config._comparatorClassName; + } + + /// + /// Gets or sets the size which is used by the . + /// + public int Size + { + get => _size; + set => _size = value.ThrowIfLessThanOrZero(); + } + + /// + /// Gets or sets the of this eviction configuration. + /// + public MaxSizePolicy MaxSizePolicy { get; set; } = Defaults.MaxSizePolicy; + + /// + /// Gets or sets the of this eviction configuration. + /// + public EvictionPolicy EvictionPolicy + { + get => _evictionPolicy; + set => _evictionPolicy = value.ThrowIfUndefined(); + } + + /// + /// Gets the of this eviction configuration. + /// + public EvictionStrategyType EvictionStrategyType => EvictionStrategyType.SamplingBasedEviction; + + /// + /// Gets or sets the class name of the configured EvictionPolicyComparator implementation. + /// + public string ComparatorClassName + { + get => _comparatorClassName; + set => _comparatorClassName = value.ThrowIfNullNorWhiteSpace(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.EvictionConfig; + + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteInt(_size); + output.WriteString(MaxSizePolicy.ToJavaString()); + output.WriteString(_evictionPolicy.ToJavaString()); + output.WriteString(_comparatorClassName); + output.WriteObject(null/*_comparator*/); + } + + /// + public void ReadData(IObjectDataInput input) + { + _size = input.ReadInt(); + MaxSizePolicy = Enums.ParseJava(input.ReadString()); + _evictionPolicy = Enums.ParseJava(input.ReadString()); + _comparatorClassName = input.ReadString(); + _/*comparator*/ = input.ReadObject(); + } + + /// + public override string ToString() + { + return "EvictionConfig{" + + "size=" + _size + + ", maxSizePolicy=" + MaxSizePolicy + + ", evictionPolicy=" + _evictionPolicy + + ", comparatorClassName=" + _comparatorClassName + + ", comparator=" + ""/*_comparator*/ + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/EvictionStrategyType.cs b/src/Hazelcast.Net/Models/EvictionStrategyType.cs new file mode 100644 index 0000000000..6567d9b43c --- /dev/null +++ b/src/Hazelcast.Net/Models/EvictionStrategyType.cs @@ -0,0 +1,28 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Represents the eviction strategy types. +/// +public enum EvictionStrategyType +{ + /// + /// Sampling based eviction strategy type. + /// + [Enums.JavaName("SAMPLING_BASED_EVICTION")] SamplingBasedEviction +} diff --git a/src/Hazelcast.Net/Models/ExpiryPolicyType.cs b/src/Hazelcast.Net/Models/ExpiryPolicyType.cs new file mode 100644 index 0000000000..6cd8e953ba --- /dev/null +++ b/src/Hazelcast.Net/Models/ExpiryPolicyType.cs @@ -0,0 +1,63 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + + +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Defines the expiry policy type. +/// +public enum ExpiryPolicyType +{ + /// + /// Expiry policy type for the CreatedExpiryPolicy. + /// + [Enums.JavaName("CREATED")] Created = 0, + + /// + /// Expiry policy type for the ModifiedExpiryPolicy. + /// + [Enums.JavaName("MODIFIED")] Modified = 1, + + /// + /// Expiry policy type for the AccessedExpiryPolicy. + /// + [Enums.JavaName("ACCESSED")] Accessed = 2, + + /// + /// Expiry policy type for the TouchedExpiryPolicy. + /// + [Enums.JavaName("TOUCHED")] Touched = 3, + + /// + /// Expiry policy type for the EternalExpiryPolicy. + /// + [Enums.JavaName("ETERNAL")] Eternal = 4 +} diff --git a/src/Hazelcast.Net/Models/HotRestartOptions.cs b/src/Hazelcast.Net/Models/HotRestartOptions.cs new file mode 100644 index 0000000000..e9a94df4dd --- /dev/null +++ b/src/Hazelcast.Net/Models/HotRestartOptions.cs @@ -0,0 +1,120 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using Hazelcast.Configuration; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents a hot restart configuration. +/// +[Obsolete("Use DataPersistenceConfig.", false)] +public class HotRestartOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default enabled value. + /// + public const bool Enabled = false; + + /// + /// Gets the default fsync value. + /// + public const bool Fsync = false; + } +#pragma warning restore CA1034 + + /// + /// Initializes a new instance of the class. + /// + public HotRestartOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public HotRestartOptions(HotRestartOptions hotRestartConfig) + { + Enabled = hotRestartConfig.Enabled; + Fsync = hotRestartConfig.Fsync; + } + + /// + /// Whether hot restart is enabled. + /// + public bool Enabled { get; set; } = Defaults.Enabled; + + /// + /// Sets whether hot restart is enabled. + /// + /// Whether hot restart is enabled. + /// This instance. + public HotRestartOptions SetIsEnabled(bool enabled) + { + Enabled = enabled; + return this; + } + + /// + /// Whether disk writes should be followed by an fsync system call. + /// + public bool Fsync { get; set; } = Defaults.Fsync; + + /// + /// Sets whether disk writes should be followed by an fsync system call. + /// + /// Whether disk writes should be followed by an fsync system call. + /// This instance. + public HotRestartOptions SetIsFsync(bool fsync) + { + Fsync = fsync; + return this; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.HotRestartConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(Enabled); + output.WriteBoolean(Fsync); + } + + /// + public void ReadData(IObjectDataInput input) + { + Enabled = input.ReadBoolean(); + Fsync = input.ReadBoolean(); + } + + /// + public override string ToString() + { + return "HotRestartConfig{" + + "enabled=" + Enabled + + ", fsync=" + Fsync + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/INamedOptions.cs b/src/Hazelcast.Net/Models/INamedOptions.cs new file mode 100644 index 0000000000..6f4eb30735 --- /dev/null +++ b/src/Hazelcast.Net/Models/INamedOptions.cs @@ -0,0 +1,26 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +namespace Hazelcast.Models; + +/// +/// Defines named options. +/// +public interface INamedOptions +{ + /// + /// Gets or sets the name of the options. + /// + string Name { get; set; } +} diff --git a/src/Hazelcast.Net/Models/IndexOptions.cs b/src/Hazelcast.Net/Models/IndexOptions.cs index 09dbfa2a5b..a4f0124794 100644 --- a/src/Hazelcast.Net/Models/IndexOptions.cs +++ b/src/Hazelcast.Net/Models/IndexOptions.cs @@ -15,6 +15,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; namespace Hazelcast.Models { @@ -30,7 +33,7 @@ namespace Hazelcast.Models /// the hash function of the indexed field disperses the elements properly. /// Bitmap indexes (to be completed). /// - public class IndexOptions + public class IndexOptions : IIdentifiedDataSerializable { public static readonly IndexType DefaultType = IndexType.Sorted; @@ -48,6 +51,18 @@ public IndexOptions(IEnumerable attributes) Attributes = attributes.ToList(); } + /// + /// Initializes a new instance of the class. + /// + public IndexOptions(IndexOptions indexOptions) + { + Name = indexOptions.Name; + Type = indexOptions.Type; + Attributes = new List(indexOptions.Attributes); + BitmapIndex = new BitmapIndexOptions(indexOptions.BitmapIndex); + BTreeIndex = new BTreeIndexOptions(indexOptions.BTreeIndex); + } + /// /// Gets or sets the name of the index. /// @@ -61,17 +76,29 @@ public IndexOptions(IEnumerable attributes) /// /// Gets the indexed attributes. /// - public IList Attributes { get; } = new List(); + public IList Attributes { get; set; } = new List(); /// /// Gets or sets the bitmap index options. /// - public BitmapIndexOptions BitmapIndexOptions { get; set; } = new BitmapIndexOptions(); + public BitmapIndexOptions BitmapIndex { get; set; } = new(); + + // note: cannot remove the property below because it was public already + + /// + /// Gets or sets the bitmap index options. + /// + [Obsolete("Use BitmapIndex", false)] + public BitmapIndexOptions BitmapIndexOptions + { + get => BitmapIndex; + set => BitmapIndex = value; + } /// /// Gets or sets the btree index options. /// - internal BTreeIndexOptions BTreeIndexOptions { get; set; } = new(); + public BTreeIndexOptions BTreeIndex { get; set; } = new(); /// /// Adds an indexed attribute. @@ -120,6 +147,32 @@ internal static void ValidateAttribute(IndexOptions options, string attributeNam throw new ArgumentException($"Attribute name cannot end with dot: {attributeName}", nameof(attributeName)); } + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.IndexConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(Name); + output.WriteInt((int)Type); + output.WriteNullableList(Attributes); + output.WriteObject(BitmapIndex); + output.WriteObject(BTreeIndex); + } + + /// + public void ReadData(IObjectDataInput input) + { + Name = input.ReadString(); + Type = ((IndexType)input.ReadInt()).ThrowIfUndefined(); + Attributes = input.ReadNullableList(); + BitmapIndex = input.ReadObject(); + BTreeIndex = input.ReadObject(); + } + /// public override string ToString() { diff --git a/src/Hazelcast.Net/Models/IndexType.cs b/src/Hazelcast.Net/Models/IndexType.cs index 4386645dca..a2c8e6e8a7 100644 --- a/src/Hazelcast.Net/Models/IndexType.cs +++ b/src/Hazelcast.Net/Models/IndexType.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Core; + namespace Hazelcast.Models { /// @@ -24,16 +26,16 @@ public enum IndexType /// /// Sorted index. Can be used with equality and range predicates. /// - Sorted = 0, + [Enums.JavaName("SORTED")] Sorted = 0, /// /// Hash index. Can be used with equality predicates. /// - Hashed = 1, + [Enums.JavaName("HASHED")] Hashed = 1, /// /// Bitmap index. Can be used with equality predicates. /// - Bitmap = 2 + [Enums.JavaName("BITMAP")] Bitmap = 2 } } diff --git a/src/Hazelcast.Net/Models/ListenerOptions.cs b/src/Hazelcast.Net/Models/ListenerOptions.cs new file mode 100644 index 0000000000..4a9976afb6 --- /dev/null +++ b/src/Hazelcast.Net/Models/ListenerOptions.cs @@ -0,0 +1,135 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration for a listener. +/// +/// +/// The .NET implementation of listener configuration does not support registering +/// an actual listener implementation, as that implementation would need to be written +/// in Java. The only thing that is supported here is a Java class name, which must +/// be already available on the cluster. +/// +public class ListenerOptions : IIdentifiedDataSerializable +{ + /// + /// Gets the class name. + /// + private string _className; + //private EventListener _implementation; + + /// + /// Initializes a new instance of the class. + /// + public ListenerOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + /// The class name. + public ListenerOptions(string className) + { + ClassName = className; + } + + ///// + ///// Initializes a new instance of the class. + ///// + ///// The listener implementation. + //public ListenerConfig(EventListener implementation) + //{ + // Implementation = implementation; + //} + + /// + /// Initializes a new instance of the class. + /// + public ListenerOptions(ListenerOptions config) + { + //Implementation = config.Implementation; + ClassName = config.ClassName; + } + + /// + /// Gets or sets the class name of the event listener. + /// + public string ClassName + { + get => _className; + set + { + _className = value.ThrowIfNullNorWhiteSpace(); + //_implementation = null; + } + } + + ///// + ///// Gets or sets the listener implementation. + ///// + //public EventListener Implementation + //{ + // get => _implementation; + // set + // { + // _implementation = value.EnsureIsNotNull(); + // _className = null; + // } + //} + + public virtual bool IncludeValue + { + get => true; + set => throw new NotSupportedException(); + } + + public virtual bool Local + { + get => false; + set => throw new NotSupportedException(); + } + + /// + public override string ToString() + => $"ListenerConfig [className={_className}, includeValue={IncludeValue}, local={Local}]"; + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public virtual int ClassId => ConfigurationDataSerializerHook.ListenerConfig; + + /// + public virtual void WriteData(IObjectDataOutput output) + { + output.WriteString(_className); + //output.WriteObject(implementation); + output.WriteObject(null); // still, be compatible with Java! + } + + /// + public virtual void ReadData(IObjectDataInput input) + { + ClassName = input.ReadString(); + //Implementation = input.ReadObject(); + _ = input.ReadObject(); // still, be compatible with Java! + } +} diff --git a/src/Hazelcast.Net/Models/LoadMode.cs b/src/Hazelcast.Net/Models/LoadMode.cs new file mode 100644 index 0000000000..6594f1083b --- /dev/null +++ b/src/Hazelcast.Net/Models/LoadMode.cs @@ -0,0 +1,33 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Specifies the initial load mode. +/// +public enum LoadMode +{ + /// + /// Each partition is loaded when it is first touched. + /// + [Enums.JavaName("LAZY")] Lazy, + + /// + /// GetMap() method does not return until the map is completely loaded. + /// + [Enums.JavaName("EAGER")] Eager +} diff --git a/src/Hazelcast.Net/Models/MapOptions.cs b/src/Hazelcast.Net/Models/MapOptions.cs new file mode 100644 index 0000000000..a828243e29 --- /dev/null +++ b/src/Hazelcast.Net/Models/MapOptions.cs @@ -0,0 +1,622 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.NearCaching; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents options for map. +/// +public class MapOptions : IIdentifiedDataSerializable, INamedOptions +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default In-Memory format. + /// + public const InMemoryFormat InMemoryFormat = Core.InMemoryFormat.Binary; + + /// + /// Gets the default number of backups + /// + public const int BackupCount = 1; + + /// + /// Gets the minimum number of backups. + /// + public const int MinBackupCount = 0; + + /// + /// Gets the maximum number of backups + /// + public const int MaxBackupCount = Constants.PartitionMaxBackupCount; + + /// + /// Gets the default number of async backups + /// + public const int AsyncBackupCount = MinBackupCount; + + /// + /// Gets the number of default Time to Live in seconds. + /// + public const int TtlSeconds = DisabledTtlSeconds; + + /// + /// Gets the number of Time to Live that represents disabling TTL. + /// + public const int DisabledTtlSeconds = 0; + + /// + /// Gets the default ReadBackupData value. + /// + public const bool ReadBackupData = false; + + /// + /// Gets the number of default time to wait eviction in seconds. + /// + public const int MaxIdleSeconds = 0; + + /// + /// Gets the default value cache policy. + /// + public const CacheDeserializedValues CachedDeserializedValues = CacheDeserializedValues.IndexOnly; + + /// + /// Gets the default metadata policy + /// + public const MetadataPolicy MetadataPolicy = Models.MetadataPolicy.CreateOnUpdate; + + /// + /// Gets the default value of whether statistics are enabled or not + /// + public const bool StatisticsEnabled = true; + + /// + /// Gets the default value of whether per entry statistics are enabled or not + /// + public const bool EntryStatsEnabled = false; + + /// + /// Gets the default split brain protection name. + /// + public const string SplitBrainProtectionName = null; + } +#pragma warning restore CA1034 + + private string _name; + private string _splitBrainProtectionName; + + private bool _readBackupData = Defaults.ReadBackupData; + private bool _statisticsEnabled = Defaults.StatisticsEnabled; + private bool _perEntryStatsEnabled = Defaults.EntryStatsEnabled; + private int _backupCount = Defaults.BackupCount; + private int _asyncBackupCount = Defaults.AsyncBackupCount; + private int _timeToLiveSeconds = Defaults.TtlSeconds; + private int _maxIdleSeconds = Defaults.MaxIdleSeconds; + + private CacheDeserializedValues _cacheDeserializedValues = Defaults.CachedDeserializedValues; + private InMemoryFormat _inMemoryFormat = Defaults.InMemoryFormat; + private MetadataPolicy _metadataPolicy = Defaults.MetadataPolicy; + + private MapStoreOptions _mapStoreConfig = new(); + private MergePolicyOptions _mergePolicyConfig = new(); + private HotRestartOptions _hotRestartConfig = new(); + private DataPersistenceOptions _dataPersistenceConfig = new(); + private MerkleTreeOptions _merkleTreeConfig = new(); + private EventJournalOptions _eventJournalConfig = new(); + private EvictionOptions _evictionConfig = new() { EvictionPolicy = EvictionPolicy.None, MaxSizePolicy = MaxSizePolicy.PerNode, Size = int.MaxValue }; + private TieredStoreOptions _tieredStoreConfig = new(); + + private List _partitioningAttributeConfigs; + private NearCacheOptions _nearCacheConfig; + private WanReplicationRef _wanReplicationRef; + private List _entryListenerConfigs; + private List _partitionLostListenerConfigs; + private List _indexConfigs; + private List _attributeConfigs; + private List _queryCacheConfigs; + private PartitioningStrategyOptions _partitioningStrategyConfig; + + public MapOptions() + { } + + public MapOptions(string name) + { + Name = name; + } + + public MapOptions(MapOptions options) + { + _name = options._name; + _backupCount = options._backupCount; + _asyncBackupCount = options._asyncBackupCount; + _timeToLiveSeconds = options._timeToLiveSeconds; + _maxIdleSeconds = options._maxIdleSeconds; + _metadataPolicy = options._metadataPolicy; + _evictionConfig = new EvictionOptions(options._evictionConfig); + _inMemoryFormat = options._inMemoryFormat; + _mapStoreConfig = options._mapStoreConfig != null ? new MapStoreOptions(options._mapStoreConfig) : null; + _nearCacheConfig = options._nearCacheConfig != null ? new NearCacheOptions(options._nearCacheConfig) : null; + _readBackupData = options._readBackupData; + _cacheDeserializedValues = options._cacheDeserializedValues; + _statisticsEnabled = options._statisticsEnabled; + _perEntryStatsEnabled = options._perEntryStatsEnabled; + _mergePolicyConfig = new MergePolicyOptions(options._mergePolicyConfig); + _wanReplicationRef = options._wanReplicationRef != null ? new WanReplicationRef(options._wanReplicationRef) : null; + _entryListenerConfigs = new List(options._entryListenerConfigs); + _partitionLostListenerConfigs = new List(options._partitionLostListenerConfigs); + _indexConfigs = new List(options._indexConfigs); + _attributeConfigs = new List(options._attributeConfigs); + _queryCacheConfigs = new List(options._queryCacheConfigs); + _partitioningStrategyConfig = options._partitioningStrategyConfig != null ? new PartitioningStrategyOptions(options._partitioningStrategyConfig) : null; + _splitBrainProtectionName = options._splitBrainProtectionName; + _hotRestartConfig = new HotRestartOptions(options._hotRestartConfig); + _dataPersistenceConfig = new DataPersistenceOptions(options._dataPersistenceConfig); + _merkleTreeConfig = new MerkleTreeOptions(options._merkleTreeConfig); + _eventJournalConfig = new EventJournalOptions(options._eventJournalConfig); + _tieredStoreConfig = new TieredStoreOptions(options._tieredStoreConfig); + _partitioningAttributeConfigs = new List(options._partitioningAttributeConfigs); + } + + /// + /// Gets or sets the name of the map. + /// + public string Name + { + get => _name; + set => _name = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the data type that will be used for storing records. + /// + public InMemoryFormat InMemoryFormat + { + get => _inMemoryFormat; + set => _inMemoryFormat = value.ThrowIfUndefined(); + } + + /// + /// Gets or sets the eviction configuration. + /// + public EvictionOptions Eviction + { + get => _evictionConfig; + set => _evictionConfig = value.ThrowIfNull(); + } + + /// + /// Gets or sets the backup count for this map. + /// + public int BackupCount + { + get => _backupCount; + set => _backupCount = Preconditions.ValidateNewBackupCount(value, _asyncBackupCount); + } + + /// + /// Gets or sets the asynchronous backup count for this map. + /// + public int AsyncBackupCount + { + get => _asyncBackupCount; + set => _asyncBackupCount = Preconditions.ValidateNewAsyncBackupCount(_backupCount, value); + } + + /// + /// Gets the total number of backups (BackupCount plus AsyncBackupCount). + /// + public int TotalBackupCount => _backupCount + _asyncBackupCount; + + /// + /// Gets or sets the maximum number of seconds for each entry to stay in the map. + /// + public int TimeToLiveSeconds + { + get => _timeToLiveSeconds; + set => _timeToLiveSeconds = value; + } + + /// + /// Gets or sets the maximum number of seconds for each entry to stay idle in the map. + /// + public int MaxIdleSeconds + { + get => _maxIdleSeconds; + set => _maxIdleSeconds = value; + } + + /// + /// Gets or sets the map store configuration. + /// + public MapStoreOptions MapStore + { + get => _mapStoreConfig; + set => _mapStoreConfig = value; + } + + /// + /// Gets or sets the NearCache configuration. + /// + public NearCacheOptions NearCache + { + get => _nearCacheConfig; + set => _nearCacheConfig = value; + } + + /// + /// Gets or sets the merge policy configuration. + /// + public MergePolicyOptions MergePolicy + { + get => _mergePolicyConfig; + set => _mergePolicyConfig = value; + } + + /// + /// Determines whether statistics are enabled for this map. + /// + public bool StatisticsEnabled + { + get => _statisticsEnabled; + set => _statisticsEnabled = value; + } + + /// + /// Determines whether entry level statistics are enabled for this map. + /// + public bool PerEntryStatsEnabled + { + get => _perEntryStatsEnabled; + set => _perEntryStatsEnabled = value; + } + + /// + /// Determines whether read-backup-data (reading local backup entries) is enabled for this map. + /// + public bool ReadBackupData + { + get => _readBackupData; + set => _readBackupData = value; + } + + /// + /// Gets or sets the WAN target replication reference. + /// + public WanReplicationRef WanReplicationRef + { + get => _wanReplicationRef; + set => _wanReplicationRef = value; + } + + /// + /// Gets or sets the entry listener configurations. + /// + /// The entry listeners configurations. + public List EntryListeners + { + get => _entryListenerConfigs ??= new(); + set => _entryListenerConfigs = value; + } + + public List PartitionLostListeners + { + get => _partitionLostListenerConfigs ??= new(); + set => _partitionLostListenerConfigs = value; + } + + public List Indexes + { + get => _indexConfigs ??= new(); + set => _indexConfigs = value; + } + + public List Attributes + { + get => _attributeConfigs ??= new(); + set => _attributeConfigs = value; + } + + /// + /// Gets or sets the for this map. + /// + public MetadataPolicy MetadataPolicy + { + get => _metadataPolicy; + set => _metadataPolicy = value; + } + + /// + /// Gets or sets the query cache configs. + /// + public List QueryCaches + { + get => _queryCacheConfigs ??= new(); + set => _queryCacheConfigs = value; + } + + /// + /// Gets or sets the partitioning strategy config. + /// + /// + public PartitioningStrategyOptions PartitioningStrategy + { + get => _partitioningStrategyConfig; + set => _partitioningStrategyConfig = value; + } + + /// + /// Whether Near Cache is enabled. + /// + public bool IsNearCacheEnabled => _nearCacheConfig != null; + + /// + /// Gets or sets the hot restart config. + /// + [Obsolete("Use DataPersistenceConfig.", false)] + public HotRestartOptions HotRestart + { + get => _hotRestartConfig; + set + { + _hotRestartConfig = value.ThrowIfNull(); + Merge(_hotRestartConfig, _dataPersistenceConfig); + } + } + + /// + /// Gets or sets the data persistence config. + /// + public DataPersistenceOptions DataPersistence + { + get => _dataPersistenceConfig; + set + { + _dataPersistenceConfig = value.ThrowIfNull(); + Merge(_hotRestartConfig, _dataPersistenceConfig); + } + } + + /// + /// Gets or sets the merkle tree config. + /// + public MerkleTreeOptions MerkleTree + { + get => _merkleTreeConfig; + set => _merkleTreeConfig = value.ThrowIfNull(); + } + + /// + /// Gets or sets the event journal config. + /// + public EventJournalOptions EventJournal + { + get => _eventJournalConfig; + set => _eventJournalConfig = value.ThrowIfNull(); + } + + /// + /// Gets or sets the tiered-store config. + /// + public TieredStoreOptions TieredStore + { + get => _tieredStoreConfig; + set => _tieredStoreConfig = value.ThrowIfNull(); + } + + /// + /// Gets the value cache settings. + /// + public CacheDeserializedValues CacheDeserializedValues + { + get => _cacheDeserializedValues; + set => _cacheDeserializedValues = value; + } + + /// + /// Gets or sets the split brain protection name. + /// + public string SplitBrainProtectionName + { + get => _splitBrainProtectionName; + set => _splitBrainProtectionName = value; + } + + /// + /// Gets or sets the partition attribute configurations. + /// + public List PartitioningAttributes + { + get => _partitioningAttributeConfigs ??= new(); + set => _partitioningAttributeConfigs = value.ThrowIfNull(); + } + + /// + public override string ToString() + { + return "MapConfig{" + + "name='" + _name + '\'' + + ", inMemoryFormat='" + _inMemoryFormat + '\'' + + ", metadataPolicy=" + _metadataPolicy + + ", backupCount=" + _backupCount + + ", asyncBackupCount=" + _asyncBackupCount + + ", timeToLiveSeconds=" + _timeToLiveSeconds + + ", maxIdleSeconds=" + _maxIdleSeconds + + ", readBackupData=" + _readBackupData + + ", evictionConfig=" + _evictionConfig + + ", merkleTree=" + _merkleTreeConfig + + ", eventJournal=" + _eventJournalConfig + + ", hotRestart=" + _hotRestartConfig + + ", dataPersistenceConfig=" + _dataPersistenceConfig + + ", nearCacheConfig=" + _nearCacheConfig + + ", mapStoreConfig=" + _mapStoreConfig + + ", mergePolicyConfig=" + _mergePolicyConfig + + ", wanReplicationRef=" + _wanReplicationRef + + ", entryListenerConfigs=" + _entryListenerConfigs + + ", indexConfigs=" + _indexConfigs + + ", attributeConfigs=" + _attributeConfigs + + ", splitBrainProtectionName=" + _splitBrainProtectionName + + ", queryCacheConfigs=" + _queryCacheConfigs + + ", cacheDeserializedValues=" + _cacheDeserializedValues + + ", statisticsEnabled=" + _statisticsEnabled + + ", entryStatsEnabled=" + _perEntryStatsEnabled + + ", tieredStoreConfig=" + _tieredStoreConfig + + ", partitioningAttributeConfigs=" + _partitioningAttributeConfigs + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.MapConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_name); + output.WriteInt(_backupCount); + output.WriteInt(_asyncBackupCount); + output.WriteInt(_timeToLiveSeconds); + output.WriteInt(_maxIdleSeconds); + output.WriteObject(_evictionConfig); + output.WriteObject(_mapStoreConfig); + output.WriteObject(_nearCacheConfig); + output.WriteBoolean(_readBackupData); + output.WriteString(_cacheDeserializedValues.ToJavaString()); + output.WriteObject(_mergePolicyConfig); + output.WriteString(_inMemoryFormat.ToJavaString()); + output.WriteObject(_wanReplicationRef); + output.WriteNullableList(_entryListenerConfigs); + output.WriteNullableList(_partitionLostListenerConfigs); + output.WriteNullableList(_indexConfigs); + output.WriteNullableList(_attributeConfigs); + output.WriteNullableList(_queryCacheConfigs); + output.WriteBoolean(_statisticsEnabled); + output.WriteObject(_partitioningStrategyConfig); + output.WriteString(_splitBrainProtectionName); + output.WriteObject(_hotRestartConfig); + output.WriteObject(_merkleTreeConfig); + output.WriteObject(_eventJournalConfig); + output.WriteShort((short)_metadataPolicy); + output.WriteBoolean(_perEntryStatsEnabled); + output.WriteObject(_dataPersistenceConfig); + output.WriteObject(_tieredStoreConfig); + + // Java writes this only if output.getVersion > 5.3 but this code will never run in < 5.4 + output.WriteNullableList(_partitioningAttributeConfigs); + } + + /// + public void ReadData(IObjectDataInput input) + { + _name = input.ReadString(); + _backupCount = input.ReadInt(); + _asyncBackupCount = input.ReadInt(); + _timeToLiveSeconds = input.ReadInt(); + _maxIdleSeconds = input.ReadInt(); + _evictionConfig = input.ReadObject(); + _mapStoreConfig = input.ReadObject(); + _nearCacheConfig = input.ReadObject(); + _readBackupData = input.ReadBoolean(); + _cacheDeserializedValues = Enums.ParseJava(input.ReadString()); + _mergePolicyConfig = input.ReadObject(); + _inMemoryFormat = Enums.ParseJava(input.ReadString()); + _wanReplicationRef = input.ReadObject(); + _entryListenerConfigs = input.ReadNullableList(); + _partitionLostListenerConfigs = input.ReadNullableList(); + _indexConfigs = input.ReadNullableList(); + _attributeConfigs = input.ReadNullableList(); + _queryCacheConfigs = input.ReadNullableList(); + _statisticsEnabled = input.ReadBoolean(); + _partitioningStrategyConfig = input.ReadObject(); + _splitBrainProtectionName = input.ReadString(); + HotRestart = input.ReadObject(); // property ! + _merkleTreeConfig = input.ReadObject(); + _eventJournalConfig = input.ReadObject(); + _metadataPolicy = ((MetadataPolicy)input.ReadShort()).ThrowIfUndefined(); + _perEntryStatsEnabled = input.ReadBoolean(); + DataPersistence = input.ReadObject(); // property! + TieredStore = input.ReadObject(); // property! + + // reads writes this only if output.getVersion > 5.3 but this code will never run in < 5.4 + _partitioningAttributeConfigs = input.ReadNullableList(); + } + + + // Java says: + + /** + * if hot-restart: enabled="true" and data-persistence: enabled="false" + * => enable persistence and use the config from hot-restart. + * Does not break current deployments. + * + * if hot-restart: enabled="false" and data-persistence: enabled="true" + * => enable persistence and use the config from data-persistence. This is + * for the new users. + * + * if hot-restart: enabled="true" and data-persistence: enabled="true" + * => enable persistence and use the config from data-persistence. We prefer + * the new element, and the old one might get removed at some point. + * + * if hot-restart: enabled="false" and data-persistence: enabled="false" + * => we still do override hot-restart using data-persistence. + * It is necessary to maintain equality consistency. + */ + + private static void Merge(HotRestartOptions hotRestartConfig, DataPersistenceOptions dataPersistenceConfig) + { + if (Equals(hotRestartConfig, dataPersistenceConfig)) + { + return; + } + + if (hotRestartConfig.Enabled && !dataPersistenceConfig.Enabled) + { + dataPersistenceConfig.Enabled = true; + dataPersistenceConfig.Fsync = hotRestartConfig.Fsync; + return; + } + + //var over = hotRestartConfig.Enabled && dataPersistenceConfig.Enabled; + + hotRestartConfig.SetIsEnabled(dataPersistenceConfig.Enabled).SetIsFsync(dataPersistenceConfig.Fsync); + + // Java logs, we don't. + //if (over) { + // LOGGER.warning( + // "Please note that HotRestart is deprecated and should not be used. " + // + "Since both HotRestart and DataPersistence are enabled, " + // + "and thus there is a conflict, the latter is used in persistence configuration." + // ); + //} + } + + private static bool Equals(HotRestartOptions hotRestartConfig, DataPersistenceOptions dataPersistenceConfig) + { + return hotRestartConfig.Enabled == dataPersistenceConfig.Enabled && + hotRestartConfig.Fsync == dataPersistenceConfig.Fsync; + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/MapPartitionLostListenerOptions.cs b/src/Hazelcast.Net/Models/MapPartitionLostListenerOptions.cs new file mode 100644 index 0000000000..012db235ac --- /dev/null +++ b/src/Hazelcast.Net/Models/MapPartitionLostListenerOptions.cs @@ -0,0 +1,34 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +public class MapPartitionLostListenerOptions : ListenerOptions +{ + public MapPartitionLostListenerOptions() + { } + + public MapPartitionLostListenerOptions(string className) + : base(className) + { } + + public MapPartitionLostListenerOptions(MapPartitionLostListenerOptions config) + : base(config) + { } + + /// + public override int ClassId => ConfigurationDataSerializerHook.MapPartitionLostListenerConfig; +} diff --git a/src/Hazelcast.Net/Models/MapStoreOptions.cs b/src/Hazelcast.Net/Models/MapStoreOptions.cs new file mode 100644 index 0000000000..5e2cd7893a --- /dev/null +++ b/src/Hazelcast.Net/Models/MapStoreOptions.cs @@ -0,0 +1,265 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using System; +using System.Collections.Generic; +using Hazelcast.Core; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +/// +/// Represents options for a map store. +/// +public class MapStoreOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default value for enable. + /// + public const bool Enabled = false; + + /// + /// Gets the default delay for writing, in seconds. + /// + public const int WriteDelaySeconds = 0; + + /// + /// Gets the default batch size for writing. + /// + public const int WriteBatchSize = 1; + + /// + /// Gets the default write coalescing behavior. + /// + public const bool WriteCoalescing = true; + + /// + /// Gets the default offload behavior. + /// + public const bool Offload = true; + + /// + /// Gets the default initial load mode. + /// + public const LoadMode InitialLoadMode = LoadMode.Lazy; + + /// + /// Gets the default class name. + /// + public const string ClassName = ""; + + /// + /// Gets the default factory class name. + /// + public const string FactoryClassName = ""; + } +#pragma warning restore CA1034 + + private bool _enabled = Defaults.Enabled; + private bool _offload = Defaults.Offload; + private bool _writeCoalescing = Defaults.WriteCoalescing; + private int _writeDelaySeconds = Defaults.WriteDelaySeconds; + private int _writeBatchSize = Defaults.WriteBatchSize; + private string _className = Defaults.ClassName; + private string _factoryClassName = Defaults.FactoryClassName; + private Dictionary _properties = new(); + private LoadMode _initialLoadMode = Defaults.InitialLoadMode; + + /// + /// Initializes a new instance of the class. + /// + public MapStoreOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public MapStoreOptions(MapStoreOptions config) + { + _enabled = config._enabled; + _className = config._className; + _factoryClassName = config._factoryClassName; + _writeDelaySeconds = config._writeDelaySeconds; + _writeBatchSize = config._writeBatchSize; + _initialLoadMode = config._initialLoadMode; + _writeCoalescing = config._writeCoalescing; + _offload = config._offload; + foreach (var (key, value) in config._properties) + _properties.Add(key, value); + } + + /// + /// Gets or sets the name of the implementation class. + /// + public string ClassName + { + get => _className; + set => _className = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the name of the map store factory implementation class. + /// + public string FactoryClassName + { + get => _factoryClassName; + set => _factoryClassName = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the number of seconds to delay the store writes. + /// + public int WriteDelaySeconds + { + get => _writeDelaySeconds; + set => _writeDelaySeconds = value; + } + + /// + /// Gets or sets the number of operations to be included in each batch processing round. + /// + public int WriteBatchSize + { + get => _writeBatchSize; + set => _writeBatchSize = value.ThrowIfLessThanOrZero(); + } + + /// + /// Whether this configuration is enabled. + /// + public bool Enabled + { + get => _enabled; + set => _enabled = value; + } + + /// + /// Whether offload behavior is enabled. + /// + public bool Offload + { + get => _offload; + set => _offload = value; + } + + /// + /// Sets a property. + /// + /// The property name. + /// The property value. + /// This instance. + public MapStoreOptions SetProperty(string name, string value) + { + _properties.Add(name, value); + return this; + } + + /// + /// Gets a property. + /// + /// The property name. + /// The property value. + public string GetProperty(string name) + { + return _properties.TryGetValue(name, out var value) ? value : null; + } + + /// + /// Gets or sets the properties. + /// + public Dictionary Properties + { + get => _properties; + set => _properties = value.ThrowIfNull(); + } + + /// + /// Gets or sets the initial load mode. + /// + public LoadMode InitialLoadMode + { + get => _initialLoadMode; + set => _initialLoadMode = value; + } + + /// + /// Whether write-coalescing is enabled. + /// + public bool WriteCoalescing + { + get => _writeCoalescing; + set => _writeCoalescing = value; + } + + /// + public override string ToString() + { + return "MapStoreConfig{" + + "enabled=" + _enabled + + ", className='" + _className + '\'' + + ", factoryClassName='" + _factoryClassName + '\'' + + ", writeDelaySeconds=" + _writeDelaySeconds + + ", writeBatchSize=" + _writeBatchSize + + ", properties=" + _properties + + ", initialLoadMode=" + _initialLoadMode + + ", writeCoalescing=" + _writeCoalescing + + ", offload=" + _offload + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.MapStoreConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(_enabled); + output.WriteBoolean(_writeCoalescing); + output.WriteString(_className); + output.WriteString(_factoryClassName); + output.WriteInt(_writeDelaySeconds); + output.WriteInt(_writeBatchSize); + output.WriteObject(null/*implementation*/); + output.WriteObject(null/*factoryImplementation*/); + output.WriteObject(Properties); + output.WriteString(_initialLoadMode.ToJavaString()); + output.WriteBoolean(_offload); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadBoolean(); + _writeCoalescing = input.ReadBoolean(); + _className = input.ReadString(); + _factoryClassName = input.ReadString(); + _writeDelaySeconds = input.ReadInt(); + _writeBatchSize = input.ReadInt(); + _/*implementation*/ = input.ReadObject(); + _/*factoryImplementation*/ = input.ReadObject(); + _properties = input.ReadObject>(); + _initialLoadMode = Enums.ParseJava(input.ReadString()); + _offload = input.ReadBoolean(); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/MaxSizePolicy.cs b/src/Hazelcast.Net/Models/MaxSizePolicy.cs new file mode 100644 index 0000000000..8b05e2bcb2 --- /dev/null +++ b/src/Hazelcast.Net/Models/MaxSizePolicy.cs @@ -0,0 +1,89 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Represents the maximum size policy. +/// +public enum MaxSizePolicy +{ + /// + /// Policy based on maximum number of entries stored per data + /// structure (map, cache etc) on each Hazelcast instance + /// + [Enums.JavaName("PER_NODE")] PerNode = 0, + + /// + /// Policy based on maximum number of entries stored per + /// data structure (map, cache etc) on each partition + /// + [Enums.JavaName("PER_PARTITION")] PerPartition = 1, + + /// + /// Policy based on maximum used JVM heap memory percentage per + /// data structure (map, cache etc) on each Hazelcast instance + /// + [Enums.JavaName("USED_HEAP_PERCENTAGE")] UsedHeapPercentage = 2, + + /// + /// Policy based on maximum used JVM heap memory in megabytes per + /// data structure (map, cache etc) on each Hazelcast instance + /// + [Enums.JavaName("USED_HEAP_SIZE")] UsedHeapSize = 3, + + /// + /// Policy based on minimum free JVM + /// heap memory percentage per JVM + /// + [Enums.JavaName("FREE_HEAP_PERCENTAGE")] FreeHeapPercentage = 4, + + /// + /// Policy based on minimum free JVM + /// heap memory in megabytes per JVM + /// + [Enums.JavaName("FREE_HEAP_SIZE")] FreeHeapSize = 5, + + /// + /// Policy based on maximum number of entries + /// stored per data structure (map, cache etc) + /// + [Enums.JavaName("ENTRY_COUNT")] EntryCount = 6, + + /// + /// Policy based on maximum used native memory in megabytes per + /// data structure (map, cache etc) on each Hazelcast instance + /// + [Enums.JavaName("USED_NATIVE_MEMORY_SIZE")] UsedNativeMemorySize = 7, + + /// + /// Policy based on maximum used native memory percentage per + /// data structure (map, cache etc) on each Hazelcast instance + /// + [Enums.JavaName("USED_NATIVE_MEMORY_PERCENTAGE")] UsedNativeMemoryPercentage = 8, + + /// + /// Policy based on minimum free native + /// memory in megabytes per Hazelcast instance + /// + [Enums.JavaName("FREE_NATIVE_MEMORY_SIZE")] FreeNativeMemorySize = 9, + + /// + /// Policy based on minimum free native + /// memory percentage per Hazelcast instance + /// + [Enums.JavaName("FREE_NATIVE_MEMORY_PERCENTAGE")] FreeNativeMemoryPercentage = 10 +} diff --git a/src/Hazelcast.Net/Models/MemoryTierOptions.cs b/src/Hazelcast.Net/Models/MemoryTierOptions.cs index 77487bde7a..d3bd4f2ebd 100644 --- a/src/Hazelcast.Net/Models/MemoryTierOptions.cs +++ b/src/Hazelcast.Net/Models/MemoryTierOptions.cs @@ -12,21 +12,67 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + namespace Hazelcast.Models; /// /// Represents options of a tiered-store. /// -internal class MemoryTierOptions +public class MemoryTierOptions : IIdentifiedDataSerializable { - private static readonly Capacity DefaultCapacity = new(256, MemoryUnit.MegaBytes); + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default capacity. + /// + public static readonly Capacity Capacity = new(256, MemoryUnit.MegaBytes); + } +#pragma warning restore CA1034 + + public MemoryTierOptions() + { } + + public MemoryTierOptions(MemoryTierOptions options) + { + Capacity = options.Capacity; + } /// /// Gets or sets the memory capacity. /// - public Capacity Capacity { get; set; } = DefaultCapacity; + public Capacity Capacity { get; set; } = Defaults.Capacity; + + /// + public override string ToString() + { + return "MemoryTierConfig{" + + "capacity=" + Capacity + + '}'; + } + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteLong(Capacity.Value); + output.WriteString(Capacity.Unit.ToJavaString()); + } + + /// + public void ReadData(IObjectDataInput input) + { + Capacity = Capacity.Of(input.ReadLong(), Enums.ParseJava(input.ReadString())); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; - // NOTE: - // not implementing all equality + serialization support - // (see MemoryTierConfig.java) + /// + public int ClassId => ConfigurationDataSerializerHook.MemoryTierConfig; } diff --git a/src/Hazelcast.Net/Models/MemoryUnit.cs b/src/Hazelcast.Net/Models/MemoryUnit.cs index 5db5c119c9..2f5fc635d6 100644 --- a/src/Hazelcast.Net/Models/MemoryUnit.cs +++ b/src/Hazelcast.Net/Models/MemoryUnit.cs @@ -12,30 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Core; + namespace Hazelcast.Models; /// /// Represents a memory size unit. /// -internal enum MemoryUnit +public enum MemoryUnit { /// - /// Memory size in bytes. + /// Bytes. /// - Bytes = 0, + [Enums.JavaName("BYTES")] Bytes = 0, /// - /// Memory size in kilobytes. + /// Kilobytes. /// - KiloBytes = 1, + [Enums.JavaName("KILOBYTES")] KiloBytes = 1, /// - /// Memory size in megabytes. + /// MegaBytes. /// - MegaBytes = 2, + [Enums.JavaName("MEGABYTES")] MegaBytes = 2, /// - /// MemorySize in gigabytes. + /// GigaBytes. /// - GigaBytes = 3 + [Enums.JavaName("GIGABYTES")] GigaBytes = 3, } diff --git a/src/Hazelcast.Net/Models/MemoryUnitExtensions.cs b/src/Hazelcast.Net/Models/MemoryUnitExtensions.cs new file mode 100644 index 0000000000..710f52ae04 --- /dev/null +++ b/src/Hazelcast.Net/Models/MemoryUnitExtensions.cs @@ -0,0 +1,53 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; + +namespace Hazelcast.Models; + +public static class MemoryUnitExtensions +{ + public static string Abbrev(this MemoryUnit memoryUnit) + => memoryUnit switch + { + MemoryUnit.Bytes => "B", + MemoryUnit.KiloBytes => "KB", + MemoryUnit.MegaBytes => "MB", + MemoryUnit.GigaBytes => "GB", + _ => throw new ArgumentOutOfRangeException(nameof(memoryUnit)) + }; + + public static long Convert(MemoryUnit toUnit, MemoryUnit fromUnit, long value) + { + if (toUnit == fromUnit) return value; + + var bytes = fromUnit switch + { + MemoryUnit.Bytes => value, + MemoryUnit.KiloBytes => value * 1_000, + MemoryUnit.MegaBytes => value * 1_000_000, + MemoryUnit.GigaBytes => value * 1_000_000_000, + _ => throw new ArgumentOutOfRangeException(nameof(fromUnit)) + }; + + return toUnit switch + { + MemoryUnit.Bytes => bytes, + MemoryUnit.KiloBytes => (long)Math.Round((double)bytes / 1_000), + MemoryUnit.MegaBytes => (long)Math.Round((double)bytes / 1_000_000), + MemoryUnit.GigaBytes => (long)Math.Round((double)bytes / 1_000_000_000), + _ => throw new ArgumentOutOfRangeException(nameof(toUnit)) + }; + } +} diff --git a/src/Hazelcast.Net/Models/MergePolicyOptions.cs b/src/Hazelcast.Net/Models/MergePolicyOptions.cs new file mode 100644 index 0000000000..f82c35150d --- /dev/null +++ b/src/Hazelcast.Net/Models/MergePolicyOptions.cs @@ -0,0 +1,106 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +public class MergePolicyOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default merge policy. + /// + public const string MergePolicy = "com.hazelcast.spi.merge.PutIfAbsentMergePolicy"; + + /// + /// Gets the default batch size. + /// + public const int BatchSize = 100; + } +#pragma warning restore CA1034 + + private string _policy = Defaults.MergePolicy; + private int _batchSize = Defaults.BatchSize; + + public MergePolicyOptions() + { } + + public MergePolicyOptions(string policy, int batchSize) + { + Policy = policy; + BatchSize = batchSize; + } + + public MergePolicyOptions(MergePolicyOptions mergePolicyConfig) + { + _policy = mergePolicyConfig._policy; + _batchSize = mergePolicyConfig._batchSize; + } + + /// + /// Gets or sets the classname of the split brain merge policy. + /// + public string Policy + { + get => _policy; + set => _policy = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the batch size. + /// + public int BatchSize + { + get => _batchSize; + set => _batchSize = value.ThrowIfLessThanZero(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.MergePolicyConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_policy); + output.WriteInt(_batchSize); + } + + /// + public void ReadData(IObjectDataInput input) + { + _policy = input.ReadString(); + _batchSize = input.ReadInt(); + } + + /// + public override string ToString() + { + return "MergePolicyConfig{" + + "policy='" + _policy + '\'' + + ", batchSize=" + _batchSize + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/MerkleTreeOptions.cs b/src/Hazelcast.Net/Models/MerkleTreeOptions.cs new file mode 100644 index 0000000000..800836e071 --- /dev/null +++ b/src/Hazelcast.Net/Models/MerkleTreeOptions.cs @@ -0,0 +1,119 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using Hazelcast.Core; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration of a merkle tree. +/// +public class MerkleTreeOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the minimal depth of a merkle tree. + /// + public const int MinDepth = 2; + + /// + /// Gets the maximal depth of a merkle tree. + /// + public const int MaxDepth = 27; + + /// + /// Gets the default depth of a merkle tree. + /// + public const int Depth = 10; + } +#pragma warning restore CA1034 + + private bool? _enabled; + private int _depth = Defaults.Depth; + + /// + /// Initializes a new instance of the class. + /// + public MerkleTreeOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public MerkleTreeOptions(MerkleTreeOptions config) + { + _enabled = config._enabled; + _depth = config._depth; + } + + /// + /// Gets or sets the depth of the merkle tree. + /// + public int Depth + { + get => _depth; + set => _depth = value.ThrowIfOutOfRange(Defaults.MinDepth, Defaults.MaxDepth); + } + + /// + /// Whether the merkle tree is enabled. + /// + /// + public bool Enabled + { + get => _enabled ?? false; + set => _enabled = value; + } + + /// + /// Whether the property has been set. + /// + public bool EnabledSet => _enabled.HasValue; + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.MerkleTreeConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteNullableBoolean(_enabled); + output.WriteInt(_depth); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadNullableBoolean(); + _depth = input.ReadInt(); + } + + /// + public override string ToString() + { + return "MerkleTreeConfig{" + + "enabled=" + _enabled + + ", depth=" + _depth + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/MetadataPolicy.cs b/src/Hazelcast.Net/Models/MetadataPolicy.cs new file mode 100644 index 0000000000..9abdc15f44 --- /dev/null +++ b/src/Hazelcast.Net/Models/MetadataPolicy.cs @@ -0,0 +1,48 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + + +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Defines how hazelcast processes objects of supported types to create additional metadata about them. +/// +public enum MetadataPolicy +{ + /// + /// Process supported objects at the time of creation and updates. + /// + [Enums.JavaName("CREATE_ON_UPDATE")] CreateOnUpdate = 0, + + /// + /// Disable metadata creation. + /// + [Enums.JavaName("OFF")] Off = 1 +} diff --git a/src/Hazelcast.Net/Models/PartitioningAttributeOptions.cs b/src/Hazelcast.Net/Models/PartitioningAttributeOptions.cs new file mode 100644 index 0000000000..a06914f615 --- /dev/null +++ b/src/Hazelcast.Net/Models/PartitioningAttributeOptions.cs @@ -0,0 +1,72 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +public class PartitioningAttributeOptions : IIdentifiedDataSerializable +{ + private string _attributeName; + + public PartitioningAttributeOptions() + { } + + public PartitioningAttributeOptions(PartitioningAttributeOptions config) + { + _attributeName = config._attributeName; + } + + public PartitioningAttributeOptions(string attributeName) + { + _attributeName = attributeName; + } + + /// + /// Gets or sets the name of the attribute. + /// + public string AttributeName + { + get => _attributeName; + set => _attributeName = value.ThrowIfNullNorWhiteSpace(); + } + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_attributeName); + } + + /// + public void ReadData(IObjectDataInput input) + { + _attributeName = input.ReadString(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.PartitionAttributeConfig; + + /// + public override string ToString() + { + return "PartitioningAttributeConfig{" + + "attributeName='" + _attributeName + '\'' + + '}'; + } +} diff --git a/src/Hazelcast.Net/Models/PartitioningStrategyOptions.cs b/src/Hazelcast.Net/Models/PartitioningStrategyOptions.cs new file mode 100644 index 0000000000..4f31e79bef --- /dev/null +++ b/src/Hazelcast.Net/Models/PartitioningStrategyOptions.cs @@ -0,0 +1,83 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration of the partitioning strategy. +/// +public class PartitioningStrategyOptions : IIdentifiedDataSerializable +{ + // note: Java also supports a PartitioningStrategy implementation class which .NET cannot support + + /// + /// Initializes a new instance of the class. + /// + public PartitioningStrategyOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public PartitioningStrategyOptions(PartitioningStrategyOptions config) + { + PartitioningStrategyClass = config.PartitioningStrategyClass; + } + + /// + /// Initializes a new instance of the class. + /// + public PartitioningStrategyOptions(string partitioningStrategyClass) + { + PartitioningStrategyClass = partitioningStrategyClass; + } + + /// + /// Gets or sets the name of the class implementing the partitioning strategy. + /// + /// + public string PartitioningStrategyClass { get; set; } + + /// + public override string ToString() + { + return "PartitioningStrategyConfig{" + + "partitioningStrategyClass='" + PartitioningStrategyClass + '\'' + + ", partitioningStrategy=" + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.PartitionStrategyConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(PartitioningStrategyClass); + output.WriteObject(null/*partitioningStrategy*/); + } + + /// + public void ReadData(IObjectDataInput input) + { + PartitioningStrategyClass = input.ReadString(); + _/*partitioningStrategy*/ = input.ReadObject(); + } +} diff --git a/src/Hazelcast.Net/Models/Preconditions.cs b/src/Hazelcast.Net/Models/Preconditions.cs new file mode 100644 index 0000000000..ae060407ee --- /dev/null +++ b/src/Hazelcast.Net/Models/Preconditions.cs @@ -0,0 +1,81 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; + +namespace Hazelcast.Models; + +internal static class Preconditions +{ + public static int ValidateNewBackupCount(int newBackupCount, int currentAsyncBackupCount) + { + if (newBackupCount < 0) + { + throw new ArgumentException("backup-count can't be smaller than 0"); + } + + if (currentAsyncBackupCount < 0) + { + throw new ArgumentException("async-backup-count can't be smaller than 0"); + } + + if (newBackupCount > Constants.PartitionMaxBackupCount) + { + throw new ArgumentException("backup-count can't be larger than than " + Constants.PartitionMaxBackupCount); + } + + if (newBackupCount + currentAsyncBackupCount > Constants.PartitionMaxBackupCount) + { + throw new ArgumentException("the sum of backup-count and async-backup-count can't be larger than than " + + Constants.PartitionMaxBackupCount); + } + + return newBackupCount; + } + + /** + * Tests if the newAsyncBackupCount count is valid. + * + * @param currentBackupCount the current number of backups + * @param newAsyncBackupCount the new number of async backups + * @return the newAsyncBackupCount + * @throws java.lang.IllegalArgumentException if asyncBackupCount is smaller than 0, or larger than the maximum + * number of backups. + */ + public static int ValidateNewAsyncBackupCount(int currentBackupCount, int newAsyncBackupCount) + { + if (currentBackupCount < 0) + { + throw new ArgumentException("backup-count can't be smaller than 0"); + } + + if (newAsyncBackupCount < 0) + { + throw new ArgumentException("async-backup-count can't be smaller than 0"); + } + + if (newAsyncBackupCount > Constants.PartitionMaxBackupCount) + { + throw new ArgumentException("async-backup-count can't be larger than than " + Constants.PartitionMaxBackupCount); + } + + if (currentBackupCount + newAsyncBackupCount > Constants.PartitionMaxBackupCount) + { + throw new ArgumentException("the sum of backup-count and async-backup-count can't be larger than than " + + Constants.PartitionMaxBackupCount); + } + + return newAsyncBackupCount; + } +} diff --git a/src/Hazelcast.Net/Models/PredicateOptions.cs b/src/Hazelcast.Net/Models/PredicateOptions.cs new file mode 100644 index 0000000000..58958adf2c --- /dev/null +++ b/src/Hazelcast.Net/Models/PredicateOptions.cs @@ -0,0 +1,108 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using Hazelcast.Core; +using Hazelcast.Configuration; + +namespace Hazelcast.Models; + +/// +/// Represents a predicate configuration. +/// +public class PredicateOptions : IIdentifiedDataSerializable +{ + private string _className; + private string _sql; + + /// + /// Initializes a new instance of the class. + /// + public PredicateOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public PredicateOptions(string className) + { + ClassName = className; + } + + /// + /// Initializes a new instance of the class. + /// + public PredicateOptions(PredicateOptions config) + { + _className = config._className; + _sql = config._sql; + } + + /// + /// Gets the sets the name of the class of the predicate. + /// + public string ClassName + { + get => _className; + set + { + _className = value.ThrowIfNullNorWhiteSpace(); + _sql = null; + } + } + + /// + /// Gets or sets the sql string. + /// + public string Sql + { + get => _sql; + set + { + _sql = value; + _className = null; + } + } + + /// + public override string ToString() + { + return "PredicateConfig{" + + "className='" + _className + '\'' + + ", sql='" + _sql + '\'' + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.PredicateConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_className); + output.WriteString(_sql); + output.WriteObject(null/*implementation*/); + } + + /// + public void ReadData(IObjectDataInput input) + { + _className = input.ReadString(); + _sql = input.ReadString(); + _ = input.ReadObject(); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/QueryCacheOptions.cs b/src/Hazelcast.Net/Models/QueryCacheOptions.cs new file mode 100644 index 0000000000..a249223e46 --- /dev/null +++ b/src/Hazelcast.Net/Models/QueryCacheOptions.cs @@ -0,0 +1,330 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents configuration for the query cache. +/// +public class QueryCacheOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// By default, after reaching this minimum size, node immediately sends buffered events to the QueryCache. + /// + public const int BatchSize = 1; + + /// + /// By default, only buffer last events fired from a partition. + /// + public const int BufferSize = 16; + + /// + /// Default value of delay seconds which an event wait in the buffer of a node, before sending to the query cache. + /// + public const int DelaySeconds = 0; + + /// + /// By default, also cache values of entries besides keys. + /// + public const bool IncludeValue = true; + + /// + /// By default, execute an initial population query prior to creation of the query cache. + /// + public const bool Populate = true; + + /// + /// Default value of coalesce property. + /// + public const bool Coalesce = false; + + /// + /// Do not serialize given keys by default. + /// + public const bool SerializeKeys = false; + + /// + /// By default, hold values of entries in the query cache as binary. + /// + public const InMemoryFormat InMemoryFormat = Core.InMemoryFormat.Binary; + } +#pragma warning restore CA1034 + + private int _batchSize = Defaults.BatchSize; + private int _bufferSize = Defaults.BufferSize; + private int _delaySeconds = Defaults.DelaySeconds; + private bool _includeValue = Defaults.IncludeValue; + private bool _populate = Defaults.Populate; + private bool _coalesce = Defaults.Coalesce; + private bool _serializeKeys = Defaults.SerializeKeys; + private InMemoryFormat _inMemoryFormat = Defaults.InMemoryFormat; + + private string _name; + private PredicateOptions _predicateConfig = new(); + private EvictionOptions _evictionConfig = new(); + private List _entryListenerConfigs; + private List _indexConfigs; + + /// + /// Initializes a new instance of the class. + /// + public QueryCacheOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public QueryCacheOptions(string name) + { + name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public QueryCacheOptions(QueryCacheOptions other) + { + _batchSize = other._batchSize; + _bufferSize = other._bufferSize; + _delaySeconds = other._delaySeconds; + _includeValue = other._includeValue; + _populate = other._populate; + _coalesce = other._coalesce; + _inMemoryFormat = other._inMemoryFormat; + _name = other._name; + _predicateConfig = other._predicateConfig; + _evictionConfig = other._evictionConfig; + _entryListenerConfigs = other._entryListenerConfigs; + _indexConfigs = other._indexConfigs; + } + + /// + /// Gets or sets the name of the query cache. + /// + public string Name + { + get => _name; + set => _name = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the predicate of the query cache. + /// + public PredicateOptions Predicate + { + get => _predicateConfig; + set => _predicateConfig = value.ThrowIfNull(); + } + + /// + /// Gets or sets the batch size. + /// + public int BatchSize + { + get => _batchSize; + set => _batchSize = value.ThrowIfLessThanZero(); + } + + /// + /// Gets or sets the maximum number of events which can be stored in a buffer of partition. + /// + public int BufferSize + { + get => _bufferSize; + set => _bufferSize = value.ThrowIfLessThanZero(); + } + + /// + /// Gets or sets the minimum number of delay seconds which an event waits in the buffer of node before sending to a query cache. + /// + public int DelaySeconds + { + get => _delaySeconds; + set => _delaySeconds = value.ThrowIfLessThanZero(); + } + + /// + /// Gets or sets the memory format of values of entries in the query cache. + /// + public InMemoryFormat InMemoryFormat + { + get => _inMemoryFormat; + set + { + if (value == InMemoryFormat.Native) + throw new ArgumentException("NATIVE memory format is not supported.", nameof(value)); + _inMemoryFormat = value.ThrowIfUndefined(); + } + } + + /// + /// Whether value caching is enabled. + /// + public bool IncludeValue + { + get => _includeValue; + set => _includeValue = value; + } + + /// + /// Whether initial population of the query cache is enabled. + /// + public bool Populate + { + get => _populate; + set => _populate = value; + } + + + /// + /// Whether coalescing is enabled. + /// + public bool Coalesce + { + get => _coalesce; + set => _coalesce = value; + } + + /// + /// Whether the query cache key is stored in serialized format (or by-reference). + /// + public bool SerializeKeys + { + get => _serializeKeys; + set => _serializeKeys = value; + } + + /// + /// Gets or sets the eviction configuration. + /// + public EvictionOptions Eviction + { + get => _evictionConfig; + set => _evictionConfig = value.ThrowIfNull(); + } + + /// + /// Adds an entry listener configuration. + /// + /// The entry listener configuration to add. + /// This instance. + public QueryCacheOptions AddEntryListener(EntryListenerOptions listenerConfig) + { + EntryListeners.Add(listenerConfig); + return this; + } + + /// + /// Gets or sets the entry listener configurations. + /// + public List EntryListeners + { + get => _entryListenerConfigs ??= new(); + set => _entryListenerConfigs = value.ThrowIfNull(); + } + + /// + /// Adds an index configuration. + /// + /// The index configuration to add. + /// This instance. + public QueryCacheOptions AddIndex(IndexOptions indexConfig) + { + Indexes.Add(indexConfig); + return this; + } + + /// + /// Gets or sets the index configurations. + /// + public List Indexes + { + get => _indexConfigs ??= new(); + set => _indexConfigs = value; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.QueryCacheConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteInt(_batchSize); + output.WriteInt(_bufferSize); + output.WriteInt(_delaySeconds); + output.WriteBoolean(_includeValue); + output.WriteBoolean(_populate); + output.WriteBoolean(_coalesce); + output.WriteString(_inMemoryFormat.ToJavaString()); + output.WriteString(_name); + output.WriteObject(_predicateConfig); + output.WriteObject(_evictionConfig); + output.WriteNullableList(_entryListenerConfigs); + output.WriteNullableList(_indexConfigs); + output.WriteBoolean(_serializeKeys); + } + + /// + public void ReadData(IObjectDataInput input) + { + _batchSize = input.ReadInt(); + _bufferSize = input.ReadInt(); + _delaySeconds = input.ReadInt(); + _includeValue = input.ReadBoolean(); + _populate = input.ReadBoolean(); + _coalesce = input.ReadBoolean(); + _inMemoryFormat = Enums.ParseJava(input.ReadString()); + _name = input.ReadString(); + _predicateConfig = input.ReadObject(); + _evictionConfig = input.ReadObject(); + _entryListenerConfigs = input.ReadNullableList(); + _indexConfigs = input.ReadNullableList(); + _serializeKeys = input.ReadBoolean(); + } + + /// + public override string ToString() + { + return "QueryCacheConfig{" + + "batchSize=" + _batchSize + + ", bufferSize=" + _bufferSize + + ", delaySeconds=" + _delaySeconds + + ", includeValue=" + _includeValue + + ", populate=" + _populate + + ", coalesce=" + _coalesce + + ", serializeKeys=" + _serializeKeys + + ", inMemoryFormat=" + _inMemoryFormat + + ", name='" + _name + '\'' + + ", predicateConfig=" + _predicateConfig + + ", evictionConfig=" + _evictionConfig + + ", entryListenerConfigs=" + _entryListenerConfigs + + ", indexConfigs=" + _indexConfigs + + "}"; + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/QueryConstants.cs b/src/Hazelcast.Net/Models/QueryConstants.cs new file mode 100644 index 0000000000..5ac2739beb --- /dev/null +++ b/src/Hazelcast.Net/Models/QueryConstants.cs @@ -0,0 +1,35 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +namespace Hazelcast.Models; + +internal static class QueryConstants +{ + /// + /// The attribute name of the key. + /// + public const string Key = "__key"; + + /// + /// The attribute name of "this". + /// + public const string This = "this"; + + /// + /// Determines whether a string is a query constant. + /// + /// The value to test. + /// true if the value is a query constant; otherwise false. + public static bool IsConstant(string value) => value is Key or This; +} diff --git a/src/Hazelcast.Net/Models/RingbufferOptions.cs b/src/Hazelcast.Net/Models/RingbufferOptions.cs new file mode 100644 index 0000000000..ebd87e444c --- /dev/null +++ b/src/Hazelcast.Net/Models/RingbufferOptions.cs @@ -0,0 +1,268 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.IO; +using System.Runtime.CompilerServices; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration of a ringbuffer. +/// +public class RingbufferOptions : IIdentifiedDataSerializable, INamedOptions +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default capacity. + /// + public const int Capacity = 10 * 1000; + + /// + /// Gets the default synchronous backup count. + /// + public const int SyncBackupCount = 1; + + /// + /// Gets the default asynchronous backup count. + /// + public const int AsyncBackupCount = 0; + + /// + /// Gets the default time-to-live. + /// + public const int TtlSeconds = 0; + + /// + /// Gets the default in-memory format. + /// + public const InMemoryFormat InMemoryFormat = Core.InMemoryFormat.Binary; + } +#pragma warning restore CA1034 + + + private string _name; + private int _capacity = Defaults.Capacity; + private int _backupCount = Defaults.SyncBackupCount; + private int _asyncBackupCount = Defaults.AsyncBackupCount; + private int _timeToLiveSeconds = Defaults.TtlSeconds; + private InMemoryFormat _inMemoryFormat = Defaults.InMemoryFormat; + private RingbufferStoreOptions _ringbufferStoreOptions = new() { Enabled = false }; + private string _splitBrainProtectionName; + private MergePolicyOptions _mergePolicyOptions = new(); + + /// + /// Initializes a new instance of the class. + /// + public RingbufferOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the ringbuffer. + public RingbufferOptions(string name) + { + Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + /// Another instance. + public RingbufferOptions(RingbufferOptions options) + { + options.ThrowIfNull(); + + _name = options._name; + _capacity = options._capacity; + _backupCount = options._backupCount; + _asyncBackupCount = options._asyncBackupCount; + _timeToLiveSeconds = options._timeToLiveSeconds; + _inMemoryFormat = options._inMemoryFormat; + if (options._ringbufferStoreOptions != null) + _ringbufferStoreOptions = new RingbufferStoreOptions(options._ringbufferStoreOptions); + _mergePolicyOptions = new MergePolicyOptions(options._mergePolicyOptions); + _splitBrainProtectionName = options._splitBrainProtectionName; + } + + /// + /// Initializes a new instance of the class. + /// + /// The name of the ringbuffer. + /// Another instance. + public RingbufferOptions(string name, RingbufferOptions options) + : this(options) + { + Name = name; + } + + /// + /// Gets or sets the name of the ringbuffer. + /// + public string Name + { + get => _name; + set => _name = value.ThrowIfNullNorWhiteSpace(); + } + + /* + * Gets the capacity of the ringbuffer. + *

+ * The capacity is the total number of items in the ringbuffer. The items + * will remain in the ringbuffer, but the oldest items will eventually be + * overwritten by the newest items. + * + * @return the capacity + */ + public int Capacity + { + get => _capacity; + set => _capacity = value.ThrowIfLessThanOrZero(); + } + + ///

+ /// Gets or sets the number of synchronous backups. + /// + public int BackupCount + { + get => _backupCount; + set => _backupCount = Preconditions.ValidateNewBackupCount(value, _asyncBackupCount); + } + + /// + /// Gets or sets the number of asynchronous backups. + /// + public int AsyncBackupCount + { + get => _asyncBackupCount; + set => _asyncBackupCount = Preconditions.ValidateNewAsyncBackupCount(_backupCount, value); + } + + /// + /// Gets the total number of backups. + /// + public int TotalBackupCount => _backupCount + _asyncBackupCount; + + /// + /// Gets or sets the time-to-live in seconds. + /// + public int TimeToLiveSeconds + { + get => _timeToLiveSeconds; + set => _timeToLiveSeconds = value.ThrowIfLessThanOrZero(); + } + + /// + /// Gets or sets the in-memory format. + /// + public InMemoryFormat InMemoryFormat + { + get => _inMemoryFormat; + set + { + if (value == InMemoryFormat.Native) + throw new ArgumentException("Native format is not supported.", nameof(value)); + _inMemoryFormat = value.ThrowIfUndefined(); + } + } + + /* + * Get the RingbufferStore (load and store ringbuffer items from/to a database) + * configuration. + * + * @return the ringbuffer store configuration + */ + public RingbufferStoreOptions RingbufferStore + { + get => _ringbufferStoreOptions; + set => _ringbufferStoreOptions = value; + } + + /// + /// Gets or sets the split-brain protection name. + /// + public string SplitBrainProtectionName + { + get => _splitBrainProtectionName; + set => _splitBrainProtectionName = value; + } + + /// + /// Gets or sets the merge policy options. + /// + public MergePolicyOptions MergePolicy + { + get => _mergePolicyOptions; + set => _mergePolicyOptions = value; + } + + /// + public override string ToString() + { + return "RingbufferConfig{" + + "name='" + _name + '\'' + + ", capacity=" + _capacity + + ", backupCount=" + _backupCount + + ", asyncBackupCount=" + _asyncBackupCount + + ", timeToLiveSeconds=" + _timeToLiveSeconds + + ", inMemoryFormat=" + _inMemoryFormat + + ", ringbufferStoreConfig=" + _ringbufferStoreOptions + + ", splitBrainProtectionName=" + _splitBrainProtectionName + + ", mergePolicyConfig=" + _mergePolicyOptions + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.RingbufferConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_name); + output.WriteInt(_capacity); + output.WriteInt(_backupCount); + output.WriteInt(_asyncBackupCount); + output.WriteInt(_timeToLiveSeconds); + output.WriteString(_inMemoryFormat.ToJavaString()); + output.WriteObject(_ringbufferStoreOptions); + output.WriteString(_splitBrainProtectionName); + output.WriteObject(_mergePolicyOptions); + } + + /// + public void ReadData(IObjectDataInput input) + { + _name = input.ReadString(); + _capacity = input.ReadInt(); + _backupCount = input.ReadInt(); + _asyncBackupCount = input.ReadInt(); + _timeToLiveSeconds = input.ReadInt(); + _inMemoryFormat = Enums.ParseJava(input.ReadString()); + _ringbufferStoreOptions = input.ReadObject(); + _splitBrainProtectionName = input.ReadString(); + _mergePolicyOptions = input.ReadObject(); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/RingbufferStoreOptions.cs b/src/Hazelcast.Net/Models/RingbufferStoreOptions.cs new file mode 100644 index 0000000000..4e7c9a7187 --- /dev/null +++ b/src/Hazelcast.Net/Models/RingbufferStoreOptions.cs @@ -0,0 +1,124 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System.Collections.Generic; +using System.IO; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration of a ringbuffer store. +/// +public class RingbufferStoreOptions : IIdentifiedDataSerializable +{ + private bool _enabled = true; + private string _className; + private string _factoryClassName; + private Dictionary _properties = new(); + + /// + /// Initializes a new instance of the class. + /// + public RingbufferStoreOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public RingbufferStoreOptions(RingbufferStoreOptions options) + { + _enabled = options._enabled; + _className = options._className; + _factoryClassName = options._factoryClassName; + _properties = new Dictionary(options._properties); + } + + /// + /// Whether the store is enabled. + /// + public bool Enabled + { + get => _enabled; + set => _enabled = value; + } + + /// + /// Gets or sets the store class name. + /// + public string ClassName + { + get => _className; + set => _className = value.ThrowIfNullNorWhiteSpace(); + } + + /// + /// Gets or sets the properties. + /// + public Dictionary Properties + { + get => _properties; + set => _properties = value.ThrowIfNull(); + } + + /// + /// Gets or sets the factory class name. + /// + public string FactoryClassName + { + get => _factoryClassName; + set => _factoryClassName = value.ThrowIfNullNorWhiteSpace(); + } + + /// + public override string ToString() + { + return "RingbufferStoreConfig{" + + "enabled=" + _enabled + + ", className='" + _className + '\'' + + ", factoryClassName='" + _factoryClassName + '\'' + + ", properties=" + _properties + + '}'; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.RingbufferStoreConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(_enabled); + output.WriteString(_className); + output.WriteString(_factoryClassName); + output.WriteObject(_properties); + output.WriteObject(null/*_storeImplementation*/); + output.WriteObject(null/*_factoryImplementation*/); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadBoolean(); + _className = input.ReadString(); + _factoryClassName = input.ReadString(); + _properties = input.ReadObject>(); + _ /*_storeImplementation*/ = input.ReadObject(); + _ /*_factoryImplementation*/ = input.ReadObject(); + } +} diff --git a/src/Hazelcast.Net/Models/TieredStoreOptions.cs b/src/Hazelcast.Net/Models/TieredStoreOptions.cs new file mode 100644 index 0000000000..ff3f2fbd45 --- /dev/null +++ b/src/Hazelcast.Net/Models/TieredStoreOptions.cs @@ -0,0 +1,116 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration for a tiered store. +/// +public class TieredStoreOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default value for whether tiered-store is enabled. + /// + public const bool Enabled = false; + } +#pragma warning restore CA1034 + + private bool _enabled = Defaults.Enabled; + private MemoryTierOptions _memoryTierConfig = new(); + private DiskTierOptions _diskTierConfig = new(); + + /// + /// Initializes a new instance of the class. + /// + public TieredStoreOptions() + { } + + /// + /// Initializes a new instance of the class. + /// + public TieredStoreOptions(TieredStoreOptions tieredStoreConfig) + { + _enabled = tieredStoreConfig._enabled; + _memoryTierConfig = new MemoryTierOptions(tieredStoreConfig._memoryTierConfig); + _diskTierConfig = new DiskTierOptions(tieredStoreConfig._diskTierConfig); + } + + /// + /// Whether tiered-store is enabled. + /// + public bool Enabled + { + get => _enabled; + set => _enabled = value; + } + + /// + /// Gets or sets the memory tier configuration. + /// + public MemoryTierOptions MemoryTier + { + get => _memoryTierConfig; + set => _memoryTierConfig = value; + } + + /// + /// Gets or sets the disk tier configuration. + /// + public DiskTierOptions DiskTier + { + get => _diskTierConfig; + set => _diskTierConfig = value; + } + + /// + public override string ToString() + { + return "TieredStoreConfig{" + + "enabled=" + _enabled + + ", memoryTierConfig=" + _memoryTierConfig + + ", diskTierConfig=" + _diskTierConfig + + '}'; + } + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(_enabled); + output.WriteObject(_memoryTierConfig); + output.WriteObject(_diskTierConfig); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadBoolean(); + _memoryTierConfig = input.ReadObject(); + _diskTierConfig = input.ReadObject(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.TieredStoreConfig; +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/TimeUnit.cs b/src/Hazelcast.Net/Models/TimeUnit.cs new file mode 100644 index 0000000000..3f2b7c31f4 --- /dev/null +++ b/src/Hazelcast.Net/Models/TimeUnit.cs @@ -0,0 +1,76 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + + +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Models; + +/// +/// Defines a time unit. +/// +/// +/// Maps to java.util.concurrent.TimeUnit, we are using the same values. +/// +public enum TimeUnit : long +{ + /// + /// Time unit representing one thousandth of a microsecond. + /// + [Enums.JavaName("NANOSECONDS")] Nanoseconds = 1, + + /// + /// Time unit representing one thousandth of a millisecond. + /// + [Enums.JavaName("MICROSECONDS")] Microseconds = 1_000, + + /// + /// Time unit representing one thousandth of a second. + /// + [Enums.JavaName("MILLISECONDS")] Milliseconds = 1_000_000, + + /// + /// Time unit representing one second. + /// + [Enums.JavaName("SECONDS")] Seconds = 1_000_000_000, + + /// + /// Time unit representing a minute i.e. sixty seconds. + /// + [Enums.JavaName("MINUTES")] Minutes = 60_000_000_000, + + /// + /// Time unit representing an hour i.e. sixty minutes. + /// + [Enums.JavaName("HOURS")] Hours = 3600_000_000_000, + + /// + /// Time unit representing a day i.e. twenty four hours. + /// + [Enums.JavaName("DAYS")] Days = 86400_000_000_000, +} diff --git a/src/Hazelcast.Net/Models/TimedExpiryPolicyFactoryOptions.cs b/src/Hazelcast.Net/Models/TimedExpiryPolicyFactoryOptions.cs new file mode 100644 index 0000000000..42881bc683 --- /dev/null +++ b/src/Hazelcast.Net/Models/TimedExpiryPolicyFactoryOptions.cs @@ -0,0 +1,72 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; +using System; + +namespace Hazelcast.Models; + +/// +/// +/// +public class TimedExpiryPolicyFactoryOptions : IIdentifiedDataSerializable +{ + + private ExpiryPolicyType _expiryPolicyType; + private DurationOptions _durationConfig; + + public TimedExpiryPolicyFactoryOptions() + { } + + public TimedExpiryPolicyFactoryOptions(ExpiryPolicyType expiryPolicyType, DurationOptions durationConfig) + { + _expiryPolicyType = expiryPolicyType; + _durationConfig = durationConfig; + } + + public ExpiryPolicyType ExpiryPolicyType => _expiryPolicyType; + + public DurationOptions DurationConfig => _durationConfig; + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.SimpleCacheConfigTimedExpiryPolicyFactoryConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_expiryPolicyType.ToJavaString()); + output.WriteObject(_durationConfig); + } + + /// + public void ReadData(IObjectDataInput input) + { + _expiryPolicyType = Enums.ParseJava(input.ReadString()); + _durationConfig = input.ReadObject(); + } + + /// + public override string ToString() + { + return "TimedExpiryPolicyFactoryConfig{" + + "expiryPolicyType=" + _expiryPolicyType + + ", durationConfig=" + _durationConfig + + '}'; + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Models/UniqueKeyTransformation.cs b/src/Hazelcast.Net/Models/UniqueKeyTransformation.cs index 0677fa024b..3b66c6a440 100644 --- a/src/Hazelcast.Net/Models/UniqueKeyTransformation.cs +++ b/src/Hazelcast.Net/Models/UniqueKeyTransformation.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Core; + namespace Hazelcast.Models { /// @@ -25,7 +27,7 @@ public enum UniqueKeyTransformation /// The unique key value is interpreted as an object value. /// Non-negative unique ID is assigned to every distinct object value. /// - Object = 0, + [Enums.JavaName("OBJECT")] Object = 0, /// /// The unique key value is interpreted as a whole integer value of @@ -33,14 +35,14 @@ public enum UniqueKeyTransformation /// long (if necessary) and unique non-negative ID is assigned to every /// distinct value. /// - Long = 1, + [Enums.JavaName("LONG")] Long = 1, /// /// The unique key value is interpreted as a whole integer value of /// byte, short, int or long type. The extracted value is upcasted to /// long (if necessary) and the resulting value is used directly as an ID. /// - Raw = 2 + [Enums.JavaName("RAW")] Raw = 2 #pragma warning restore CA1720 } diff --git a/src/Hazelcast.Net/Models/WanReplicationRef.cs b/src/Hazelcast.Net/Models/WanReplicationRef.cs new file mode 100644 index 0000000000..c07542f3e6 --- /dev/null +++ b/src/Hazelcast.Net/Models/WanReplicationRef.cs @@ -0,0 +1,145 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System.Collections.Generic; +using Hazelcast.Configuration; +using Hazelcast.Core; +using Hazelcast.Serialization; + +namespace Hazelcast.Models; + +/// +/// Represents the configuration for a WAN target replication reference. +/// +public class WanReplicationRef : IIdentifiedDataSerializable +{ + private const string DEFAULT_MERGE_POLICY_CLASS_NAME = "PassThroughMergePolicy"; + + private bool _republishingEnabled = true; + private string _name; + private string _mergePolicyClassName = DEFAULT_MERGE_POLICY_CLASS_NAME; + private List _filters = new(); + + /// + /// Initializes a new instance of the class. + /// + public WanReplicationRef() + { } + + /// + /// Initializes a new instance of the class. + /// + public WanReplicationRef(WanReplicationRef other) + : this(other._name, other._mergePolicyClassName, other._filters, other._republishingEnabled) + { } + + /// + /// Initializes a new instance of the class. + /// + public WanReplicationRef(string name, string mergePolicyClassName, List filters, bool republishingEnabled) + { + _name = name; + _mergePolicyClassName = mergePolicyClassName; + _filters = filters; + _republishingEnabled = republishingEnabled; + } + + /// + /// Gets or sets the WAN replication reference name. + /// + public string Name + { + get => _name; + set => _name = value.ThrowIfNull(); + } + + /// + /// Gets or sets the merge policy class name. + /// + public string MergePolicyClassName + { + get => _mergePolicyClassName; + set => _mergePolicyClassName = value.ThrowIfNull(); + } + + /// + /// Adds the name of a class implementing the CacheWanEventFilter or + /// MapWanEventFilter for filtering outbound WAN replication events. + /// + /// The class name. + /// This instance. + public WanReplicationRef AddFilter(string filterClassName) + { + _filters.Add(filterClassName.ThrowIfNull()); + return this; + } + + /// + /// Gets or sets the list of names of classes implementing the CacheWanEventFilter or + /// MapWanEventFilter for filtering outbound WAN replication events. + /// + public List Filters + { + get => _filters; + set => _filters = value.ThrowIfNull(); + } + + /// + /// Whether incoming WAN events to this member should be republished + /// (forwarded) to this WAN replication reference. + /// + public bool RepublishingEnabled + { + get => _republishingEnabled; + set => _republishingEnabled = value; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.WanReplicationRef; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_name); + output.WriteString(_mergePolicyClassName); + output.WriteInt(_filters.Count); + foreach (var filter in _filters) { output.WriteString(filter); } + output.WriteBoolean(_republishingEnabled); + } + + /// + public void ReadData(IObjectDataInput input) + { + _name = input.ReadString(); + _mergePolicyClassName = input.ReadString(); + var count = input.ReadInt(); + for (var i = 0; i < count; i++) { _filters.Add(input.ReadString()); } + _republishingEnabled = input.ReadBoolean(); + } + + /// + public override string ToString() + { + return "WanReplicationRef{" + + "name='" + _name + '\'' + + ", mergePolicy='" + _mergePolicyClassName + '\'' + + ", filters='" + string.Join(",", _filters) + '\'' + + ", republishingEnabled='" + _republishingEnabled + + '\'' + + '}'; + } +} diff --git a/src/Hazelcast.Net/NearCaching/EvictionPolicy.cs b/src/Hazelcast.Net/NearCaching/EvictionPolicy.cs index 66afe6ad7d..5655e479bc 100644 --- a/src/Hazelcast.Net/NearCaching/EvictionPolicy.cs +++ b/src/Hazelcast.Net/NearCaching/EvictionPolicy.cs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +using Hazelcast.Core; + namespace Hazelcast.NearCaching { /// @@ -22,21 +24,21 @@ public enum EvictionPolicy /// /// No eviction policy. /// - None = 0, + [Enums.JavaName("NONE")] None = 0, /// /// Evict least-recently used entries first. /// - Lru, + [Enums.JavaName("LRU")] Lru, /// /// Evict least-frequently used entries first. /// - Lfu, + [Enums.JavaName("LFU")] Lfu, /// /// Evict random entries. /// - Random + [Enums.JavaName("RANDOM")] Random } } diff --git a/src/Hazelcast.Net/NearCaching/NearCacheBase.cs b/src/Hazelcast.Net/NearCaching/NearCacheBase.cs index 1b5e941fd8..aa0e497cca 100644 --- a/src/Hazelcast.Net/NearCaching/NearCacheBase.cs +++ b/src/Hazelcast.Net/NearCaching/NearCacheBase.cs @@ -65,11 +65,12 @@ protected NearCacheBase(string name, Cluster cluster, SerializationService seria _lastExpire = Clock.Never; - _maxSize = nearCacheOptions.MaxSize; _maxIdleMilliseconds = nearCacheOptions.MaxIdleSeconds * 1000; InMemoryFormat = nearCacheOptions.InMemoryFormat; _timeToLive = nearCacheOptions.TimeToLiveSeconds * 1000; - _evictionPolicy = nearCacheOptions.EvictionPolicy; + + _maxSize = nearCacheOptions.Eviction.Size; // nearCacheOptions.MaxSize; + _evictionPolicy = nearCacheOptions.Eviction.EvictionPolicy; // nearCacheOptions.EvictionPolicy; _evictionComparer = GetEvictionComparer(_evictionPolicy); _evictionPercentage = nearCacheOptions.EvictionPercentage; _cleanupInterval = nearCacheOptions.CleanupPeriodSeconds * 1000; diff --git a/src/Hazelcast.Net/NearCaching/NearCacheOptions.cs b/src/Hazelcast.Net/NearCaching/NearCacheOptions.cs index b0393684e5..7626a4b997 100644 --- a/src/Hazelcast.Net/NearCaching/NearCacheOptions.cs +++ b/src/Hazelcast.Net/NearCaching/NearCacheOptions.cs @@ -1,105 +1,292 @@ // Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. -// +// // Licensed 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. -using System.Text; +using System; +using System.IO; +using Hazelcast.Configuration; using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.NearCaching; +using Hazelcast.Serialization; -namespace Hazelcast.NearCaching +namespace Hazelcast.NearCaching; + +public class NearCacheOptions : IIdentifiedDataSerializable, INamedOptions { /// - /// Represents the options for one Near Cache. + /// Provides the default options values. /// - public class NearCacheOptions +#pragma warning disable CA1034 + public static class Defaults { /// - /// Initializes a new instance of the class. + /// Default in-memory format. /// - public NearCacheOptions() - { } + public const InMemoryFormat MemoryFormat = InMemoryFormat.Binary; /// - /// Initializes a new instance of the class. + /// Whether to serialize keys by default. /// - private NearCacheOptions(NearCacheOptions other) - { - EvictionPolicy = other.EvictionPolicy; - EvictionPercentage = other.EvictionPercentage; - InMemoryFormat = other.InMemoryFormat; - MaxIdleSeconds = other.MaxIdleSeconds; - CleanupPeriodSeconds = other.CleanupPeriodSeconds; - MaxSize = other.MaxSize; - TimeToLiveSeconds = other.TimeToLiveSeconds; - InvalidateOnChange = other.InvalidateOnChange; - } + public const bool SerializeKeys = false; /// - /// Gets or sets the eviction policy. + /// Whether to invalidate on change by default. /// - public EvictionPolicy EvictionPolicy { get; set; } = EvictionPolicy.Lru; + public const bool InvalidateOnChange = true; /// - /// Gets or sets the eviction percentage. + /// Default local update policy. /// - internal int EvictionPercentage { get; set; } = 20; + public const UpdatePolicy LocalUpdatePolicy = UpdatePolicy.Invalidate; /// - /// Gets or sets the in-memory format. + /// Default value of the time to live in seconds. /// - public InMemoryFormat InMemoryFormat { get; set; } = InMemoryFormat.Binary; + public const int TtlSeconds = 0; /// - /// Gets or sets the maximum number of seconds an entry can stay in the cache untouched before being evicted. + /// Default value of the maximum idle time for eviction in seconds. /// - /// - /// zero means forever. - /// - public int MaxIdleSeconds { get; set; } + public const int MaxIdleSeconds = 0; /// - /// Gets or sets the period of the cleanup. + /// Default name. /// - internal int CleanupPeriodSeconds { get; set; } = 5; + public const string Name = "default"; + } +#pragma warning restore CA1034 - /// - /// Gets or sets the maximum size of the cache (number of entries) before entries get evicted. - /// - public int MaxSize { get; set; } = int.MaxValue; + private string _name = Defaults.Name; + private bool _cacheLocalEntries; + private bool _serializeKeys = Defaults.SerializeKeys; + private bool _invalidateOnChange = Defaults.InvalidateOnChange; + private int _timeToLiveSeconds = Defaults.TtlSeconds; + private int _maxIdleSeconds = Defaults.MaxIdleSeconds; + private EvictionOptions _evictionConfig = new(); + private InMemoryFormat _inMemoryFormat = Defaults.MemoryFormat; + private UpdatePolicy _localUpdatePolicy = Defaults.LocalUpdatePolicy; + private NearCachePreloaderOptions _preloaderConfig = new(); - /// - /// Gets or sets the number of seconds entries stay in the cache before being evicted. - /// - public int TimeToLiveSeconds { get; set; } + /// + /// Initializes a new instance of the class. + /// + public NearCacheOptions() + { } - /// - /// Whether to invalidate entries when entries in the backing data structure are changed. - /// - /// - /// When true, the cache listens for cluster-wide changes and invalidate entries accordingly. - /// Changes to the local Hazelcast instance always invalidate the cache immediately. - /// - public bool InvalidateOnChange { get; set; } = true; - - /// - public override string ToString() - { - var text = new StringBuilder("NearCacheConfig{"); - return text.ToString(); - } + /// + /// Initializes a new instance of the class. + /// + public NearCacheOptions(string name) + { + Name = name; + } - /// - /// Clones the options. - /// - internal NearCacheOptions Clone() => new NearCacheOptions(this); + /// + /// Initializes a new instance of the class. + /// + public NearCacheOptions(NearCacheOptions config) + { + _name = config._name; + _cacheLocalEntries = config._cacheLocalEntries; + _serializeKeys = config._serializeKeys; + _invalidateOnChange = config._invalidateOnChange; + _timeToLiveSeconds = config._timeToLiveSeconds; + _maxIdleSeconds = config._maxIdleSeconds; + _evictionConfig = new EvictionOptions(config._evictionConfig); + _inMemoryFormat = config._inMemoryFormat; + _localUpdatePolicy = config._localUpdatePolicy; + _preloaderConfig = new NearCachePreloaderOptions(config._preloaderConfig); + } + + /// + /// Gets or sets the name of the cache. + /// + public string Name + { + get => _name; + set => _name = value.ThrowIfNull(); + } + + /// + /// Gets or sets the eviction policy. + /// + [Obsolete("Use Eviction.EvictionPolicy.", false)] + public EvictionPolicy EvictionPolicy + { + get => _evictionConfig.EvictionPolicy; + set => _evictionConfig.EvictionPolicy = value; + } + + /// + /// Gets or sets the maximum size of the cache (number of entries) before entries get evicted. + /// + [Obsolete("Use Eviction.Size.", false)] + public int MaxSize + { + get => _evictionConfig.Size; + set => _evictionConfig.Size = value; + } + + /// + /// Gets or sets the eviction percentage. + /// + /// + /// This is internal for now, corresponds to Java system properties. + /// + internal int EvictionPercentage { get; set; } = 20; + + /// + /// Gets or sets the period of the cleanup. + /// + /// + /// This is internal for now, corresponds to Java system properties. + /// + internal int CleanupPeriodSeconds { get; set; } = 5; + + /// + /// Gets or sets the in-memory format. + /// + public InMemoryFormat InMemoryFormat + { + get => _inMemoryFormat; + set => _inMemoryFormat = value.ThrowIfUndefined(); + } + + /// + /// Whether the key is stored in serialized format or by-reference. + /// + public bool SerializeKeys + { + get => _serializeKeys || _inMemoryFormat == InMemoryFormat.Native; + set => _serializeKeys = value; + } + + /// + /// Whether cache entries are invalidated when the entries in the backing data structure are changed (updated or removed). + /// + public bool InvalidateOnChange + { + get => _invalidateOnChange; + set => _invalidateOnChange = value; + } + + /// + /// Gets or sets the maximum number of seconds for each entry to stay in the Near Cache (time to live). + /// + public int TimeToLiveSeconds + { + get => _timeToLiveSeconds; + set => _timeToLiveSeconds = value.ThrowIfLessThanZero(); + } + + /// + /// Gets or sets the maximum number of seconds each entry can stay in the Near Cache as untouched (not-read). + /// + public int MaxIdleSeconds + { + get => _maxIdleSeconds; + set => _maxIdleSeconds = value.ThrowIfLessThanZero(); + } + + /// + /// Gets or sets the eviction configuration. + /// + public EvictionOptions Eviction + { + get => _evictionConfig; + set => _evictionConfig = value.ThrowIfNull(); + } + + /// + /// Whether local entries are also cached in the near cache. + /// + public bool CacheLocalEntries + { + get => _cacheLocalEntries; + set => _cacheLocalEntries = value; + } + + /// + /// Gets or sets the local update policy. + /// + public UpdatePolicy LocalUpdatePolicy + { + get => _localUpdatePolicy; + set => _localUpdatePolicy = value.ThrowIfUndefined(); + } + + /// + /// Gets or sets the pre-loader configuration. + /// + public NearCachePreloaderOptions Preloader + { + get => _preloaderConfig; + set => _preloaderConfig = value.ThrowIfNull(); + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.NearCacheConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteString(_name); + output.WriteInt(_timeToLiveSeconds); + output.WriteInt(_maxIdleSeconds); + output.WriteBoolean(_invalidateOnChange); + output.WriteBoolean(_cacheLocalEntries); + output.WriteInt((int)_inMemoryFormat); + output.WriteInt((int)_localUpdatePolicy); + output.WriteObject(_evictionConfig); + output.WriteObject(_preloaderConfig); + } + + /// + public void ReadData(IObjectDataInput input) + { + _name = input.ReadString(); + _timeToLiveSeconds = input.ReadInt(); + _maxIdleSeconds = input.ReadInt(); + _invalidateOnChange = input.ReadBoolean(); + _cacheLocalEntries = input.ReadBoolean(); + _inMemoryFormat = ((InMemoryFormat)input.ReadInt()).ThrowIfUndefined(); + _localUpdatePolicy = ((UpdatePolicy)input.ReadInt()).ThrowIfUndefined(); + _evictionConfig = input.ReadObject(); + _preloaderConfig = input.ReadObject(); + } + + /// + /// Clone. + /// + internal NearCacheOptions Clone() => new(this); + + /// + public override string ToString() + { + return "NearCacheConfig{" + + "name=" + _name + + ", inMemoryFormat=" + _inMemoryFormat + + ", invalidateOnChange=" + _invalidateOnChange + + ", timeToLiveSeconds=" + _timeToLiveSeconds + + ", maxIdleSeconds=" + _maxIdleSeconds + + ", evictionConfig=" + _evictionConfig + + ", cacheLocalEntries=" + _cacheLocalEntries + + ", localUpdatePolicy=" + _localUpdatePolicy + + ", preloaderConfig=" + _preloaderConfig.ToString() + + '}'; } -} +} \ No newline at end of file diff --git a/src/Hazelcast.Net/NearCaching/NearCachePreloaderOptions.cs b/src/Hazelcast.Net/NearCaching/NearCachePreloaderOptions.cs new file mode 100644 index 0000000000..3bba7dca8c --- /dev/null +++ b/src/Hazelcast.Net/NearCaching/NearCachePreloaderOptions.cs @@ -0,0 +1,168 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Serialization; +using System.IO; +using System; +using Hazelcast.Core; + +/* Unmerged change from project 'Hazelcast.Net (net7.0)' +Before: +using Hazelcast.Configuration; +After: +using Hazelcast.Configuration; +using Hazelcast; +using Hazelcast.Models; +using Hazelcast.NearCaching; +*/ +using Hazelcast.Configuration; + +namespace Hazelcast.NearCaching; + +/// +/// Represents a near cache pre-loader configuration. +/// +public class NearCachePreloaderOptions : IIdentifiedDataSerializable +{ + /// + /// Provides the default options values. + /// +#pragma warning disable CA1034 + public static class Defaults + { + /// + /// Gets the default initial delay for the Near Cache key storage. + /// + public const int StoreInitialDelaySeconds = 600; + + /// + /// Gets the default interval for the Near Cache key storage (in seconds). + /// + public const int StoreIntervalSeconds = 600; + } +#pragma warning restore CA1034 + + private bool _enabled; + private string _directory = ""; + private int _storeInitialDelaySeconds = Defaults.StoreInitialDelaySeconds; + private int _storeIntervalSeconds = Defaults.StoreIntervalSeconds; + + /// + /// Initializes a new instance of the . + /// + public NearCachePreloaderOptions() + { } + + /// + /// Initializes a new instance of the . + /// + public NearCachePreloaderOptions(NearCachePreloaderOptions nearCachePreloaderConfig) + : this(nearCachePreloaderConfig._enabled, nearCachePreloaderConfig._directory) + { + _storeInitialDelaySeconds = nearCachePreloaderConfig._storeInitialDelaySeconds; + _storeIntervalSeconds = nearCachePreloaderConfig._storeIntervalSeconds; + } + + public NearCachePreloaderOptions(string directory) + : this(true, directory) + { } + + public NearCachePreloaderOptions(bool enabled, string directory) + { + _enabled = enabled; + _directory = directory.ThrowIfNull(nameof(directory)); + } + + public bool Enabled + { + get => _enabled; + set => _enabled = value; + } + + public NearCachePreloaderOptions SetIsEnabled(bool enabled) + { + Enabled = enabled; + return this; + } + + public string Directory + { + get => _directory; + set => _directory = value.ThrowIfNull(); + } + + public NearCachePreloaderOptions SetDirectory(string directory) + { + Directory = directory; + return this; + } + public int StoreInitialDelaySeconds + { + get => _storeInitialDelaySeconds; + set => _storeInitialDelaySeconds = value.ThrowIfLessThanOrZero(); + } + + public NearCachePreloaderOptions SetStoreInitialDelaySeconds(int storeInitialDelaySeconds) + { + StoreInitialDelaySeconds = storeInitialDelaySeconds; + return this; + } + + public int StoreIntervalSeconds + { + get => _storeIntervalSeconds; + set => _storeIntervalSeconds = value.ThrowIfLessThanOrZero(); + } + + public NearCachePreloaderOptions SetStoreIntervalSeconds(int storeIntervalSeconds) + { + StoreIntervalSeconds = storeIntervalSeconds; + return this; + } + + /// + public int FactoryId => ConfigurationDataSerializerHook.FactoryIdConst; + + /// + public int ClassId => ConfigurationDataSerializerHook.NearCachePreloaderConfig; + + /// + public void WriteData(IObjectDataOutput output) + { + output.WriteBoolean(_enabled); + output.WriteString(_directory); + output.WriteInt(_storeInitialDelaySeconds); + output.WriteInt(_storeIntervalSeconds); + } + + /// + public void ReadData(IObjectDataInput input) + { + _enabled = input.ReadBoolean(); + _directory = input.ReadString(); + _storeInitialDelaySeconds = input.ReadInt(); + _storeIntervalSeconds = input.ReadInt(); + } + + /// + public override string ToString() + { + return "NearCachePreloaderConfig{" + + "enabled=" + _enabled + + ", directory=" + _directory + + ", storeInitialDelaySeconds=" + _storeInitialDelaySeconds + + ", storeIntervalSeconds=" + _storeIntervalSeconds + + '}'; + } +} diff --git a/src/Hazelcast.Net/NearCaching/UpdatePolicy.cs b/src/Hazelcast.Net/NearCaching/UpdatePolicy.cs new file mode 100644 index 0000000000..513ba49a4f --- /dev/null +++ b/src/Hazelcast.Net/NearCaching/UpdatePolicy.cs @@ -0,0 +1,33 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.NearCaching; + +/// +/// Specifies the local update policy. +/// +public enum UpdatePolicy +{ + /// + /// Local put and remove immediately invalidate the cache. + /// + [Enums.JavaName("INVALIDATE")] Invalidate, + + /// + /// Local remove immediately invalidates the cache, but local put adds new value to it. + /// + [Enums.JavaName("CACHE_ON_UPDATE")] CacheOnUpdate +} diff --git a/src/Hazelcast.Net/Polyfills/ZLib/CRC32.cs b/src/Hazelcast.Net/Polyfills/ZLib/CRC32.cs index 97593b9130..e47777dce1 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/CRC32.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/CRC32.cs @@ -47,7 +47,7 @@ namespace Ionic.Crc #if !NETCF [Interop.ClassInterface(Interop.ClassInterfaceType.AutoDispatch)] #endif - public class CRC32 + internal class CRC32 { /// /// Indicates the total number of bytes applied to the CRC. @@ -496,7 +496,7 @@ public void Reset() /// DotNetZip library. /// /// - public class CrcCalculatorStream : System.IO.Stream, System.IDisposable + internal class CrcCalculatorStream : System.IO.Stream, System.IDisposable { private static readonly Int64 UnsetLengthLimit = -99; diff --git a/src/Hazelcast.Net/Polyfills/ZLib/DeflateStream.cs b/src/Hazelcast.Net/Polyfills/ZLib/DeflateStream.cs index 05362d4168..df6d2ce9d3 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/DeflateStream.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/DeflateStream.cs @@ -63,7 +63,7 @@ namespace Ionic.Zlib /// /// /// - public class DeflateStream : System.IO.Stream + internal class DeflateStream : System.IO.Stream { internal ZlibBaseStream _baseStream; internal System.IO.Stream _innerStream; diff --git a/src/Hazelcast.Net/Polyfills/ZLib/GZipStream.cs b/src/Hazelcast.Net/Polyfills/ZLib/GZipStream.cs index 745e096395..38e855d1bd 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/GZipStream.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/GZipStream.cs @@ -81,7 +81,7 @@ namespace Ionic.Zlib /// /// /// - public class GZipStream : System.IO.Stream + internal class GZipStream : System.IO.Stream { // GZip format // source: http://tools.ietf.org/html/rfc1952 diff --git a/src/Hazelcast.Net/Polyfills/ZLib/Iso8859Dash1Encoding.cs b/src/Hazelcast.Net/Polyfills/ZLib/Iso8859Dash1Encoding.cs index b182de8111..29245fd0d4 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/Iso8859Dash1Encoding.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/Iso8859Dash1Encoding.cs @@ -9,7 +9,7 @@ namespace Ionic.Encoding /// for platforms that do not support it, for example on Silverlight or some /// Compact Framework platforms. /// - public class Iso8859Dash1Encoding : System.Text.Encoding + internal class Iso8859Dash1Encoding : System.Text.Encoding { /// /// Gets the name registered with the diff --git a/src/Hazelcast.Net/Polyfills/ZLib/ParallelDeflateOutputStream.cs b/src/Hazelcast.Net/Polyfills/ZLib/ParallelDeflateOutputStream.cs index f75141595e..09e0600365 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/ParallelDeflateOutputStream.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/ParallelDeflateOutputStream.cs @@ -98,7 +98,7 @@ public WorkItem(int size, /// /// /// - public class ParallelDeflateOutputStream : System.IO.Stream + internal class ParallelDeflateOutputStream : System.IO.Stream { private static readonly int IO_BUFFER_SIZE_DEFAULT = 64 * 1024; // 128k diff --git a/src/Hazelcast.Net/Polyfills/ZLib/Zlib.cs b/src/Hazelcast.Net/Polyfills/ZLib/Zlib.cs index dcfe72527b..288b27215a 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/Zlib.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/Zlib.cs @@ -100,7 +100,7 @@ namespace Ionic.Zlib /// /// The different FlushType values are useful when using a Deflate in a streaming application. /// - public enum FlushType + internal enum FlushType { /// No flush at all. None = 0, @@ -140,7 +140,7 @@ public enum FlushType /// /// The compression level to be used when using a DeflateStream or ZlibStream with CompressionMode.Compress. /// - public enum CompressionLevel + internal enum CompressionLevel { /// /// None means that the data will be simply stored, with no change at all. @@ -219,7 +219,7 @@ public enum CompressionLevel /// work better on different sorts of data. The strategy parameter can affect the compression /// ratio and the speed of compression but not the correctness of the compresssion. /// - public enum CompressionStrategy + internal enum CompressionStrategy { /// /// The default strategy is probably the best for normal data. @@ -246,7 +246,7 @@ public enum CompressionStrategy /// /// An enum to specify the direction of transcoding - whether to compress or decompress. /// - public enum CompressionMode + internal enum CompressionMode { /// /// Used to specify that the stream should compress the data. @@ -263,7 +263,7 @@ public enum CompressionMode /// A general purpose exception class for exceptions in the Zlib library. /// [Interop.GuidAttribute("ebc25cf6-9120-4283-b972-0e5520d0000E")] - public class ZlibException : System.Exception + internal class ZlibException : System.Exception { /// /// The ZlibException class captures exception information generated @@ -465,7 +465,7 @@ static StaticTree() /// /// /// - public sealed class Adler + internal sealed class Adler { // largest prime smaller than 65536 private static readonly uint BASE = 65521; diff --git a/src/Hazelcast.Net/Polyfills/ZLib/ZlibCodec.cs b/src/Hazelcast.Net/Polyfills/ZLib/ZlibCodec.cs index ab0abcf3d3..62f254609c 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/ZlibCodec.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/ZlibCodec.cs @@ -84,7 +84,7 @@ namespace Ionic.Zlib #if !NETCF [Interop.ClassInterface(Interop.ClassInterfaceType.AutoDispatch)] #endif - sealed public class ZlibCodec + sealed internal class ZlibCodec { /// /// The buffer from which data is taken. diff --git a/src/Hazelcast.Net/Polyfills/ZLib/ZlibConstants.cs b/src/Hazelcast.Net/Polyfills/ZLib/ZlibConstants.cs index 59ae7300aa..d015b7076b 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/ZlibConstants.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/ZlibConstants.cs @@ -68,7 +68,7 @@ namespace Ionic.Zlib /// /// A bunch of constants used in the Zlib interface. /// - public static class ZlibConstants + internal static class ZlibConstants { /// /// The maximum number of window bits for the Deflate algorithm. diff --git a/src/Hazelcast.Net/Polyfills/ZLib/ZlibStream.cs b/src/Hazelcast.Net/Polyfills/ZLib/ZlibStream.cs index 88ddca9d19..45871b2c21 100644 --- a/src/Hazelcast.Net/Polyfills/ZLib/ZlibStream.cs +++ b/src/Hazelcast.Net/Polyfills/ZLib/ZlibStream.cs @@ -68,7 +68,7 @@ namespace Ionic.Zlib /// /// /// - public class ZlibStream : System.IO.Stream + internal class ZlibStream : System.IO.Stream { internal ZlibBaseStream _baseStream; bool _disposed; diff --git a/src/Hazelcast.Net/Protocol/BuiltInCodecs/CustomTypeFactory.cs b/src/Hazelcast.Net/Protocol/BuiltInCodecs/CustomTypeFactory.cs index 06676db671..41c1154313 100644 --- a/src/Hazelcast.Net/Protocol/BuiltInCodecs/CustomTypeFactory.cs +++ b/src/Hazelcast.Net/Protocol/BuiltInCodecs/CustomTypeFactory.cs @@ -18,6 +18,7 @@ using Hazelcast.Core; using Hazelcast.Exceptions; using Hazelcast.Models; +using Hazelcast.NearCaching; using Hazelcast.Networking; using Hazelcast.Serialization; using Hazelcast.Serialization.Compact; @@ -70,8 +71,8 @@ internal static HazelcastJsonValue CreateHazelcastJsonValue(string value) public static IndexOptions CreateIndexConfig(string name, int indexType, List attributes, BitmapIndexOptions bitmapIndexOptions, bool bTreeIndexConfigExists, BTreeIndexOptions bTreeIndexConfig) { - var options = new IndexOptions(attributes) { Name = name, Type = (IndexType) indexType, BitmapIndexOptions = bitmapIndexOptions }; - if (bTreeIndexConfigExists) options.BTreeIndexOptions = bTreeIndexConfig; + var options = new IndexOptions(attributes) { Name = name, Type = (IndexType) indexType, BitmapIndex = bitmapIndexOptions }; + if (bTreeIndexConfigExists) options.BTreeIndex = bTreeIndexConfig; return options; } @@ -111,6 +112,40 @@ public static MemoryTierOptions CreateMemoryTierConfig(Capacity capacity) => new() { Capacity = capacity }; public static BTreeIndexOptions CreateBTreeIndexConfig(Capacity pageSize, MemoryTierOptions options) - => new() { PageSize = pageSize, MemoryTierOptions = options }; + => new() { PageSize = pageSize, MemoryTier = options }; + + public static DataPersistenceOptions CreateDataPersistenceConfig(bool enabled, bool fsync) + => new() {Enabled = enabled, Fsync = fsync}; + + public static DurationOptions CreateDurationConfig(long durationAmount, int timeUnit) + => new(durationAmount, (TimeUnit) timeUnit); + + public static MerkleTreeOptions CreateMerkleTreeConfig(bool enabled, int depth, bool isEnabledSetExists, bool enabledSet) + { + var config = new MerkleTreeOptions { Depth = depth }; + if (!isEnabledSetExists || enabledSet) config.Enabled = enabled; + return config; + } + + public static EventJournalOptions CreateEventJournalConfig(bool enabled, int capacity, int timeToLiveSeconds) + => new() {Enabled = enabled, Capacity = capacity, TimeToLiveSeconds = timeToLiveSeconds}; + + public static TieredStoreOptions CreateTieredStoreConfig(bool enabled, MemoryTierOptions memoryTierConfig, DiskTierOptions diskTierConfig) + => new() {Enabled = enabled, MemoryTier = memoryTierConfig, DiskTier = diskTierConfig}; + + public static HotRestartOptions CreateHotRestartConfig(bool enabled, bool fsync) + => new() {Enabled = enabled, Fsync = fsync}; + + public static NearCachePreloaderOptions CreateNearCachePreloaderConfig(bool enabled, string directory, int storeInitialDelaySeconds, int storeIntervalSeconds) + => new() { Enabled = enabled, Directory = directory, StoreInitialDelaySeconds = storeInitialDelaySeconds, StoreIntervalSeconds = storeIntervalSeconds}; + + public static TimedExpiryPolicyFactoryOptions CreateTimedExpiryPolicyFactoryConfig(int expiryPolicyType, DurationOptions durationConfig) + => new((ExpiryPolicyType) expiryPolicyType, durationConfig); + + public static CacheSimpleEntryListenerOptions CreateCacheSimpleEntryListenerConfig(bool oldValueRequired, bool synchronous, string cacheEntryListenerFactory, string cacheEntryEventFilterFactory) + => new() {OldValueRequired = oldValueRequired, Synchronous = synchronous, CacheEntryListenerFactory = cacheEntryListenerFactory, CacheEntryEventFilterFactory = cacheEntryEventFilterFactory}; + + public static DiskTierOptions CreateDiskTierConfig(bool enabled, string deviceName) + => new() {Enabled = enabled, DeviceName = deviceName}; } } diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongAddAndGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongAddAndGetCodec.cs index 1dfa5fd74b..039cf72ca3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongAddAndGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongAddAndGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongCompareAndSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongCompareAndSetCodec.cs index 8842c5e8f3..7a4a0005fe 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongCompareAndSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongCompareAndSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndAddCodec.cs index 6df39ebbc4..e551c79fc6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndSetCodec.cs index 1a0d088b8b..83d415863b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetAndSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetCodec.cs index 5ba5a646a6..13651661e8 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicLongGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefCompareAndSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefCompareAndSetCodec.cs index 0c8fe77a70..bee8d8722c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefCompareAndSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefCompareAndSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefContainsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefContainsCodec.cs index 0e3b379dd1..7cca07ef98 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefContainsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefContainsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefGetCodec.cs index 8d3a7a035b..a7fd4c43ca 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefSetCodec.cs index 1dd1eb361d..8ac4b2fb2d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/AtomicRefSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/AtomicRefSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPGroupCreateCPGroupCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPGroupCreateCPGroupCodec.cs index 3088170ccd..61b911e328 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPGroupCreateCPGroupCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPGroupCreateCPGroupCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPGroupDestroyCPObjectCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPGroupDestroyCPObjectCodec.cs index 34314cb2ea..a7379ea1ba 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPGroupDestroyCPObjectCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPGroupDestroyCPObjectCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPSessionCloseSessionCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPSessionCloseSessionCodec.cs index a889dea600..4fcec5d82e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPSessionCloseSessionCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPSessionCloseSessionCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPSessionCreateSessionCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPSessionCreateSessionCodec.cs index 33a0fc1ca9..5158d9da31 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPSessionCreateSessionCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPSessionCreateSessionCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPSessionGenerateThreadIdCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPSessionGenerateThreadIdCodec.cs index e64eec6b53..ee56d5e4e9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPSessionGenerateThreadIdCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPSessionGenerateThreadIdCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/CPSessionHeartbeatSessionCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/CPSessionHeartbeatSessionCodec.cs index a53e8d1d4f..5b34af46a9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/CPSessionHeartbeatSessionCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/CPSessionHeartbeatSessionCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientAddClusterViewListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientAddClusterViewListenerCodec.cs index 56ce798961..032ee8d80b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientAddClusterViewListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientAddClusterViewListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientAddDistributedObjectListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientAddDistributedObjectListenerCodec.cs index 10aeef0009..5e060ee949 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientAddDistributedObjectListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientAddDistributedObjectListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientAddPartitionLostListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientAddPartitionLostListenerCodec.cs index 12d5b38c96..40e7878654 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientAddPartitionLostListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientAddPartitionLostListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCodec.cs index 43e1bfaa5b..55c6ff8fd8 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCustomCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCustomCodec.cs index da0e652792..76672e0a7c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCustomCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientAuthenticationCustomCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxiesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxiesCodec.cs index 1aa04f9e9f..36b17344c1 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxiesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxiesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxyCodec.cs index 9421de29a1..da1930c4ef 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientCreateProxyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientDeployClassesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientDeployClassesCodec.cs index 92fc7c717f..ca33901c0a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientDeployClassesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientDeployClassesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientDestroyProxyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientDestroyProxyCodec.cs index 073fb90188..1c4f445650 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientDestroyProxyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientDestroyProxyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientFetchSchemaCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientFetchSchemaCodec.cs index 2dbc4fcdd3..26e8f85d2c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientFetchSchemaCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientFetchSchemaCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientGetDistributedObjectsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientGetDistributedObjectsCodec.cs index ec2c751b80..282a911529 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientGetDistributedObjectsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientGetDistributedObjectsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientLocalBackupListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientLocalBackupListenerCodec.cs index 52eb757b72..68df190c95 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientLocalBackupListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientLocalBackupListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientPingCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientPingCodec.cs index e424694d27..a0305dfe7f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientPingCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientPingCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientRemoveDistributedObjectListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientRemoveDistributedObjectListenerCodec.cs index e3d2a6e92d..177c71342e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientRemoveDistributedObjectListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientRemoveDistributedObjectListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientRemovePartitionLostListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientRemovePartitionLostListenerCodec.cs index e5718e8364..792e89e638 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientRemovePartitionLostListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientRemovePartitionLostListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientSendAllSchemasCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientSendAllSchemasCodec.cs index ca08ec1502..b9d6b4d6e5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientSendAllSchemasCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientSendAllSchemasCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientSendSchemaCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientSendSchemaCodec.cs index 23c3115223..78a811bd17 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientSendSchemaCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientSendSchemaCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientStatisticsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientStatisticsCodec.cs index fa5529404b..b1b3be1734 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientStatisticsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientStatisticsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ClientTriggerPartitionAssignmentCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ClientTriggerPartitionAssignmentCodec.cs index 0f3aab9872..f068d26206 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ClientTriggerPartitionAssignmentCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ClientTriggerPartitionAssignmentCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCacheConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCacheConfigCodec.cs new file mode 100644 index 0000000000..7d01d2d5f0 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCacheConfigCodec.cs @@ -0,0 +1,362 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new cache configuration to a running cluster. + /// If a cache configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddCacheConfigServerCodec +#else + internal static class DynamicConfigAddCacheConfigCodec +#endif + { + public const int RequestMessageType = 1773056; // 0x1B0E00 + public const int ResponseMessageType = 1773057; // 0x1B0E01 + private const int RequestStatisticsEnabledFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestManagementEnabledFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestReadThroughFieldOffset = RequestManagementEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestWriteThroughFieldOffset = RequestReadThroughFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestBackupCountFieldOffset = RequestWriteThroughFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestDisablePerEntryInvalidationEventsFieldOffset = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestDisablePerEntryInvalidationEventsFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// cache name + /// + public string Name { get; set; } + + /// + /// class name of key type + /// + public string KeyType { get; set; } + + /// + /// class name of value type + /// + public string ValueType { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// {@code true} to enable management interface on this cache or {@code false} + /// + public bool ManagementEnabled { get; set; } + + /// + /// {@code true} to enable read through from a {@code CacheLoader} + /// + public bool ReadThrough { get; set; } + + /// + /// {@code true} to enable write through to a {@code CacheWriter} + /// + public bool WriteThrough { get; set; } + + /// + /// name of cache loader factory class, if one is configured + /// + public string CacheLoaderFactory { get; set; } + + /// + /// name of cache writer factory class, if one is configured + /// + public string CacheWriterFactory { get; set; } + + /// + /// Factory name of cache loader factory class, if one is configured + /// + public string CacheLoader { get; set; } + + /// + /// Factory name of cache writer factory class, if one is configured + /// + public string CacheWriter { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// data type used to store entries. Valid values are {@code BINARY}, + /// {@code OBJECT} and {@code NATIVE}. + /// + public string InMemoryFormat { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum + /// number of members required in the cluster for the cache to remain functional. + /// When {@code null}, split brain protection does not apply to this cache's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// name of a class implementing SplitBrainMergePolicy + /// that handles merging of values for this cache while recovering from + /// network partitioning + /// + public string MergePolicy { get; set; } + + /// + /// number of entries to be sent in a merge operation + /// + public int MergeBatchSize { get; set; } + + /// + /// when {@code true} disables invalidation events for per entry but + /// full-flush invalidation events are still enabled. + /// + public bool DisablePerEntryInvalidationEvents { get; set; } + + /// + /// partition lost listener configurations + /// + public ICollection PartitionLostListenerConfigs { get; set; } + + /// + /// expiry policy factory class name. When configuring an expiry policy, + /// either this or {@ode timedExpiryPolicyFactoryConfig} should be configured. + /// + public string ExpiryPolicyFactoryClassName { get; set; } + + /// + /// expiry policy factory with duration configuration + /// + public Hazelcast.Models.TimedExpiryPolicyFactoryOptions TimedExpiryPolicyFactoryConfig { get; set; } + + /// + /// cache entry listeners configuration + /// + public ICollection CacheEntryListeners { get; set; } + + /// + /// cache eviction configuration + /// + public Hazelcast.Protocol.Models.EvictionConfigHolder EvictionConfig { get; set; } + + /// + /// reference to an existing WAN replication configuration + /// + public Hazelcast.Models.WanReplicationRef WanReplicationRef { get; set; } + + /// + /// Event Journal configuration + /// + public Hazelcast.Models.EventJournalOptions EventJournalConfig { get; set; } + + /// + /// hot restart configuration + /// + public Hazelcast.Models.HotRestartOptions HotRestartConfig { get; set; } + + /// + /// merkle tree configuration + /// + public Hazelcast.Models.MerkleTreeOptions MerkleTreeConfig { get; set; } + + /// + /// Data persistence configuration + /// + public Hazelcast.Models.DataPersistenceOptions DataPersistenceConfig { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the merkleTreeConfig is received from the client, false otherwise. + /// If this is false, merkleTreeConfig has the default value for its type. + /// + public bool IsMerkleTreeConfigExists { get; set; } + + /// + /// true if the dataPersistenceConfig is received from the client, false otherwise. + /// If this is false, dataPersistenceConfig has the default value for its type. + /// + public bool IsDataPersistenceConfigExists { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, string keyType, string valueType, bool statisticsEnabled, bool managementEnabled, bool readThrough, bool writeThrough, string cacheLoaderFactory, string cacheWriterFactory, string cacheLoader, string cacheWriter, int backupCount, int asyncBackupCount, string inMemoryFormat, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, bool disablePerEntryInvalidationEvents, ICollection partitionLostListenerConfigs, string expiryPolicyFactoryClassName, Hazelcast.Models.TimedExpiryPolicyFactoryOptions timedExpiryPolicyFactoryConfig, ICollection cacheEntryListeners, Hazelcast.Protocol.Models.EvictionConfigHolder evictionConfig, Hazelcast.Models.WanReplicationRef wanReplicationRef, Hazelcast.Models.EventJournalOptions eventJournalConfig, Hazelcast.Models.HotRestartOptions hotRestartConfig, Hazelcast.Models.MerkleTreeOptions merkleTreeConfig, Hazelcast.Models.DataPersistenceOptions dataPersistenceConfig, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddCacheConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteBoolL(RequestManagementEnabledFieldOffset, managementEnabled); + initialFrame.Bytes.WriteBoolL(RequestReadThroughFieldOffset, readThrough); + initialFrame.Bytes.WriteBoolL(RequestWriteThroughFieldOffset, writeThrough); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + initialFrame.Bytes.WriteBoolL(RequestDisablePerEntryInvalidationEventsFieldOffset, disablePerEntryInvalidationEvents); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, keyType, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, valueType, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, cacheLoaderFactory, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, cacheWriterFactory, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, cacheLoader, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, cacheWriter, StringCodec.Encode); + StringCodec.Encode(clientMessage, inMemoryFormat); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, mergePolicy, StringCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, partitionLostListenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, expiryPolicyFactoryClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, timedExpiryPolicyFactoryConfig, TimedExpiryPolicyFactoryConfigCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, cacheEntryListeners, CacheSimpleEntryListenerConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, evictionConfig, EvictionConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, wanReplicationRef, WanReplicationRefCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, eventJournalConfig, EventJournalConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, hotRestartConfig, HotRestartConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, merkleTreeConfig, MerkleTreeConfigCodec.Encode); + DataPersistenceConfigCodec.Encode(clientMessage, dataPersistenceConfig); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.ManagementEnabled = initialFrame.Bytes.ReadBoolL(RequestManagementEnabledFieldOffset); + request.ReadThrough = initialFrame.Bytes.ReadBoolL(RequestReadThroughFieldOffset); + request.WriteThrough = initialFrame.Bytes.ReadBoolL(RequestWriteThroughFieldOffset); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.DisablePerEntryInvalidationEvents = initialFrame.Bytes.ReadBoolL(RequestDisablePerEntryInvalidationEventsFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.KeyType = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.ValueType = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.CacheLoaderFactory = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.CacheWriterFactory = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.CacheLoader = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.CacheWriter = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.InMemoryFormat = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.PartitionLostListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.ExpiryPolicyFactoryClassName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.TimedExpiryPolicyFactoryConfig = CodecUtil.DecodeNullable(iterator, TimedExpiryPolicyFactoryConfigCodec.Decode); + request.CacheEntryListeners = ListMultiFrameCodec.DecodeNullable(iterator, CacheSimpleEntryListenerConfigCodec.Decode); + request.EvictionConfig = CodecUtil.DecodeNullable(iterator, EvictionConfigHolderCodec.Decode); + request.WanReplicationRef = CodecUtil.DecodeNullable(iterator, WanReplicationRefCodec.Decode); + request.EventJournalConfig = CodecUtil.DecodeNullable(iterator, EventJournalConfigCodec.Decode); + request.HotRestartConfig = CodecUtil.DecodeNullable(iterator, HotRestartConfigCodec.Decode); + if (iterator.Current?.Next != null) + { + request.MerkleTreeConfig = CodecUtil.DecodeNullable(iterator, MerkleTreeConfigCodec.Decode); + request.IsMerkleTreeConfigExists = true; + } + else request.IsMerkleTreeConfigExists = false; + if (iterator.Current?.Next != null) + { + request.DataPersistenceConfig = DataPersistenceConfigCodec.Decode(iterator); + request.IsDataPersistenceConfigExists = true; + } + else request.IsDataPersistenceConfigExists = false; + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCardinalityEstimatorConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCardinalityEstimatorConfigCodec.cs new file mode 100644 index 0000000000..5f4427211a --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddCardinalityEstimatorConfigCodec.cs @@ -0,0 +1,159 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new cardinality estimator configuration to a running cluster. + /// If a cardinality estimator configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddCardinalityEstimatorConfigServerCodec +#else + internal static class DynamicConfigAddCardinalityEstimatorConfigCodec +#endif + { + public const int RequestMessageType = 1770240; // 0x1B0300 + public const int ResponseMessageType = 1770241; // 0x1B0301 + private const int RequestBackupCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of the cardinality estimator configuration + /// + public string Name { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int backupCount, int asyncBackupCount, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddCardinalityEstimatorConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDataConnectionConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDataConnectionConfigCodec.cs new file mode 100644 index 0000000000..72ee467e5c --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDataConnectionConfigCodec.cs @@ -0,0 +1,145 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a data connection configuration. + /// If a data connection configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddDataConnectionConfigServerCodec +#else + internal static class DynamicConfigAddDataConnectionConfigCodec +#endif + { + public const int RequestMessageType = 1773824; // 0x1B1100 + public const int ResponseMessageType = 1773825; // 0x1B1101 + private const int RequestSharedFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestSharedFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// Name of this data connection, must be unique. + /// + public string Name { get; set; } + + /// + /// Type of the data connection as specified in the DataConnectionRegistration. + /// + public string Type { get; set; } + + /// + /// {@code true} if an instance of the data connection will be shared. + /// Depending on the implementation of the data connection the shared instance may be + /// single a thread-safe instance, or not thread-safe, but a pooled instance. + /// {@code false} when on each usage a new instance of the underlying resource + /// should be created. + /// The default is {@code true}. + /// + public bool Shared { get; set; } + + /// + /// Properties of the data connection configuration. + /// + public IDictionary Properties { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, string type, bool shared, IDictionary properties) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddDataConnectionConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteBoolL(RequestSharedFieldOffset, shared); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + StringCodec.Encode(clientMessage, type); + MapCodec.Encode(clientMessage, properties, StringCodec.Encode, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.Shared = initialFrame.Bytes.ReadBoolL(RequestSharedFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.Type = StringCodec.Decode(iterator); + request.Properties = MapCodec.Decode(iterator, StringCodec.Decode, StringCodec.Decode); + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDurableExecutorConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDurableExecutorConfigCodec.cs new file mode 100644 index 0000000000..f3c94983b6 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddDurableExecutorConfigCodec.cs @@ -0,0 +1,188 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new durable executor configuration to a running cluster. + /// If a durable executor configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddDurableExecutorConfigServerCodec +#else + internal static class DynamicConfigAddDurableExecutorConfigCodec +#endif + { + public const int RequestMessageType = 1771776; // 0x1B0900 + public const int ResponseMessageType = 1771777; // 0x1B0901 + private const int RequestPoolSizeFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestDurabilityFieldOffset = RequestPoolSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestCapacityFieldOffset = RequestDurabilityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestCapacityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// durable executor name + /// + public string Name { get; set; } + + /// + /// executor thread pool size + /// + public int PoolSize { get; set; } + + /// + /// executor's durability + /// + public int Durability { get; set; } + + /// + /// capacity of executor tasks per partition + /// + public int Capacity { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the statisticsEnabled is received from the client, false otherwise. + /// If this is false, statisticsEnabled has the default value for its type. + /// + public bool IsStatisticsEnabledExists { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int poolSize, int durability, int capacity, string splitBrainProtectionName, bool statisticsEnabled, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddDurableExecutorConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestPoolSizeFieldOffset, poolSize); + initialFrame.Bytes.WriteIntL(RequestDurabilityFieldOffset, durability); + initialFrame.Bytes.WriteIntL(RequestCapacityFieldOffset, capacity); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.PoolSize = initialFrame.Bytes.ReadIntL(RequestPoolSizeFieldOffset); + request.Durability = initialFrame.Bytes.ReadIntL(RequestDurabilityFieldOffset); + request.Capacity = initialFrame.Bytes.ReadIntL(RequestCapacityFieldOffset); + if (initialFrame.Bytes.Length >= RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool) + { + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.IsStatisticsEnabledExists = true; + } + else request.IsStatisticsEnabledExists = false; + request.Name = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddExecutorConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddExecutorConfigCodec.cs new file mode 100644 index 0000000000..cfa00ef955 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddExecutorConfigCodec.cs @@ -0,0 +1,169 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new executor configuration to a running cluster. + /// If an executor configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddExecutorConfigServerCodec +#else + internal static class DynamicConfigAddExecutorConfigCodec +#endif + { + public const int RequestMessageType = 1771520; // 0x1B0800 + public const int ResponseMessageType = 1771521; // 0x1B0801 + private const int RequestPoolSizeFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestQueueCapacityFieldOffset = RequestPoolSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestQueueCapacityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// executor's name + /// + public string Name { get; set; } + + /// + /// executor thread pool size + /// + public int PoolSize { get; set; } + + /// + /// capacity of executor queue. A value of {@code 0} implies {@link Integer#MAX_VALUE} + /// + public int QueueCapacity { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int poolSize, int queueCapacity, bool statisticsEnabled, string splitBrainProtectionName, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddExecutorConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestPoolSizeFieldOffset, poolSize); + initialFrame.Bytes.WriteIntL(RequestQueueCapacityFieldOffset, queueCapacity); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.PoolSize = initialFrame.Bytes.ReadIntL(RequestPoolSizeFieldOffset); + request.QueueCapacity = initialFrame.Bytes.ReadIntL(RequestQueueCapacityFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddFlakeIdGeneratorConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddFlakeIdGeneratorConfigCodec.cs new file mode 100644 index 0000000000..9d16b382cb --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddFlakeIdGeneratorConfigCodec.cs @@ -0,0 +1,182 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new flake ID generator configuration to a running cluster. + /// If a flake ID generator configuration for the same name already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddFlakeIdGeneratorConfigServerCodec +#else + internal static class DynamicConfigAddFlakeIdGeneratorConfigCodec +#endif + { + public const int RequestMessageType = 1773312; // 0x1B0F00 + public const int ResponseMessageType = 1773313; // 0x1B0F01 + private const int RequestPrefetchCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestPrefetchValidityFieldOffset = RequestPrefetchCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestPrefetchValidityFieldOffset + BytesExtensions.SizeOfLong; + private const int RequestNodeIdOffsetFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestEpochStartFieldOffset = RequestNodeIdOffsetFieldOffset + BytesExtensions.SizeOfLong; + private const int RequestBitsSequenceFieldOffset = RequestEpochStartFieldOffset + BytesExtensions.SizeOfLong; + private const int RequestBitsNodeIdFieldOffset = RequestBitsSequenceFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestAllowedFutureMillisFieldOffset = RequestBitsNodeIdFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestAllowedFutureMillisFieldOffset + BytesExtensions.SizeOfLong; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of {@code FlakeIdGenerator} + /// + public string Name { get; set; } + + /// + /// how many IDs are pre-fetched on the background when one call to {@code newId()} is made + /// + public int PrefetchCount { get; set; } + + /// + /// for how long the pre-fetched IDs can be used + /// + public long PrefetchValidity { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// Offset that will be added to the node id assigned to the cluster members for this generator. + /// + public long NodeIdOffset { get; set; } + + /// + /// offset of timestamp component in milliseconds + /// + public long EpochStart { get; set; } + + /// + /// bit length of sequence component + /// + public int BitsSequence { get; set; } + + /// + /// bit length of node id component + /// + public int BitsNodeId { get; set; } + + /// + /// how far to the future is it allowed to go to generate IDs + /// + public long AllowedFutureMillis { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int prefetchCount, long prefetchValidity, bool statisticsEnabled, long nodeIdOffset, long epochStart, int bitsSequence, int bitsNodeId, long allowedFutureMillis) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddFlakeIdGeneratorConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestPrefetchCountFieldOffset, prefetchCount); + initialFrame.Bytes.WriteLongL(RequestPrefetchValidityFieldOffset, prefetchValidity); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteLongL(RequestNodeIdOffsetFieldOffset, nodeIdOffset); + initialFrame.Bytes.WriteLongL(RequestEpochStartFieldOffset, epochStart); + initialFrame.Bytes.WriteIntL(RequestBitsSequenceFieldOffset, bitsSequence); + initialFrame.Bytes.WriteIntL(RequestBitsNodeIdFieldOffset, bitsNodeId); + initialFrame.Bytes.WriteLongL(RequestAllowedFutureMillisFieldOffset, allowedFutureMillis); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.PrefetchCount = initialFrame.Bytes.ReadIntL(RequestPrefetchCountFieldOffset); + request.PrefetchValidity = initialFrame.Bytes.ReadLongL(RequestPrefetchValidityFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.NodeIdOffset = initialFrame.Bytes.ReadLongL(RequestNodeIdOffsetFieldOffset); + request.EpochStart = initialFrame.Bytes.ReadLongL(RequestEpochStartFieldOffset); + request.BitsSequence = initialFrame.Bytes.ReadIntL(RequestBitsSequenceFieldOffset); + request.BitsNodeId = initialFrame.Bytes.ReadIntL(RequestBitsNodeIdFieldOffset); + request.AllowedFutureMillis = initialFrame.Bytes.ReadLongL(RequestAllowedFutureMillisFieldOffset); + request.Name = StringCodec.Decode(iterator); + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddListConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddListConfigCodec.cs new file mode 100644 index 0000000000..a573841bf0 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddListConfigCodec.cs @@ -0,0 +1,200 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new list configuration to a running cluster. + /// If a list configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddListConfigServerCodec +#else + internal static class DynamicConfigAddListConfigCodec +#endif + { + public const int RequestMessageType = 1770496; // 0x1B0400 + public const int ResponseMessageType = 1770497; // 0x1B0401 + private const int RequestBackupCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMaxSizeFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestMaxSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// list's name + /// + public string Name { get; set; } + + /// + /// item listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// maximum size of the list + /// + public int MaxSize { get; set; } + + /// + /// {@code true} to enable gathering of statistics on the list, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, ICollection listenerConfigs, int backupCount, int asyncBackupCount, int maxSize, bool statisticsEnabled, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddListConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestMaxSizeFieldOffset, maxSize); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.MaxSize = initialFrame.Bytes.ReadIntL(RequestMaxSizeFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMapConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMapConfigCodec.cs new file mode 100644 index 0000000000..2c1e64029d --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMapConfigCodec.cs @@ -0,0 +1,409 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new map configuration to a running cluster. + /// If a map configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddMapConfigServerCodec +#else + internal static class DynamicConfigAddMapConfigCodec +#endif + { + public const int RequestMessageType = 1772544; // 0x1B0C00 + public const int ResponseMessageType = 1772545; // 0x1B0C01 + private const int RequestBackupCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestTimeToLiveSecondsFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMaxIdleSecondsFieldOffset = RequestTimeToLiveSecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestReadBackupDataFieldOffset = RequestMaxIdleSecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestReadBackupDataFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestStatisticsEnabledFieldOffset = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMetadataPolicyFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestPerEntryStatsEnabledFieldOffset = RequestMetadataPolicyFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestPerEntryStatsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of the map + /// + public string Name { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// maximum number of seconds for each entry to stay in the map. + /// + public int TimeToLiveSeconds { get; set; } + + /// + /// maximum number of seconds for each entry to stay idle in the map + /// + public int MaxIdleSeconds { get; set; } + + /// + /// map eviction configuration + /// + public Hazelcast.Protocol.Models.EvictionConfigHolder EvictionConfig { get; set; } + + /// + /// {@code true} to enable reading local backup entries, {@code false} otherwise + /// + public bool ReadBackupData { get; set; } + + /// + /// control caching of de-serialized values. Valid values are {@code NEVER} + /// (Never cache de-serialized object), {@code INDEX_ONLY} (Cache values only + /// when they are inserted into an index) and {@code ALWAYS} (Always cache + /// de-serialized values + /// + public string CacheDeserializedValues { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation + /// + public int MergeBatchSize { get; set; } + + /// + /// data type used to store entries. Valid values are {@code BINARY}, + /// {@code OBJECT} and {@code NATIVE}. + /// + public string InMemoryFormat { get; set; } + + /// + /// entry listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// partition lost listener configurations + /// + public ICollection PartitionLostListenerConfigs { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum + /// number of members required in the cluster for the map to remain functional. + /// When {@code null}, split brain protection does not apply to this map's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// configuration of backing map store or {@code null} for none + /// + public Hazelcast.Protocol.Models.MapStoreConfigHolder MapStoreConfig { get; set; } + + /// + /// configuration of near cache or {@code null} for none + /// + public Hazelcast.Protocol.Models.NearCacheConfigHolder NearCacheConfig { get; set; } + + /// + /// reference to an existing WAN replication configuration + /// + public Hazelcast.Models.WanReplicationRef WanReplicationRef { get; set; } + + /// + /// index configurations + /// + public IList IndexConfigs { get; set; } + + /// + /// map attributes + /// + public ICollection AttributeConfigs { get; set; } + + /// + /// configurations for query caches on this map + /// + public ICollection QueryCacheConfigs { get; set; } + + /// + /// name of class implementing {@code com.hazelcast.core.PartitioningStrategy} + /// or {@code null} + /// + public string PartitioningStrategyClassName { get; set; } + + /// + /// a serialized instance of a partitioning strategy + /// + public IData PartitioningStrategyImplementation { get; set; } + + /// + /// hot restart configuration + /// + public Hazelcast.Models.HotRestartOptions HotRestartConfig { get; set; } + + /// + /// event journal configuration + /// + public Hazelcast.Models.EventJournalOptions EventJournalConfig { get; set; } + + /// + /// merkle tree configuration + /// + public Hazelcast.Models.MerkleTreeOptions MerkleTreeConfig { get; set; } + + /// + /// metadata policy configuration for the supported data types. Valid values + /// are {@code CREATE_ON_UPDATE} and {@code OFF} + /// + public int MetadataPolicy { get; set; } + + /// + /// {@code true} to enable entry level statistics for the entries of this map. + /// otherwise {@code false}. Default value is {@code false} + /// + public bool PerEntryStatsEnabled { get; set; } + + /// + /// Data persistence configuration + /// + public Hazelcast.Models.DataPersistenceOptions DataPersistenceConfig { get; set; } + + /// + /// Tiered-Store configuration + /// + public Hazelcast.Models.TieredStoreOptions TieredStoreConfig { get; set; } + + /// + /// List of attributes used for creating AttributePartitioningStrategy. + /// + public ICollection PartitioningAttributeConfigs { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the perEntryStatsEnabled is received from the client, false otherwise. + /// If this is false, perEntryStatsEnabled has the default value for its type. + /// + public bool IsPerEntryStatsEnabledExists { get; set; } + + /// + /// true if the dataPersistenceConfig is received from the client, false otherwise. + /// If this is false, dataPersistenceConfig has the default value for its type. + /// + public bool IsDataPersistenceConfigExists { get; set; } + + /// + /// true if the tieredStoreConfig is received from the client, false otherwise. + /// If this is false, tieredStoreConfig has the default value for its type. + /// + public bool IsTieredStoreConfigExists { get; set; } + + /// + /// true if the partitioningAttributeConfigs is received from the client, false otherwise. + /// If this is false, partitioningAttributeConfigs has the default value for its type. + /// + public bool IsPartitioningAttributeConfigsExists { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int backupCount, int asyncBackupCount, int timeToLiveSeconds, int maxIdleSeconds, Hazelcast.Protocol.Models.EvictionConfigHolder evictionConfig, bool readBackupData, string cacheDeserializedValues, string mergePolicy, int mergeBatchSize, string inMemoryFormat, ICollection listenerConfigs, ICollection partitionLostListenerConfigs, bool statisticsEnabled, string splitBrainProtectionName, Hazelcast.Protocol.Models.MapStoreConfigHolder mapStoreConfig, Hazelcast.Protocol.Models.NearCacheConfigHolder nearCacheConfig, Hazelcast.Models.WanReplicationRef wanReplicationRef, ICollection indexConfigs, ICollection attributeConfigs, ICollection queryCacheConfigs, string partitioningStrategyClassName, IData partitioningStrategyImplementation, Hazelcast.Models.HotRestartOptions hotRestartConfig, Hazelcast.Models.EventJournalOptions eventJournalConfig, Hazelcast.Models.MerkleTreeOptions merkleTreeConfig, int metadataPolicy, bool perEntryStatsEnabled, Hazelcast.Models.DataPersistenceOptions dataPersistenceConfig, Hazelcast.Models.TieredStoreOptions tieredStoreConfig, ICollection partitioningAttributeConfigs, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddMapConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestTimeToLiveSecondsFieldOffset, timeToLiveSeconds); + initialFrame.Bytes.WriteIntL(RequestMaxIdleSecondsFieldOffset, maxIdleSeconds); + initialFrame.Bytes.WriteBoolL(RequestReadBackupDataFieldOffset, readBackupData); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteIntL(RequestMetadataPolicyFieldOffset, metadataPolicy); + initialFrame.Bytes.WriteBoolL(RequestPerEntryStatsEnabledFieldOffset, perEntryStatsEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, evictionConfig, EvictionConfigHolderCodec.Encode); + StringCodec.Encode(clientMessage, cacheDeserializedValues); + StringCodec.Encode(clientMessage, mergePolicy); + StringCodec.Encode(clientMessage, inMemoryFormat); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, partitionLostListenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, mapStoreConfig, MapStoreConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, nearCacheConfig, NearCacheConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, wanReplicationRef, WanReplicationRefCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, indexConfigs, IndexConfigCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, attributeConfigs, AttributeConfigCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, queryCacheConfigs, QueryCacheConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, partitioningStrategyClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, partitioningStrategyImplementation, DataCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, hotRestartConfig, HotRestartConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, eventJournalConfig, EventJournalConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, merkleTreeConfig, MerkleTreeConfigCodec.Encode); + DataPersistenceConfigCodec.Encode(clientMessage, dataPersistenceConfig); + TieredStoreConfigCodec.Encode(clientMessage, tieredStoreConfig); + ListMultiFrameCodec.EncodeNullable(clientMessage, partitioningAttributeConfigs, PartitioningAttributeConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.TimeToLiveSeconds = initialFrame.Bytes.ReadIntL(RequestTimeToLiveSecondsFieldOffset); + request.MaxIdleSeconds = initialFrame.Bytes.ReadIntL(RequestMaxIdleSecondsFieldOffset); + request.ReadBackupData = initialFrame.Bytes.ReadBoolL(RequestReadBackupDataFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MetadataPolicy = initialFrame.Bytes.ReadIntL(RequestMetadataPolicyFieldOffset); + if (initialFrame.Bytes.Length >= RequestPerEntryStatsEnabledFieldOffset + BytesExtensions.SizeOfBool) + { + request.PerEntryStatsEnabled = initialFrame.Bytes.ReadBoolL(RequestPerEntryStatsEnabledFieldOffset); + request.IsPerEntryStatsEnabledExists = true; + } + else request.IsPerEntryStatsEnabledExists = false; + request.Name = StringCodec.Decode(iterator); + request.EvictionConfig = CodecUtil.DecodeNullable(iterator, EvictionConfigHolderCodec.Decode); + request.CacheDeserializedValues = StringCodec.Decode(iterator); + request.MergePolicy = StringCodec.Decode(iterator); + request.InMemoryFormat = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.PartitionLostListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MapStoreConfig = CodecUtil.DecodeNullable(iterator, MapStoreConfigHolderCodec.Decode); + request.NearCacheConfig = CodecUtil.DecodeNullable(iterator, NearCacheConfigHolderCodec.Decode); + request.WanReplicationRef = CodecUtil.DecodeNullable(iterator, WanReplicationRefCodec.Decode); + request.IndexConfigs = ListMultiFrameCodec.DecodeNullable(iterator, IndexConfigCodec.Decode); + request.AttributeConfigs = ListMultiFrameCodec.DecodeNullable(iterator, AttributeConfigCodec.Decode); + request.QueryCacheConfigs = ListMultiFrameCodec.DecodeNullable(iterator, QueryCacheConfigHolderCodec.Decode); + request.PartitioningStrategyClassName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.PartitioningStrategyImplementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + request.HotRestartConfig = CodecUtil.DecodeNullable(iterator, HotRestartConfigCodec.Decode); + request.EventJournalConfig = CodecUtil.DecodeNullable(iterator, EventJournalConfigCodec.Decode); + request.MerkleTreeConfig = CodecUtil.DecodeNullable(iterator, MerkleTreeConfigCodec.Decode); + if (iterator.Current?.Next != null) + { + request.DataPersistenceConfig = DataPersistenceConfigCodec.Decode(iterator); + request.IsDataPersistenceConfigExists = true; + } + else request.IsDataPersistenceConfigExists = false; + if (iterator.Current?.Next != null) + { + request.TieredStoreConfig = TieredStoreConfigCodec.Decode(iterator); + request.IsTieredStoreConfigExists = true; + } + else request.IsTieredStoreConfigExists = false; + if (iterator.Current?.Next != null) + { + request.PartitioningAttributeConfigs = ListMultiFrameCodec.DecodeNullable(iterator, PartitioningAttributeConfigCodec.Decode); + request.IsPartitioningAttributeConfigsExists = true; + } + else request.IsPartitioningAttributeConfigsExists = false; + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMultiMapConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMultiMapConfigCodec.cs new file mode 100644 index 0000000000..351f61933a --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddMultiMapConfigCodec.cs @@ -0,0 +1,208 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new multimap config to a running cluster. + /// If a multimap configuration with the given {@code name} already exists, then + /// the new multimap config is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddMultiMapConfigServerCodec +#else + internal static class DynamicConfigAddMultiMapConfigCodec +#endif + { + public const int RequestMessageType = 1769728; // 0x1B0100 + public const int ResponseMessageType = 1769729; // 0x1B0101 + private const int RequestBinaryFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestBackupCountFieldOffset = RequestBinaryFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// multimap configuration name + /// + public string Name { get; set; } + + /// + /// value collection type. Valid values are SET and LIST. + /// + public string CollectionType { get; set; } + + /// + /// entry listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// {@code true} to store values in {@code BINARY} format or {@code false} to store + /// values in {@code OBJECT} format. + /// + public bool Binary { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// set to {@code true} to enable statistics on this multimap configuration + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, string collectionType, ICollection listenerConfigs, bool binary, int backupCount, int asyncBackupCount, bool statisticsEnabled, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddMultiMapConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteBoolL(RequestBinaryFieldOffset, binary); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + StringCodec.Encode(clientMessage, collectionType); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.Binary = initialFrame.Bytes.ReadBoolL(RequestBinaryFieldOffset); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.CollectionType = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddPNCounterConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddPNCounterConfigCodec.cs new file mode 100644 index 0000000000..42de5c8224 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddPNCounterConfigCodec.cs @@ -0,0 +1,143 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new CRDT PN counter configuration to a running cluster. + /// If a PN counter configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddPNCounterConfigServerCodec +#else + internal static class DynamicConfigAddPNCounterConfigCodec +#endif + { + public const int RequestMessageType = 1773568; // 0x1B1000 + public const int ResponseMessageType = 1773569; // 0x1B1001 + private const int RequestReplicaCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestReplicaCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of the CRDT PN counter configuration + /// + public string Name { get; set; } + + /// + /// number of replicas on which the CRDT state is kept + /// + public int ReplicaCount { get; set; } + + /// + /// set to {@code true} to enable statistics on this multimap configuration + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int replicaCount, bool statisticsEnabled, string splitBrainProtectionName) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddPNCounterConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestReplicaCountFieldOffset, replicaCount); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.ReplicaCount = initialFrame.Bytes.ReadIntL(RequestReplicaCountFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReliableTopicConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReliableTopicConfigCodec.cs new file mode 100644 index 0000000000..13ca574780 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReliableTopicConfigCodec.cs @@ -0,0 +1,175 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new reliable topic configuration to a running cluster. + /// If a reliable topic configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddReliableTopicConfigServerCodec +#else + internal static class DynamicConfigAddReliableTopicConfigCodec +#endif + { + public const int RequestMessageType = 1772800; // 0x1B0D00 + public const int ResponseMessageType = 1772801; // 0x1B0D01 + private const int RequestReadBatchSizeFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestReadBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of reliable topic + /// + public string Name { get; set; } + + /// + /// message listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// maximum number of items to read in a batch. + /// + public int ReadBatchSize { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// policy to handle an overloaded topic. Available values are {@code DISCARD_OLDEST}, + /// {@code DISCARD_NEWEST}, {@code BLOCK} and {@code ERROR}. + /// + public string TopicOverloadPolicy { get; set; } + + /// + /// a serialized {@link java.util.concurrent.Executor} instance to use for executing + /// message listeners or {@code null} + /// + public IData Executor { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, ICollection listenerConfigs, int readBatchSize, bool statisticsEnabled, string topicOverloadPolicy, IData executor, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddReliableTopicConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestReadBatchSizeFieldOffset, readBatchSize); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + StringCodec.Encode(clientMessage, topicOverloadPolicy); + CodecUtil.EncodeNullable(clientMessage, executor, DataCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.ReadBatchSize = initialFrame.Bytes.ReadIntL(RequestReadBatchSizeFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.TopicOverloadPolicy = StringCodec.Decode(iterator); + request.Executor = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReplicatedMapConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReplicatedMapConfigCodec.cs new file mode 100644 index 0000000000..3d7c59e9c8 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddReplicatedMapConfigCodec.cs @@ -0,0 +1,194 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new replicated map configuration to a running cluster. + /// If a replicated map configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddReplicatedMapConfigServerCodec +#else + internal static class DynamicConfigAddReplicatedMapConfigCodec +#endif + { + public const int RequestMessageType = 1771008; // 0x1B0600 + public const int ResponseMessageType = 1771009; // 0x1B0601 + private const int RequestAsyncFillupFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestAsyncFillupFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestMergeBatchSizeFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of the replicated map configuration + /// + public string Name { get; set; } + + /// + /// data type used to store entries. Valid values are {@code "BINARY"}, {@code "OBJECT"} + /// and {@code "NATIVE"}. + /// + public string InMemoryFormat { get; set; } + + /// + /// {@code true} to make the replicated map available for reads before initial replication + /// is completed, {@code false} otherwise. + /// + public bool AsyncFillup { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// class name of a class implementing + /// SplitBrainMergePolicy to merge entries + /// while recovering from a split brain + /// + public string MergePolicy { get; set; } + + /// + /// entry listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, string inMemoryFormat, bool asyncFillup, bool statisticsEnabled, string mergePolicy, ICollection listenerConfigs, string splitBrainProtectionName, int mergeBatchSize, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddReplicatedMapConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteBoolL(RequestAsyncFillupFieldOffset, asyncFillup); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + StringCodec.Encode(clientMessage, inMemoryFormat); + StringCodec.Encode(clientMessage, mergePolicy); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.AsyncFillup = initialFrame.Bytes.ReadBoolL(RequestAsyncFillupFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.InMemoryFormat = StringCodec.Decode(iterator); + request.MergePolicy = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddRingbufferConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddRingbufferConfigCodec.cs new file mode 100644 index 0000000000..941221a340 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddRingbufferConfigCodec.cs @@ -0,0 +1,208 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new ringbuffer configuration to a running cluster. + /// If a ringbuffer configuration with the given {@code name} already exists, then + /// the new ringbuffer config is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddRingbufferConfigServerCodec +#else + internal static class DynamicConfigAddRingbufferConfigCodec +#endif + { + public const int RequestMessageType = 1769984; // 0x1B0200 + public const int ResponseMessageType = 1769985; // 0x1B0201 + private const int RequestCapacityFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestBackupCountFieldOffset = RequestCapacityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestTimeToLiveSecondsFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestTimeToLiveSecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// ringbuffer configuration name + /// + public string Name { get; set; } + + /// + /// capacity of the ringbuffer + /// + public int Capacity { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// maximum number of seconds for each entry to stay in the ringbuffer + /// + public int TimeToLiveSeconds { get; set; } + + /// + /// in memory format of items in the ringbuffer. Valid options are {@code BINARY} + /// and {@code OBJECT} + /// + public string InMemoryFormat { get; set; } + + /// + /// backing ringbuffer store configuration + /// + public Hazelcast.Protocol.Models.RingbufferStoreConfigHolder RingbufferStoreConfig { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int capacity, int backupCount, int asyncBackupCount, int timeToLiveSeconds, string inMemoryFormat, Hazelcast.Protocol.Models.RingbufferStoreConfigHolder ringbufferStoreConfig, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddRingbufferConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestCapacityFieldOffset, capacity); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestTimeToLiveSecondsFieldOffset, timeToLiveSeconds); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + StringCodec.Encode(clientMessage, inMemoryFormat); + CodecUtil.EncodeNullable(clientMessage, ringbufferStoreConfig, RingbufferStoreConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.Capacity = initialFrame.Bytes.ReadIntL(RequestCapacityFieldOffset); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.TimeToLiveSeconds = initialFrame.Bytes.ReadIntL(RequestTimeToLiveSecondsFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.InMemoryFormat = StringCodec.Decode(iterator); + request.RingbufferStoreConfig = CodecUtil.DecodeNullable(iterator, RingbufferStoreConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddScheduledExecutorConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddScheduledExecutorConfigCodec.cs new file mode 100644 index 0000000000..b85d80bb88 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddScheduledExecutorConfigCodec.cs @@ -0,0 +1,224 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new scheduled executor configuration to a running cluster. + /// If a scheduled executor configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddScheduledExecutorConfigServerCodec +#else + internal static class DynamicConfigAddScheduledExecutorConfigCodec +#endif + { + public const int RequestMessageType = 1772032; // 0x1B0A00 + public const int ResponseMessageType = 1772033; // 0x1B0A01 + private const int RequestPoolSizeFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestDurabilityFieldOffset = RequestPoolSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestCapacityFieldOffset = RequestDurabilityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestCapacityFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestCapacityPolicyFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestCapacityPolicyFieldOffset + BytesExtensions.SizeOfByte; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// name of scheduled executor + /// + public string Name { get; set; } + + /// + /// number of executor threads per member for the executor + /// + public int PoolSize { get; set; } + + /// + /// durability of the scheduled executor + /// + public int Durability { get; set; } + + /// + /// maximum number of tasks that a scheduler can have at any given point in time per partition or per node + /// according to the capacity policy + /// + public int Capacity { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// Capacity policy for the configured capacity value + /// + public byte CapacityPolicy { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the statisticsEnabled is received from the client, false otherwise. + /// If this is false, statisticsEnabled has the default value for its type. + /// + public bool IsStatisticsEnabledExists { get; set; } + + /// + /// true if the capacityPolicy is received from the client, false otherwise. + /// If this is false, capacityPolicy has the default value for its type. + /// + public bool IsCapacityPolicyExists { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, int poolSize, int durability, int capacity, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, bool statisticsEnabled, byte capacityPolicy, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddScheduledExecutorConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestPoolSizeFieldOffset, poolSize); + initialFrame.Bytes.WriteIntL(RequestDurabilityFieldOffset, durability); + initialFrame.Bytes.WriteIntL(RequestCapacityFieldOffset, capacity); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteByteL(RequestCapacityPolicyFieldOffset, capacityPolicy); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.PoolSize = initialFrame.Bytes.ReadIntL(RequestPoolSizeFieldOffset); + request.Durability = initialFrame.Bytes.ReadIntL(RequestDurabilityFieldOffset); + request.Capacity = initialFrame.Bytes.ReadIntL(RequestCapacityFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + if (initialFrame.Bytes.Length >= RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool) + { + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.IsStatisticsEnabledExists = true; + } + else request.IsStatisticsEnabledExists = false; + if (initialFrame.Bytes.Length >= RequestCapacityPolicyFieldOffset + BytesExtensions.SizeOfByte) + { + request.CapacityPolicy = initialFrame.Bytes.ReadByteL(RequestCapacityPolicyFieldOffset); + request.IsCapacityPolicyExists = true; + } + else request.IsCapacityPolicyExists = false; + request.Name = StringCodec.Decode(iterator); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddSetConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddSetConfigCodec.cs new file mode 100644 index 0000000000..5ea5641727 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddSetConfigCodec.cs @@ -0,0 +1,200 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new set configuration to a running cluster. + /// If a set configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddSetConfigServerCodec +#else + internal static class DynamicConfigAddSetConfigCodec +#endif + { + public const int RequestMessageType = 1770752; // 0x1B0500 + public const int ResponseMessageType = 1770753; // 0x1B0501 + private const int RequestBackupCountFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestAsyncBackupCountFieldOffset = RequestBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMaxSizeFieldOffset = RequestAsyncBackupCountFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestMaxSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int RequestMergeBatchSizeFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestMergeBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// set's name + /// + public string Name { get; set; } + + /// + /// item listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// number of synchronous backups + /// + public int BackupCount { get; set; } + + /// + /// number of asynchronous backups + /// + public int AsyncBackupCount { get; set; } + + /// + /// maximum size of the set + /// + public int MaxSize { get; set; } + + /// + /// {@code true} to enable gathering of statistics on the list, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// name of an existing configured split brain protection to be used to determine the minimum number of members + /// required in the cluster for the lock to remain functional. When {@code null}, split brain protection does not + /// apply to this lock configuration's operations. + /// + public string SplitBrainProtectionName { get; set; } + + /// + /// Name of a class implementing SplitBrainMergePolicy that handles merging of values for this cache + /// while recovering from network partitioning. + /// + public string MergePolicy { get; set; } + + /// + /// Number of entries to be sent in a merge operation. + /// + public int MergeBatchSize { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, ICollection listenerConfigs, int backupCount, int asyncBackupCount, int maxSize, bool statisticsEnabled, string splitBrainProtectionName, string mergePolicy, int mergeBatchSize, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddSetConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteIntL(RequestBackupCountFieldOffset, backupCount); + initialFrame.Bytes.WriteIntL(RequestAsyncBackupCountFieldOffset, asyncBackupCount); + initialFrame.Bytes.WriteIntL(RequestMaxSizeFieldOffset, maxSize); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteIntL(RequestMergeBatchSizeFieldOffset, mergeBatchSize); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, splitBrainProtectionName, StringCodec.Encode); + StringCodec.Encode(clientMessage, mergePolicy); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.BackupCount = initialFrame.Bytes.ReadIntL(RequestBackupCountFieldOffset); + request.AsyncBackupCount = initialFrame.Bytes.ReadIntL(RequestAsyncBackupCountFieldOffset); + request.MaxSize = initialFrame.Bytes.ReadIntL(RequestMaxSizeFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MergeBatchSize = initialFrame.Bytes.ReadIntL(RequestMergeBatchSizeFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + request.SplitBrainProtectionName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.MergePolicy = StringCodec.Decode(iterator); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddTopicConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddTopicConfigCodec.cs new file mode 100644 index 0000000000..24eb5cab31 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigAddTopicConfigCodec.cs @@ -0,0 +1,169 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Adds a new topic configuration to a running cluster. + /// If a topic configuration with the given {@code name} already exists, then + /// the new configuration is ignored and the existing one is preserved. + /// +#if SERVER_CODEC + internal static class DynamicConfigAddTopicConfigServerCodec +#else + internal static class DynamicConfigAddTopicConfigCodec +#endif + { + public const int RequestMessageType = 1771264; // 0x1B0700 + public const int ResponseMessageType = 1771265; // 0x1B0701 + private const int RequestGlobalOrderingEnabledFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int RequestStatisticsEnabledFieldOffset = RequestGlobalOrderingEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestMultiThreadingEnabledFieldOffset = RequestStatisticsEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int RequestInitialFrameSize = RequestMultiThreadingEnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// topic's name + /// + public string Name { get; set; } + + /// + /// when {@code true} all nodes listening to the same topic get their messages in + /// the same order + /// + public bool GlobalOrderingEnabled { get; set; } + + /// + /// {@code true} to enable gathering of statistics, otherwise {@code false} + /// + public bool StatisticsEnabled { get; set; } + + /// + /// {@code true} to enable multi-threaded processing of incoming messages, otherwise + /// a single thread will handle all topic messages + /// + public bool MultiThreadingEnabled { get; set; } + + /// + /// message listener configurations + /// + public ICollection ListenerConfigs { get; set; } + + /// + /// Name of the namespace applied to this instance. + /// + public string Namespace { get; set; } + + /// + /// true if the namespace is received from the client, false otherwise. + /// If this is false, namespace has the default value for its type. + /// + public bool IsNamespaceExists { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name, bool globalOrderingEnabled, bool statisticsEnabled, bool multiThreadingEnabled, ICollection listenerConfigs, string @namespace) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.AddTopicConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + initialFrame.Bytes.WriteBoolL(RequestGlobalOrderingEnabledFieldOffset, globalOrderingEnabled); + initialFrame.Bytes.WriteBoolL(RequestStatisticsEnabledFieldOffset, statisticsEnabled); + initialFrame.Bytes.WriteBoolL(RequestMultiThreadingEnabledFieldOffset, multiThreadingEnabled); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + ListMultiFrameCodec.EncodeNullable(clientMessage, listenerConfigs, ListenerConfigHolderCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, @namespace, StringCodec.Encode); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + var initialFrame = iterator.Take(); + request.GlobalOrderingEnabled = initialFrame.Bytes.ReadBoolL(RequestGlobalOrderingEnabledFieldOffset); + request.StatisticsEnabled = initialFrame.Bytes.ReadBoolL(RequestStatisticsEnabledFieldOffset); + request.MultiThreadingEnabled = initialFrame.Bytes.ReadBoolL(RequestMultiThreadingEnabledFieldOffset); + request.Name = StringCodec.Decode(iterator); + request.ListenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + if (iterator.Current?.Next != null) + { + request.Namespace = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + request.IsNamespaceExists = true; + } + else request.IsNamespaceExists = false; + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigRemoveNamespaceConfigCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigRemoveNamespaceConfigCodec.cs new file mode 100644 index 0000000000..f23cc5adc9 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Codecs/DynamicConfigRemoveNamespaceConfigCodec.cs @@ -0,0 +1,116 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.Codecs +{ + /// + /// Removes a namespace configuration. + /// +#if SERVER_CODEC + internal static class DynamicConfigRemoveNamespaceConfigServerCodec +#else + internal static class DynamicConfigRemoveNamespaceConfigCodec +#endif + { + public const int RequestMessageType = 1774592; // 0x1B1400 + public const int ResponseMessageType = 1774593; // 0x1B1401 + private const int RequestInitialFrameSize = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt; + private const int ResponseInitialFrameSize = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte; + +#if SERVER_CODEC + public sealed class RequestParameters + { + + /// + /// Namespace configuration name. + /// + public string Name { get; set; } + } +#endif + + public static ClientMessage EncodeRequest(string name) + { + var clientMessage = new ClientMessage + { + IsRetryable = false, + OperationName = "DynamicConfig.RemoveNamespaceConfig" + }; + var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1); + clientMessage.Append(initialFrame); + StringCodec.Encode(clientMessage, name); + return clientMessage; + } + +#if SERVER_CODEC + public static RequestParameters DecodeRequest(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var request = new RequestParameters(); + iterator.Take(); // empty initial frame + request.Name = StringCodec.Decode(iterator); + return request; + } +#endif + + public sealed class ResponseParameters + { + } + +#if SERVER_CODEC + public static ClientMessage EncodeResponse() + { + var clientMessage = new ClientMessage(); + var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented); + initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType); + clientMessage.Append(initialFrame); + return clientMessage; + } +#endif + + public static ResponseParameters DecodeResponse(ClientMessage clientMessage) + { + using var iterator = clientMessage.GetEnumerator(); + var response = new ResponseParameters(); + iterator.Take(); // empty initial frame + return response; + } + + } +} diff --git a/src/Hazelcast.Net/Protocol/Codecs/ExperimentalPipelineSubmitCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ExperimentalPipelineSubmitCodec.cs index 541e47802c..68d7c97c92 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ExperimentalPipelineSubmitCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ExperimentalPipelineSubmitCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @2e80de297 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/FencedLockGetLockOwnershipCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/FencedLockGetLockOwnershipCodec.cs index 8ad8258c1a..2c1f15fe95 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/FencedLockGetLockOwnershipCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/FencedLockGetLockOwnershipCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/FencedLockLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/FencedLockLockCodec.cs index 43696ae357..5745553d76 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/FencedLockLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/FencedLockLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/FencedLockTryLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/FencedLockTryLockCodec.cs index 7afd7c41d3..676ce45a62 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/FencedLockTryLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/FencedLockTryLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/FencedLockUnlockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/FencedLockUnlockCodec.cs index 57c7d8f7ea..9cc1d703f1 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/FencedLockUnlockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/FencedLockUnlockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/FlakeIdGeneratorNewIdBatchCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/FlakeIdGeneratorNewIdBatchCodec.cs index 56627c92cd..31076b5d3f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/FlakeIdGeneratorNewIdBatchCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/FlakeIdGeneratorNewIdBatchCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListAddAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListAddAllCodec.cs index 2810b1da24..f93aa12d5d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListAddAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListAddAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListAddAllWithIndexCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListAddAllWithIndexCodec.cs index 0c47a75ee3..77b3cfd941 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListAddAllWithIndexCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListAddAllWithIndexCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListAddCodec.cs index cb0feb5241..2a99e22a62 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListAddListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListAddListenerCodec.cs index d4e68b3174..02fa7c2b8b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListAddListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListAddListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListAddWithIndexCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListAddWithIndexCodec.cs index b4b1646338..99828a4a37 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListAddWithIndexCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListAddWithIndexCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListClearCodec.cs index 3ed93b6693..9fbab462e0 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRemoveAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRemoveAllCodec.cs index 9af4f458c8..dc2b3139b6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRemoveAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRemoveAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRetainAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRetainAllCodec.cs index 1b74da6522..77389b237d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRetainAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListCompareAndRetainAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListContainsAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListContainsAllCodec.cs index 66406e7209..9cefec876b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListContainsAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListContainsAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListContainsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListContainsCodec.cs index d149d533f1..a367abce0c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListContainsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListContainsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListGetAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListGetAllCodec.cs index 07a0105d78..ba447f211e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListGetAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListGetAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListGetCodec.cs index b1624c1eb6..ae08e9159c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListIndexOfCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListIndexOfCodec.cs index 38444590b1..88c4f04ec6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListIndexOfCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListIndexOfCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListIsEmptyCodec.cs index cf2f40d874..6df8845758 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListIteratorCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListIteratorCodec.cs index 24a76eb798..68580d6080 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListIteratorCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListIteratorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListLastIndexOfCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListLastIndexOfCodec.cs index 63df851748..2a3f691c06 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListLastIndexOfCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListLastIndexOfCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListListIteratorCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListListIteratorCodec.cs index e238aa15e8..144648c333 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListListIteratorCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListListIteratorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveCodec.cs index f8a2ec2b5f..ce40261726 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveListenerCodec.cs index 9887247c9b..ff00dbcb74 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveWithIndexCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveWithIndexCodec.cs index b3ed9bb7f0..255266c34e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListRemoveWithIndexCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListRemoveWithIndexCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListSetCodec.cs index 032f3b1478..4a8107b620 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListSizeCodec.cs index 6daa96e177..09a5137a28 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ListSubCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ListSubCodec.cs index 5c65bed13f..8e5e189934 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ListSubCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ListSubCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerCodec.cs index a7f301bed6..92f8e12794 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyCodec.cs index f1a401402f..70a5bc7dfa 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyWithPredicateCodec.cs index a67160ac2a..bef928df0c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerToKeyWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerWithPredicateCodec.cs index 0a1862e255..92f7c7f0c6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddEntryListenerWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddIndexCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddIndexCodec.cs index 570538add4..ad7ba3d1cf 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddIndexCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddIndexCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddInterceptorCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddInterceptorCodec.cs index 39a36184f2..e60660b5c2 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddInterceptorCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddInterceptorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddNearCacheInvalidationListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddNearCacheInvalidationListenerCodec.cs index 03c26dda89..7f5d71a514 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddNearCacheInvalidationListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddNearCacheInvalidationListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAddPartitionLostListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAddPartitionLostListenerCodec.cs index 18f0a3421e..5996103cdd 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAddPartitionLostListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAddPartitionLostListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAggregateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAggregateCodec.cs index 404ac39c94..ff3ace4b16 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAggregateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAggregateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapAggregateWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapAggregateWithPredicateCodec.cs index 62d9d76240..f47ee9ca31 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapAggregateWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapAggregateWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapClearCodec.cs index 83d362cec0..f6d9e2ed75 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapContainsKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapContainsKeyCodec.cs index 54add9cd43..704a1f62fa 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapContainsKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapContainsKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapContainsValueCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapContainsValueCodec.cs index 4042029b0d..56321a8c15 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapContainsValueCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapContainsValueCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapDeleteCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapDeleteCodec.cs index b18ea37b9f..f693db524e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapDeleteCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapDeleteCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPagingPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPagingPredicateCodec.cs index ff19319c9a..2846fcb22b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPagingPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPagingPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPredicateCodec.cs index ad265df9c7..de19ad54f2 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEntriesWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEntrySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEntrySetCodec.cs index cfd003378f..1df821a743 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEntrySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEntrySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalReadCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalReadCodec.cs index c0538ee20f..3b20682b71 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalReadCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalReadCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalSubscribeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalSubscribeCodec.cs index a28be37122..a5e3ec896a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalSubscribeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEventJournalSubscribeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEvictAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEvictAllCodec.cs index c396d8db67..b8536d9e20 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEvictAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEvictAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapEvictCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapEvictCodec.cs index a003bd3e02..818df82d0f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapEvictCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapEvictCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnAllKeysCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnAllKeysCodec.cs index 1ac48f299a..ce9820dd38 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnAllKeysCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnAllKeysCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeyCodec.cs index a681fba0a3..f31fd50739 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeysCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeysCodec.cs index b7cf06c35f..a3e285d5da 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeysCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteOnKeysCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteWithPredicateCodec.cs index d673c75ed6..5c8e4390e9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapExecuteWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapExecuteWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapFetchEntriesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapFetchEntriesCodec.cs index 7b15b6fe66..35ce25b434 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapFetchEntriesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapFetchEntriesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapFetchKeysCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapFetchKeysCodec.cs index a72229489d..b8d2b26c50 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapFetchKeysCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapFetchKeysCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapFetchNearCacheInvalidationMetadataCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapFetchNearCacheInvalidationMetadataCodec.cs index 923aab3161..63d54bfdbc 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapFetchNearCacheInvalidationMetadataCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapFetchNearCacheInvalidationMetadataCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapFetchWithQueryCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapFetchWithQueryCodec.cs index a550abb800..bb16e9dff9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapFetchWithQueryCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapFetchWithQueryCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapFlushCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapFlushCodec.cs index d3944184d0..7f71136861 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapFlushCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapFlushCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapForceUnlockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapForceUnlockCodec.cs index 6855228c87..cb2e696d95 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapForceUnlockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapForceUnlockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapGetAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapGetAllCodec.cs index 1108760a7d..af11e5cfcc 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapGetAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapGetAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapGetCodec.cs index 4600d233fe..e992b83013 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapGetEntryViewCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapGetEntryViewCodec.cs index 1fca48713e..d5445f8a5e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapGetEntryViewCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapGetEntryViewCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapIsEmptyCodec.cs index a855c29385..535d659eba 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapIsLockedCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapIsLockedCodec.cs index 7f64936650..c85332be66 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapIsLockedCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapIsLockedCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetCodec.cs index 4ad748e43f..4fecb8d649 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @5655fe9be +// Hazelcast Client Protocol Code Generator @54480b651 // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPagingPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPagingPredicateCodec.cs index d2a6a47ba3..1adb20eeca 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPagingPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPagingPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPredicateCodec.cs index 5bcec46049..0fe83576e4 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapKeySetWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapLoadAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapLoadAllCodec.cs index 159d799bbb..e8821d5062 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapLoadAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapLoadAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapLoadGivenKeysCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapLoadGivenKeysCodec.cs index fca682bed5..2f0f7fc49d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapLoadGivenKeysCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapLoadGivenKeysCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapLockCodec.cs index cb98707a6a..74588c88ca 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapProjectCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapProjectCodec.cs index 7005a6cab8..6198ab1828 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapProjectCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapProjectCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapProjectWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapProjectWithPredicateCodec.cs index 5a0218a00e..8f22440396 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapProjectWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapProjectWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutAllCodec.cs index 825cbc5cc2..d788dd95ff 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutCodec.cs index f32b7b6cb9..d3915bf200 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentCodec.cs index 2e241b8aa3..2582c8c341 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentWithMaxIdleCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentWithMaxIdleCodec.cs index cfaca4f003..3f17c50752 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentWithMaxIdleCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutIfAbsentWithMaxIdleCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientCodec.cs index 874609f132..65b39562ed 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientWithMaxIdleCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientWithMaxIdleCodec.cs index af3bd9d69b..e7dca8974f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientWithMaxIdleCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutTransientWithMaxIdleCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapPutWithMaxIdleCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapPutWithMaxIdleCodec.cs index 221c067fc3..9cfa5228da 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapPutWithMaxIdleCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapPutWithMaxIdleCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveAllCodec.cs index d2b105a980..e15aa5d4db 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveCodec.cs index f5d27d9f89..f3e25e85ad 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveEntryListenerCodec.cs index 00fc462aeb..913134fab6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveIfSameCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveIfSameCodec.cs index 24aa73fec9..53c090cb95 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveIfSameCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveIfSameCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveInterceptorCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveInterceptorCodec.cs index 83c87974be..d7e42c6ffc 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemoveInterceptorCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemoveInterceptorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapRemovePartitionLostListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapRemovePartitionLostListenerCodec.cs index 4eb262293b..9778161c9d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapRemovePartitionLostListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapRemovePartitionLostListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapReplaceCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapReplaceCodec.cs index 648bb427a2..6999a95677 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapReplaceCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapReplaceCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapReplaceIfSameCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapReplaceIfSameCodec.cs index f83eb15f23..ac19720138 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapReplaceIfSameCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapReplaceIfSameCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapSetCodec.cs index 738d0d7bee..c595564045 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapSetTtlCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapSetTtlCodec.cs index 3fd009b2ee..dcd5b33827 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapSetTtlCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapSetTtlCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapSetWithMaxIdleCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapSetWithMaxIdleCodec.cs index 41903126c2..19573db345 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapSetWithMaxIdleCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapSetWithMaxIdleCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapSizeCodec.cs index a3c23e7f9f..64dadced39 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapSubmitToKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapSubmitToKeyCodec.cs index a6a87c2185..67ee8a445f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapSubmitToKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapSubmitToKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapTryLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapTryLockCodec.cs index ec032fa99e..7d41235097 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapTryLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapTryLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapTryPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapTryPutCodec.cs index 7f63c9c172..4d1a7b4cdf 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapTryPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapTryPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapTryRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapTryRemoveCodec.cs index 4e9730aef7..f0dc386670 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapTryRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapTryRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapUnlockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapUnlockCodec.cs index 760fa405db..fd8073dd04 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapUnlockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapUnlockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapValuesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapValuesCodec.cs index 71a5cc88bc..ab36864e3a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapValuesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapValuesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPagingPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPagingPredicateCodec.cs index 1e53e9e0ea..3937f8937f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPagingPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPagingPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPredicateCodec.cs index db20f103b8..af0fa90327 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MapValuesWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerCodec.cs index 0e5764c9bf..cd6bf15c6c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerToKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerToKeyCodec.cs index 20e2a75c1c..30df42d06d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerToKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapAddEntryListenerToKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapClearCodec.cs index f1f3528c4a..52dd1eeba3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsEntryCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsEntryCodec.cs index dd224b32b7..d6483ed353 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsEntryCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsEntryCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsKeyCodec.cs index 4b803bc56a..fbfa4f29fa 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsValueCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsValueCodec.cs index e7449405a9..b63e65dbdb 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsValueCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapContainsValueCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapDeleteCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapDeleteCodec.cs index b0dc592cdc..dee2d25946 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapDeleteCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapDeleteCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapEntrySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapEntrySetCodec.cs index e902b96f0c..5954797025 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapEntrySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapEntrySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapForceUnlockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapForceUnlockCodec.cs index 14432af15b..41d7d23171 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapForceUnlockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapForceUnlockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapGetCodec.cs index fca50fdd03..abaa0bc41a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapIsLockedCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapIsLockedCodec.cs index 725d8effe7..65523b55cb 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapIsLockedCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapIsLockedCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapKeySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapKeySetCodec.cs index df29933b32..c3bcfbee08 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapKeySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapKeySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapLockCodec.cs index 0f441b371d..b3092864c3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapPutCodec.cs index 20b120aa45..ce133807b2 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveCodec.cs index 9d937709f8..34595c0c42 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryCodec.cs index 37781b73c7..2aaf4d77eb 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryListenerCodec.cs index 938e966886..3bd619da0d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapRemoveEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapSizeCodec.cs index 4a13e10a9f..dee7987a4e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapTryLockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapTryLockCodec.cs index 47c14396b9..f7ea304081 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapTryLockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapTryLockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapUnlockCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapUnlockCodec.cs index 7ab8dea8f8..03a43848a2 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapUnlockCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapUnlockCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapValueCountCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapValueCountCodec.cs index 6640bfac18..9c6fb2c8af 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapValueCountCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapValueCountCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/MultiMapValuesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/MultiMapValuesCodec.cs index 4f4c7857e7..e8fadf4b31 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/MultiMapValuesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/MultiMapValuesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/PNCounterAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/PNCounterAddCodec.cs index 10211794a9..e81f1127b4 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/PNCounterAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/PNCounterAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetCodec.cs index 0062a5a348..69235b7d00 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetConfiguredReplicaCountCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetConfiguredReplicaCountCodec.cs index ba85e4757d..590831e7d0 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetConfiguredReplicaCountCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/PNCounterGetConfiguredReplicaCountCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueAddAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueAddAllCodec.cs index 915f8d3710..d99e88c18f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueAddAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueAddAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueAddListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueAddListenerCodec.cs index 5ac4841380..c53a7faaf6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueAddListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueAddListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueClearCodec.cs index 5d45b7af18..7130d2169a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRemoveAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRemoveAllCodec.cs index 188f54ad3a..432b88942d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRemoveAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRemoveAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRetainAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRetainAllCodec.cs index 33a760ddcf..b25acb98aa 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRetainAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueCompareAndRetainAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueContainsAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueContainsAllCodec.cs index 9a98f827db..0c2fde7a22 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueContainsAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueContainsAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueContainsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueContainsCodec.cs index 89414fc7f3..4c3e111ebc 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueContainsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueContainsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToCodec.cs index 5dadaf7961..8f2388c4f9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToMaxSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToMaxSizeCodec.cs index 7071486678..cb6ecc5ffd 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToMaxSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueDrainToMaxSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueIsEmptyCodec.cs index 6139e3b636..35da691ec3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueIteratorCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueIteratorCodec.cs index 87d04694c7..0bacb79c74 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueIteratorCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueIteratorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueOfferCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueOfferCodec.cs index f344994c38..8771793450 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueOfferCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueOfferCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueuePeekCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueuePeekCodec.cs index 74f533f9e3..8ebfaddbe1 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueuePeekCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueuePeekCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueuePollCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueuePollCodec.cs index ef6fe68836..d7db038097 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueuePollCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueuePollCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueuePutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueuePutCodec.cs index 96ca138694..4b38246444 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueuePutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueuePutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueRemainingCapacityCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueRemainingCapacityCodec.cs index 1aafccf44e..2cdd2b2593 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueRemainingCapacityCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueRemainingCapacityCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveCodec.cs index 04cb196ef3..e717fc971e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveListenerCodec.cs index 3c74978cad..d9ba3e296b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueRemoveListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueSizeCodec.cs index 1d58040519..08242202b7 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/QueueTakeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/QueueTakeCodec.cs index a7f28d221a..ac78d9b5d5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/QueueTakeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/QueueTakeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerCodec.cs index 716caa670a..8534afd88e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyCodec.cs index c30e884cf0..57c0f69049 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.cs index 8202c2e764..4aa69dea03 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerToKeyWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerWithPredicateCodec.cs index b29a4a266f..6f67999b4d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddEntryListenerWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddNearCacheEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddNearCacheEntryListenerCodec.cs index 8f9d403949..ebeef0c712 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddNearCacheEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapAddNearCacheEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapClearCodec.cs index 63e94677ee..b8b146934b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsKeyCodec.cs index c0b4db4c6d..defbee34ff 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsValueCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsValueCodec.cs index 4604c034d3..64a376f6aa 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsValueCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapContainsValueCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapEntrySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapEntrySetCodec.cs index 1df74a70b4..6421aa0efb 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapEntrySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapEntrySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapGetCodec.cs index 18a798e45e..928233f6ed 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapIsEmptyCodec.cs index d51f47866d..3015081a4d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapKeySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapKeySetCodec.cs index a44bc2ad85..2e7fd913ea 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapKeySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapKeySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutAllCodec.cs index 698b2f81d3..9776744f88 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @5655fe9be +// Hazelcast Client Protocol Code Generator @54480b651 // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutCodec.cs index 2fa9b030c0..61dc1af75e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveCodec.cs index 9d60716778..00021fa1e0 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @5655fe9be +// Hazelcast Client Protocol Code Generator @54480b651 // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveEntryListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveEntryListenerCodec.cs index 3eab67ed79..2699449363 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveEntryListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapRemoveEntryListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapSizeCodec.cs index 352a5e58f2..9224bdef6a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapValuesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapValuesCodec.cs index b5b9e78e1c..3c1cc83860 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapValuesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/ReplicatedMapValuesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddAllCodec.cs index 099e2f7345..57be0d7a36 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddCodec.cs index 3bb6b4dd67..2a159271c5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferCapacityCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferCapacityCodec.cs index 8b816d5345..01b385e33b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferCapacityCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferCapacityCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferHeadSequenceCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferHeadSequenceCodec.cs index ba1745d1d7..03d4497268 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferHeadSequenceCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferHeadSequenceCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadManyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadManyCodec.cs index fcf1e60a28..75ea00babc 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadManyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadManyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadOneCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadOneCodec.cs index d74708ee2a..7986410278 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadOneCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferReadOneCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferRemainingCapacityCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferRemainingCapacityCodec.cs index 5c3665ef61..643b14e496 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferRemainingCapacityCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferRemainingCapacityCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferSizeCodec.cs index 652dfa93da..ca0e85b830 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/RingbufferTailSequenceCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/RingbufferTailSequenceCodec.cs index 551cb9444f..0a791221a3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/RingbufferTailSequenceCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/RingbufferTailSequenceCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetAddAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetAddAllCodec.cs index 98d28aad6c..bf3db167cd 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetAddAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetAddAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetAddCodec.cs index 98faa15402..3ccd2a16d7 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetAddListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetAddListenerCodec.cs index 1c33299e71..630da193a3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetAddListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetAddListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetClearCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetClearCodec.cs index 3ae3ad3f68..11d6f3d8c7 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetClearCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetClearCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRemoveAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRemoveAllCodec.cs index 5a7cbd9fd7..48a46ed08d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRemoveAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRemoveAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRetainAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRetainAllCodec.cs index 898fb43157..6dd289efce 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRetainAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetCompareAndRetainAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetContainsAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetContainsAllCodec.cs index 1d40585701..6c0f1ed9f5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetContainsAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetContainsAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetContainsCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetContainsCodec.cs index 8dfedbcab0..4343e76093 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetContainsCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetContainsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetGetAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetGetAllCodec.cs index fd02f6be21..ba21ba5875 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetGetAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetGetAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetIsEmptyCodec.cs index ee4cdf2768..b3e31a66dd 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetRemoveCodec.cs index 31a0ef41e5..2cec58de18 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetRemoveListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetRemoveListenerCodec.cs index fc11f0b938..a69d77337f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetRemoveListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetRemoveListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SetSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SetSizeCodec.cs index 2c8de4d93f..56cf4972d7 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SetSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SetSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SqlCloseCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SqlCloseCodec.cs index ec2d1419b8..81d3a098a3 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SqlCloseCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SqlCloseCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SqlExecuteCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SqlExecuteCodec.cs index 04512cec25..152056d572 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SqlExecuteCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SqlExecuteCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/SqlFetchCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/SqlFetchCodec.cs index 2fda315886..8b27d9f66e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/SqlFetchCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/SqlFetchCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TopicAddMessageListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TopicAddMessageListenerCodec.cs index c47c2a623a..0f3b06cc2c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TopicAddMessageListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TopicAddMessageListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TopicPublishAllCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TopicPublishAllCodec.cs index 7d2584b2c4..98c5640f7f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TopicPublishAllCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TopicPublishAllCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TopicPublishCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TopicPublishCodec.cs index 7e6566d69a..00ba7e32c0 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TopicPublishCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TopicPublishCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TopicRemoveMessageListenerCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TopicRemoveMessageListenerCodec.cs index b7af6ef862..779ca56f6e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TopicRemoveMessageListenerCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TopicRemoveMessageListenerCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionCommitCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionCommitCodec.cs index 789ab237ef..4a28ff1303 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionCommitCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionCommitCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionCreateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionCreateCodec.cs index 39bcf323c8..4119b1ed2e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionCreateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionCreateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionRollbackCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionRollbackCodec.cs index 50f1e022d2..df64f4e9d1 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionRollbackCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionRollbackCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListAddCodec.cs index 6306ad6149..3b5478bded 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListRemoveCodec.cs index fb3e43820c..170550e86c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListSizeCodec.cs index 9c898b03b3..9be3d0f76c 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalListSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalListSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsKeyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsKeyCodec.cs index a43d517d87..375d54ec3e 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsKeyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsKeyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsValueCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsValueCodec.cs index fa30480ffb..80840becb9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsValueCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapContainsValueCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapDeleteCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapDeleteCodec.cs index cb5b62f75e..1bc8b8bf76 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapDeleteCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapDeleteCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetCodec.cs index f0ecf2b36e..2117afd983 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetForUpdateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetForUpdateCodec.cs index 491c79d66c..bbd164b9f8 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetForUpdateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapGetForUpdateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapIsEmptyCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapIsEmptyCodec.cs index ed9a261d02..a91f73b65f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapIsEmptyCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapIsEmptyCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetCodec.cs index 8ccf3323cd..4857ae5639 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetWithPredicateCodec.cs index afb3a11711..ca61cd7fc0 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapKeySetWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutCodec.cs index d4d99e2024..d2b39610d9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutIfAbsentCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutIfAbsentCodec.cs index bdcd011139..602c87065f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutIfAbsentCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapPutIfAbsentCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveCodec.cs index f043e45e2e..17bdc2dda5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveIfSameCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveIfSameCodec.cs index 9707ed7679..8a2d80c938 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveIfSameCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapRemoveIfSameCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceCodec.cs index 65119a8fbf..743f3d125d 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceIfSameCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceIfSameCodec.cs index 53fde02bbe..dea0456bbe 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceIfSameCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapReplaceIfSameCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSetCodec.cs index 8cf84fbe36..804e4c803a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSizeCodec.cs index 74e2f652d2..41bf1aaf36 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesCodec.cs index 7df62f1c86..58127b6ea7 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesWithPredicateCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesWithPredicateCodec.cs index 194605a6fc..1454973ea5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesWithPredicateCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMapValuesWithPredicateCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapGetCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapGetCodec.cs index 0ed28c9d47..1b30240f08 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapGetCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapGetCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapPutCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapPutCodec.cs index 56d1c0ab62..5fbbb79952 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapPutCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapPutCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveCodec.cs index 98bd2d7b01..5b1aa4c1b6 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveEntryCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveEntryCodec.cs index 1fcc23cd5d..1cfc85de3f 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveEntryCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapRemoveEntryCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapSizeCodec.cs index a7ad977af4..d218af5984 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapValueCountCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapValueCountCodec.cs index d6409ab76b..63d87a1cab 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapValueCountCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalMultiMapValueCountCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueOfferCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueOfferCodec.cs index 277b04e443..680c6da3a5 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueOfferCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueOfferCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePeekCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePeekCodec.cs index fd82539cf3..e8d7b56bf1 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePeekCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePeekCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePollCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePollCodec.cs index ba801f7d4e..d30804c783 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePollCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueuePollCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueSizeCodec.cs index d6ba6443e7..584496ee21 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueTakeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueTakeCodec.cs index 2daa700937..01d62dc0ad 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueTakeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalQueueTakeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetAddCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetAddCodec.cs index fac746f263..778fdd2a5a 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetAddCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetAddCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetRemoveCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetRemoveCodec.cs index 17abf1e034..fcba01265b 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetRemoveCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetRemoveCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetSizeCodec.cs b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetSizeCodec.cs index 0f73497f25..195d2f33e9 100644 --- a/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetSizeCodec.cs +++ b/src/Hazelcast.Net/Protocol/Codecs/TransactionalSetSizeCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/AddressCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/AddressCodec.cs index bf70cc37bf..75c5b90021 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/AddressCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/AddressCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/AnchorDataListHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/AnchorDataListHolderCodec.cs index 93ac52bdb9..6b38a760b4 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/AnchorDataListHolderCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/AnchorDataListHolderCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/AttributeConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/AttributeConfigCodec.cs new file mode 100644 index 0000000000..b5a0eb8554 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/AttributeConfigCodec.cs @@ -0,0 +1,65 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class AttributeConfigCodec + { + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.AttributeOptions attributeConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + StringCodec.Encode(clientMessage, attributeConfig.Name); + StringCodec.Encode(clientMessage, attributeConfig.ExtractorClassName); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.AttributeOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + var name = StringCodec.Decode(iterator); + var extractorClassName = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return new Hazelcast.Models.AttributeOptions(name, extractorClassName); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/BTreeIndexConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/BTreeIndexConfigCodec.cs index 3614ebe8ac..c8b1070731 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/BTreeIndexConfigCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/BTreeIndexConfigCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // @@ -44,7 +44,7 @@ public static void Encode(ClientMessage clientMessage, Hazelcast.Models.BTreeInd clientMessage.Append(Frame.CreateBeginStruct()); CapacityCodec.Encode(clientMessage, bTreeIndexConfig.PageSize); - MemoryTierConfigCodec.Encode(clientMessage, bTreeIndexConfig.MemoryTierOptions); + MemoryTierConfigCodec.Encode(clientMessage, bTreeIndexConfig.MemoryTier); clientMessage.Append(Frame.CreateEndStruct()); } diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/BitmapIndexOptionsCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/BitmapIndexOptionsCodec.cs index 98e10f72f5..816259f18e 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/BitmapIndexOptionsCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/BitmapIndexOptionsCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/CacheSimpleEntryListenerConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/CacheSimpleEntryListenerConfigCodec.cs new file mode 100644 index 0000000000..fc389c2dcd --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/CacheSimpleEntryListenerConfigCodec.cs @@ -0,0 +1,78 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class CacheSimpleEntryListenerConfigCodec + { + private const int OldValueRequiredFieldOffset = 0; + private const int SynchronousFieldOffset = OldValueRequiredFieldOffset + BytesExtensions.SizeOfBool; + private const int InitialFrameSize = SynchronousFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.CacheSimpleEntryListenerOptions cacheSimpleEntryListenerConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(OldValueRequiredFieldOffset, cacheSimpleEntryListenerConfig.OldValueRequired); + initialFrame.Bytes.WriteBoolL(SynchronousFieldOffset, cacheSimpleEntryListenerConfig.Synchronous); + clientMessage.Append(initialFrame); + + CodecUtil.EncodeNullable(clientMessage, cacheSimpleEntryListenerConfig.CacheEntryListenerFactory, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, cacheSimpleEntryListenerConfig.CacheEntryEventFilterFactory, StringCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.CacheSimpleEntryListenerOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var oldValueRequired = initialFrame.Bytes.ReadBoolL(OldValueRequiredFieldOffset); + + var synchronous = initialFrame.Bytes.ReadBoolL(SynchronousFieldOffset); + var cacheEntryListenerFactory = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var cacheEntryEventFilterFactory = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateCacheSimpleEntryListenerConfig(oldValueRequired, synchronous, cacheEntryListenerFactory, cacheEntryEventFilterFactory); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/CapacityCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/CapacityCodec.cs index 296b7b0dce..b14c0bf2af 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/CapacityCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/CapacityCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/DataPersistenceConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/DataPersistenceConfigCodec.cs new file mode 100644 index 0000000000..ce909fdcbb --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/DataPersistenceConfigCodec.cs @@ -0,0 +1,72 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class DataPersistenceConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int FsyncFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int InitialFrameSize = FsyncFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.DataPersistenceOptions dataPersistenceConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, dataPersistenceConfig.Enabled); + initialFrame.Bytes.WriteBoolL(FsyncFieldOffset, dataPersistenceConfig.Fsync); + clientMessage.Append(initialFrame); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.DataPersistenceOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var fsync = initialFrame.Bytes.ReadBoolL(FsyncFieldOffset); + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateDataPersistenceConfig(enabled, fsync); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/DiskTierConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/DiskTierConfigCodec.cs new file mode 100644 index 0000000000..d5dfb9aaa8 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/DiskTierConfigCodec.cs @@ -0,0 +1,73 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class DiskTierConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int InitialFrameSize = EnabledFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.DiskTierOptions diskTierConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, diskTierConfig.Enabled); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, diskTierConfig.DeviceName); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.DiskTierOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var deviceName = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateDiskTierConfig(enabled, deviceName); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/DistributedObjectInfoCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/DistributedObjectInfoCodec.cs index 305dc06cb6..4a6fec0744 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/DistributedObjectInfoCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/DistributedObjectInfoCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/DurationConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/DurationConfigCodec.cs new file mode 100644 index 0000000000..3d750746c4 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/DurationConfigCodec.cs @@ -0,0 +1,72 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class DurationConfigCodec + { + private const int DurationAmountFieldOffset = 0; + private const int TimeUnitFieldOffset = DurationAmountFieldOffset + BytesExtensions.SizeOfLong; + private const int InitialFrameSize = TimeUnitFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.DurationOptions durationConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteLongL(DurationAmountFieldOffset, durationConfig.DurationAmount); + initialFrame.Bytes.WriteIntL(TimeUnitFieldOffset, durationConfig.TimeUnit); + clientMessage.Append(initialFrame); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.DurationOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var durationAmount = initialFrame.Bytes.ReadLongL(DurationAmountFieldOffset); + + var timeUnit = initialFrame.Bytes.ReadIntL(TimeUnitFieldOffset); + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateDurationConfig(durationAmount, timeUnit); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/EndpointQualifierCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/EndpointQualifierCodec.cs index 5d9181fd6b..200c7e62ed 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/EndpointQualifierCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/EndpointQualifierCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/ErrorHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/ErrorHolderCodec.cs index 74b967625b..9fcb49aa12 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/ErrorHolderCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/ErrorHolderCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/EventJournalConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/EventJournalConfigCodec.cs new file mode 100644 index 0000000000..67a06bdffe --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/EventJournalConfigCodec.cs @@ -0,0 +1,75 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class EventJournalConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int CapacityFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int TimeToLiveSecondsFieldOffset = CapacityFieldOffset + BytesExtensions.SizeOfInt; + private const int InitialFrameSize = TimeToLiveSecondsFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.EventJournalOptions eventJournalConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, eventJournalConfig.Enabled); + initialFrame.Bytes.WriteIntL(CapacityFieldOffset, eventJournalConfig.Capacity); + initialFrame.Bytes.WriteIntL(TimeToLiveSecondsFieldOffset, eventJournalConfig.TimeToLiveSeconds); + clientMessage.Append(initialFrame); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.EventJournalOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var capacity = initialFrame.Bytes.ReadIntL(CapacityFieldOffset); + var timeToLiveSeconds = initialFrame.Bytes.ReadIntL(TimeToLiveSecondsFieldOffset); + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateEventJournalConfig(enabled, capacity, timeToLiveSeconds); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/EvictionConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/EvictionConfigHolderCodec.cs new file mode 100644 index 0000000000..08ec9e930d --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/EvictionConfigHolderCodec.cs @@ -0,0 +1,79 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class EvictionConfigHolderCodec + { + private const int SizeFieldOffset = 0; + private const int InitialFrameSize = SizeFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.EvictionConfigHolder evictionConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteIntL(SizeFieldOffset, evictionConfigHolder.Size); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, evictionConfigHolder.MaxSizePolicy); + StringCodec.Encode(clientMessage, evictionConfigHolder.EvictionPolicy); + CodecUtil.EncodeNullable(clientMessage, evictionConfigHolder.ComparatorClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, evictionConfigHolder.Comparator, DataCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.EvictionConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var size = initialFrame.Bytes.ReadIntL(SizeFieldOffset); + + var maxSizePolicy = StringCodec.Decode(iterator); + var evictionPolicy = StringCodec.Decode(iterator); + var comparatorClassName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var comparator = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.EvictionConfigHolder(size, maxSizePolicy, evictionPolicy, comparatorClassName, comparator); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/FieldDescriptorCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/FieldDescriptorCodec.cs index 98bc83933b..8e8f80dd4b 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/FieldDescriptorCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/FieldDescriptorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/HazelcastJsonValueCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/HazelcastJsonValueCodec.cs index 39d833014b..f820579fed 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/HazelcastJsonValueCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/HazelcastJsonValueCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/HotRestartConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/HotRestartConfigCodec.cs new file mode 100644 index 0000000000..91a2f1f542 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/HotRestartConfigCodec.cs @@ -0,0 +1,72 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class HotRestartConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int FsyncFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int InitialFrameSize = FsyncFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.HotRestartOptions hotRestartConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, hotRestartConfig.Enabled); + initialFrame.Bytes.WriteBoolL(FsyncFieldOffset, hotRestartConfig.Fsync); + clientMessage.Append(initialFrame); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.HotRestartOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var fsync = initialFrame.Bytes.ReadBoolL(FsyncFieldOffset); + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateHotRestartConfig(enabled, fsync); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/IndexConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/IndexConfigCodec.cs index 6334cd501b..50122a6d3b 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/IndexConfigCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/IndexConfigCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // @@ -51,8 +51,8 @@ public static void Encode(ClientMessage clientMessage, Hazelcast.Models.IndexOpt CodecUtil.EncodeNullable(clientMessage, indexConfig.Name, StringCodec.Encode); ListMultiFrameCodec.Encode(clientMessage, indexConfig.Attributes, StringCodec.Encode); - CodecUtil.EncodeNullable(clientMessage, indexConfig.BitmapIndexOptions, BitmapIndexOptionsCodec.Encode); - CodecUtil.EncodeNullable(clientMessage, indexConfig.BTreeIndexOptions, BTreeIndexConfigCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, indexConfig.BitmapIndex, BitmapIndexOptionsCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, indexConfig.BTreeIndex, BTreeIndexConfigCodec.Encode); clientMessage.Append(Frame.CreateEndStruct()); } diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/ListenerConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/ListenerConfigHolderCodec.cs new file mode 100644 index 0000000000..b5ae99688d --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/ListenerConfigHolderCodec.cs @@ -0,0 +1,81 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class ListenerConfigHolderCodec + { + private const int ListenerTypeFieldOffset = 0; + private const int IncludeValueFieldOffset = ListenerTypeFieldOffset + BytesExtensions.SizeOfInt; + private const int LocalFieldOffset = IncludeValueFieldOffset + BytesExtensions.SizeOfBool; + private const int InitialFrameSize = LocalFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.ListenerConfigHolder listenerConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteIntL(ListenerTypeFieldOffset, listenerConfigHolder.ListenerType); + initialFrame.Bytes.WriteBoolL(IncludeValueFieldOffset, listenerConfigHolder.IsIncludeValue); + initialFrame.Bytes.WriteBoolL(LocalFieldOffset, listenerConfigHolder.IsLocal); + clientMessage.Append(initialFrame); + + CodecUtil.EncodeNullable(clientMessage, listenerConfigHolder.ListenerImplementation, DataCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, listenerConfigHolder.ClassName, StringCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.ListenerConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var listenerType = initialFrame.Bytes.ReadIntL(ListenerTypeFieldOffset); + + var includeValue = initialFrame.Bytes.ReadBoolL(IncludeValueFieldOffset); + var local = initialFrame.Bytes.ReadBoolL(LocalFieldOffset); + var listenerImplementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + var className = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.ListenerConfigHolder(listenerType, listenerImplementation, className, includeValue, local); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MapStoreConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MapStoreConfigHolderCodec.cs new file mode 100644 index 0000000000..300f5a9f37 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MapStoreConfigHolderCodec.cs @@ -0,0 +1,101 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class MapStoreConfigHolderCodec + { + private const int EnabledFieldOffset = 0; + private const int WriteCoalescingFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int WriteDelaySecondsFieldOffset = WriteCoalescingFieldOffset + BytesExtensions.SizeOfBool; + private const int WriteBatchSizeFieldOffset = WriteDelaySecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int OffloadFieldOffset = WriteBatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int InitialFrameSize = OffloadFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.MapStoreConfigHolder mapStoreConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, mapStoreConfigHolder.IsEnabled); + initialFrame.Bytes.WriteBoolL(WriteCoalescingFieldOffset, mapStoreConfigHolder.IsWriteCoalescing); + initialFrame.Bytes.WriteIntL(WriteDelaySecondsFieldOffset, mapStoreConfigHolder.WriteDelaySeconds); + initialFrame.Bytes.WriteIntL(WriteBatchSizeFieldOffset, mapStoreConfigHolder.WriteBatchSize); + initialFrame.Bytes.WriteBoolL(OffloadFieldOffset, mapStoreConfigHolder.IsOffload); + clientMessage.Append(initialFrame); + + CodecUtil.EncodeNullable(clientMessage, mapStoreConfigHolder.ClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, mapStoreConfigHolder.Implementation, DataCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, mapStoreConfigHolder.FactoryClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, mapStoreConfigHolder.FactoryImplementation, DataCodec.Encode); + MapCodec.EncodeNullable(clientMessage, mapStoreConfigHolder.Properties, StringCodec.Encode, StringCodec.Encode); + StringCodec.Encode(clientMessage, mapStoreConfigHolder.InitialLoadMode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.MapStoreConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var writeCoalescing = initialFrame.Bytes.ReadBoolL(WriteCoalescingFieldOffset); + var writeDelaySeconds = initialFrame.Bytes.ReadIntL(WriteDelaySecondsFieldOffset); + var writeBatchSize = initialFrame.Bytes.ReadIntL(WriteBatchSizeFieldOffset); + var isOffloadExists = false; + bool offload = default; + if (initialFrame.Bytes.Length >= OffloadFieldOffset + BytesExtensions.SizeOfBool) + { + offload = initialFrame.Bytes.ReadBoolL(OffloadFieldOffset); + isOffloadExists = true; + } + var className = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var implementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + var factoryClassName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var factoryImplementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + var properties = MapCodec.DecodeNullable(iterator, StringCodec.Decode, StringCodec.Decode); + var initialLoadMode = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.MapStoreConfigHolder(enabled, writeCoalescing, writeDelaySeconds, writeBatchSize, className, implementation, factoryClassName, factoryImplementation, properties, initialLoadMode, isOffloadExists, offload); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MemberInfoCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MemberInfoCodec.cs index c696c54b77..24e59c9e70 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/MemberInfoCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MemberInfoCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MemberVersionCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MemberVersionCodec.cs index 9289c6f036..896f3d1486 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/MemberVersionCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MemberVersionCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MemoryTierConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MemoryTierConfigCodec.cs index cc3e762c33..6f9c7c060c 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/MemoryTierConfigCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MemoryTierConfigCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MergePolicyConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MergePolicyConfigCodec.cs new file mode 100644 index 0000000000..ca0f3ebda4 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MergePolicyConfigCodec.cs @@ -0,0 +1,73 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class MergePolicyConfigCodec + { + private const int BatchSizeFieldOffset = 0; + private const int InitialFrameSize = BatchSizeFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.MergePolicyOptions mergePolicyConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteIntL(BatchSizeFieldOffset, mergePolicyConfig.BatchSize); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, mergePolicyConfig.Policy); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.MergePolicyOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var batchSize = initialFrame.Bytes.ReadIntL(BatchSizeFieldOffset); + + var policy = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return new Hazelcast.Models.MergePolicyOptions(policy, batchSize); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/MerkleTreeConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/MerkleTreeConfigCodec.cs new file mode 100644 index 0000000000..b7584b7a00 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/MerkleTreeConfigCodec.cs @@ -0,0 +1,81 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class MerkleTreeConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int DepthFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int EnabledSetFieldOffset = DepthFieldOffset + BytesExtensions.SizeOfInt; + private const int InitialFrameSize = EnabledSetFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.MerkleTreeOptions merkleTreeConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, merkleTreeConfig.Enabled); + initialFrame.Bytes.WriteIntL(DepthFieldOffset, merkleTreeConfig.Depth); + initialFrame.Bytes.WriteBoolL(EnabledSetFieldOffset, merkleTreeConfig.EnabledSet); + clientMessage.Append(initialFrame); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.MerkleTreeOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var depth = initialFrame.Bytes.ReadIntL(DepthFieldOffset); + var isEnabledSetExists = false; + bool enabledSet = default; + if (initialFrame.Bytes.Length >= EnabledSetFieldOffset + BytesExtensions.SizeOfBool) + { + enabledSet = initialFrame.Bytes.ReadBoolL(EnabledSetFieldOffset); + isEnabledSetExists = true; + } + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateMerkleTreeConfig(enabled, depth, isEnabledSetExists, enabledSet); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/NearCacheConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/NearCacheConfigHolderCodec.cs new file mode 100644 index 0000000000..6c6af64628 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/NearCacheConfigHolderCodec.cs @@ -0,0 +1,93 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class NearCacheConfigHolderCodec + { + private const int SerializeKeysFieldOffset = 0; + private const int InvalidateOnChangeFieldOffset = SerializeKeysFieldOffset + BytesExtensions.SizeOfBool; + private const int TimeToLiveSecondsFieldOffset = InvalidateOnChangeFieldOffset + BytesExtensions.SizeOfBool; + private const int MaxIdleSecondsFieldOffset = TimeToLiveSecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int CacheLocalEntriesFieldOffset = MaxIdleSecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int InitialFrameSize = CacheLocalEntriesFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.NearCacheConfigHolder nearCacheConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(SerializeKeysFieldOffset, nearCacheConfigHolder.IsSerializeKeys); + initialFrame.Bytes.WriteBoolL(InvalidateOnChangeFieldOffset, nearCacheConfigHolder.IsInvalidateOnChange); + initialFrame.Bytes.WriteIntL(TimeToLiveSecondsFieldOffset, nearCacheConfigHolder.TimeToLiveSeconds); + initialFrame.Bytes.WriteIntL(MaxIdleSecondsFieldOffset, nearCacheConfigHolder.MaxIdleSeconds); + initialFrame.Bytes.WriteBoolL(CacheLocalEntriesFieldOffset, nearCacheConfigHolder.IsCacheLocalEntries); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, nearCacheConfigHolder.Name); + StringCodec.Encode(clientMessage, nearCacheConfigHolder.InMemoryFormat); + EvictionConfigHolderCodec.Encode(clientMessage, nearCacheConfigHolder.EvictionConfigHolder); + StringCodec.Encode(clientMessage, nearCacheConfigHolder.LocalUpdatePolicy); + CodecUtil.EncodeNullable(clientMessage, nearCacheConfigHolder.PreloaderConfig, NearCachePreloaderConfigCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.NearCacheConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var serializeKeys = initialFrame.Bytes.ReadBoolL(SerializeKeysFieldOffset); + + var invalidateOnChange = initialFrame.Bytes.ReadBoolL(InvalidateOnChangeFieldOffset); + var timeToLiveSeconds = initialFrame.Bytes.ReadIntL(TimeToLiveSecondsFieldOffset); + var maxIdleSeconds = initialFrame.Bytes.ReadIntL(MaxIdleSecondsFieldOffset); + var cacheLocalEntries = initialFrame.Bytes.ReadBoolL(CacheLocalEntriesFieldOffset); + var name = StringCodec.Decode(iterator); + var inMemoryFormat = StringCodec.Decode(iterator); + var evictionConfigHolder = EvictionConfigHolderCodec.Decode(iterator); + var localUpdatePolicy = StringCodec.Decode(iterator); + var preloaderConfig = CodecUtil.DecodeNullable(iterator, NearCachePreloaderConfigCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.NearCacheConfigHolder(name, inMemoryFormat, serializeKeys, invalidateOnChange, timeToLiveSeconds, maxIdleSeconds, evictionConfigHolder, cacheLocalEntries, localUpdatePolicy, preloaderConfig); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/NearCachePreloaderConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/NearCachePreloaderConfigCodec.cs new file mode 100644 index 0000000000..a376e72d3d --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/NearCachePreloaderConfigCodec.cs @@ -0,0 +1,79 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class NearCachePreloaderConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int StoreInitialDelaySecondsFieldOffset = EnabledFieldOffset + BytesExtensions.SizeOfBool; + private const int StoreIntervalSecondsFieldOffset = StoreInitialDelaySecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int InitialFrameSize = StoreIntervalSecondsFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.NearCaching.NearCachePreloaderOptions nearCachePreloaderConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, nearCachePreloaderConfig.Enabled); + initialFrame.Bytes.WriteIntL(StoreInitialDelaySecondsFieldOffset, nearCachePreloaderConfig.StoreInitialDelaySeconds); + initialFrame.Bytes.WriteIntL(StoreIntervalSecondsFieldOffset, nearCachePreloaderConfig.StoreIntervalSeconds); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, nearCachePreloaderConfig.Directory); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.NearCaching.NearCachePreloaderOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var storeInitialDelaySeconds = initialFrame.Bytes.ReadIntL(StoreInitialDelaySecondsFieldOffset); + var storeIntervalSeconds = initialFrame.Bytes.ReadIntL(StoreIntervalSecondsFieldOffset); + var directory = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateNearCachePreloaderConfig(enabled, directory, storeInitialDelaySeconds, storeIntervalSeconds); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/PagingPredicateHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/PagingPredicateHolderCodec.cs index f2f72a1c87..b6192acc34 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/PagingPredicateHolderCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/PagingPredicateHolderCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/PartitioningAttributeConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/PartitioningAttributeConfigCodec.cs new file mode 100644 index 0000000000..f1a9b52ee7 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/PartitioningAttributeConfigCodec.cs @@ -0,0 +1,63 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class PartitioningAttributeConfigCodec + { + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.PartitioningAttributeOptions partitioningAttributeConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + StringCodec.Encode(clientMessage, partitioningAttributeConfig.AttributeName); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.PartitioningAttributeOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + var attributeName = StringCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return new Hazelcast.Models.PartitioningAttributeOptions(attributeName); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/PredicateConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/PredicateConfigHolderCodec.cs new file mode 100644 index 0000000000..962280119f --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/PredicateConfigHolderCodec.cs @@ -0,0 +1,67 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class PredicateConfigHolderCodec + { + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.PredicateConfigHolder predicateConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + CodecUtil.EncodeNullable(clientMessage, predicateConfigHolder.ClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, predicateConfigHolder.Sql, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, predicateConfigHolder.Implementation, DataCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.PredicateConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + var className = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var sql = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var implementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.PredicateConfigHolder(className, sql, implementation); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/QueryCacheConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/QueryCacheConfigHolderCodec.cs new file mode 100644 index 0000000000..f7481ca42a --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/QueryCacheConfigHolderCodec.cs @@ -0,0 +1,107 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class QueryCacheConfigHolderCodec + { + private const int BatchSizeFieldOffset = 0; + private const int BufferSizeFieldOffset = BatchSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int DelaySecondsFieldOffset = BufferSizeFieldOffset + BytesExtensions.SizeOfInt; + private const int IncludeValueFieldOffset = DelaySecondsFieldOffset + BytesExtensions.SizeOfInt; + private const int PopulateFieldOffset = IncludeValueFieldOffset + BytesExtensions.SizeOfBool; + private const int CoalesceFieldOffset = PopulateFieldOffset + BytesExtensions.SizeOfBool; + private const int SerializeKeysFieldOffset = CoalesceFieldOffset + BytesExtensions.SizeOfBool; + private const int InitialFrameSize = SerializeKeysFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.QueryCacheConfigHolder queryCacheConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteIntL(BatchSizeFieldOffset, queryCacheConfigHolder.BatchSize); + initialFrame.Bytes.WriteIntL(BufferSizeFieldOffset, queryCacheConfigHolder.BufferSize); + initialFrame.Bytes.WriteIntL(DelaySecondsFieldOffset, queryCacheConfigHolder.DelaySeconds); + initialFrame.Bytes.WriteBoolL(IncludeValueFieldOffset, queryCacheConfigHolder.IsIncludeValue); + initialFrame.Bytes.WriteBoolL(PopulateFieldOffset, queryCacheConfigHolder.IsPopulate); + initialFrame.Bytes.WriteBoolL(CoalesceFieldOffset, queryCacheConfigHolder.IsCoalesce); + initialFrame.Bytes.WriteBoolL(SerializeKeysFieldOffset, queryCacheConfigHolder.IsSerializeKeys); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, queryCacheConfigHolder.InMemoryFormat); + StringCodec.Encode(clientMessage, queryCacheConfigHolder.Name); + PredicateConfigHolderCodec.Encode(clientMessage, queryCacheConfigHolder.PredicateConfigHolder); + EvictionConfigHolderCodec.Encode(clientMessage, queryCacheConfigHolder.EvictionConfigHolder); + ListMultiFrameCodec.EncodeNullable(clientMessage, queryCacheConfigHolder.ListenerConfigs, ListenerConfigHolderCodec.Encode); + ListMultiFrameCodec.EncodeNullable(clientMessage, queryCacheConfigHolder.IndexConfigs, IndexConfigCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.QueryCacheConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var batchSize = initialFrame.Bytes.ReadIntL(BatchSizeFieldOffset); + + var bufferSize = initialFrame.Bytes.ReadIntL(BufferSizeFieldOffset); + var delaySeconds = initialFrame.Bytes.ReadIntL(DelaySecondsFieldOffset); + var includeValue = initialFrame.Bytes.ReadBoolL(IncludeValueFieldOffset); + var populate = initialFrame.Bytes.ReadBoolL(PopulateFieldOffset); + var coalesce = initialFrame.Bytes.ReadBoolL(CoalesceFieldOffset); + var isSerializeKeysExists = false; + bool serializeKeys = default; + if (initialFrame.Bytes.Length >= SerializeKeysFieldOffset + BytesExtensions.SizeOfBool) + { + serializeKeys = initialFrame.Bytes.ReadBoolL(SerializeKeysFieldOffset); + isSerializeKeysExists = true; + } + var inMemoryFormat = StringCodec.Decode(iterator); + var name = StringCodec.Decode(iterator); + var predicateConfigHolder = PredicateConfigHolderCodec.Decode(iterator); + var evictionConfigHolder = EvictionConfigHolderCodec.Decode(iterator); + var listenerConfigs = ListMultiFrameCodec.DecodeNullable(iterator, ListenerConfigHolderCodec.Decode); + var indexConfigs = ListMultiFrameCodec.DecodeNullable(iterator, IndexConfigCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.QueryCacheConfigHolder(batchSize, bufferSize, delaySeconds, includeValue, populate, coalesce, inMemoryFormat, name, predicateConfigHolder, evictionConfigHolder, listenerConfigs, indexConfigs, isSerializeKeysExists, serializeKeys); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/RaftGroupIdCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/RaftGroupIdCodec.cs index dc408d3816..462504bb3d 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/RaftGroupIdCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/RaftGroupIdCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/RingbufferStoreConfigHolderCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/RingbufferStoreConfigHolderCodec.cs new file mode 100644 index 0000000000..10a8f8f445 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/RingbufferStoreConfigHolderCodec.cs @@ -0,0 +1,81 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class RingbufferStoreConfigHolderCodec + { + private const int EnabledFieldOffset = 0; + private const int InitialFrameSize = EnabledFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Protocol.Models.RingbufferStoreConfigHolder ringbufferStoreConfigHolder) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, ringbufferStoreConfigHolder.IsEnabled); + clientMessage.Append(initialFrame); + + CodecUtil.EncodeNullable(clientMessage, ringbufferStoreConfigHolder.ClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, ringbufferStoreConfigHolder.FactoryClassName, StringCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, ringbufferStoreConfigHolder.Implementation, DataCodec.Encode); + CodecUtil.EncodeNullable(clientMessage, ringbufferStoreConfigHolder.FactoryImplementation, DataCodec.Encode); + MapCodec.EncodeNullable(clientMessage, ringbufferStoreConfigHolder.Properties, StringCodec.Encode, StringCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Protocol.Models.RingbufferStoreConfigHolder Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var className = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var factoryClassName = CodecUtil.DecodeNullable(iterator, StringCodec.Decode); + var implementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + var factoryImplementation = CodecUtil.DecodeNullable(iterator, DataCodec.Decode); + var properties = MapCodec.DecodeNullable(iterator, StringCodec.Decode, StringCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Protocol.Models.RingbufferStoreConfigHolder(className, factoryClassName, implementation, factoryImplementation, properties, enabled); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/SchemaCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/SchemaCodec.cs index 29933d0fa3..f9d83431a1 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/SchemaCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/SchemaCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/SimpleEntryViewCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/SimpleEntryViewCodec.cs index 4959b590f7..ded133af93 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/SimpleEntryViewCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/SimpleEntryViewCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlColumnMetadataCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlColumnMetadataCodec.cs index a5183849bd..8ec637dc6c 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlColumnMetadataCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlColumnMetadataCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlErrorCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlErrorCodec.cs index d3c0d1be01..b10e67624c 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlErrorCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlErrorCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlQueryIdCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlQueryIdCodec.cs index 889d8e39cd..d158e243e2 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/SqlQueryIdCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/SqlQueryIdCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/StackTraceElementCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/StackTraceElementCodec.cs index a8b821d419..57b77f7e91 100644 --- a/src/Hazelcast.Net/Protocol/CustomCodecs/StackTraceElementCodec.cs +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/StackTraceElementCodec.cs @@ -14,7 +14,7 @@ // // This code was generated by a tool. -// Hazelcast Client Protocol Code Generator @54480b651 +// Hazelcast Client Protocol Code Generator @0a5719d // https://github.com/hazelcast/hazelcast-client-protocol // Change to this file will be lost if the code is regenerated. // diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/TieredStoreConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/TieredStoreConfigCodec.cs new file mode 100644 index 0000000000..8eaf7de41c --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/TieredStoreConfigCodec.cs @@ -0,0 +1,75 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class TieredStoreConfigCodec + { + private const int EnabledFieldOffset = 0; + private const int InitialFrameSize = EnabledFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.TieredStoreOptions tieredStoreConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(EnabledFieldOffset, tieredStoreConfig.Enabled); + clientMessage.Append(initialFrame); + + MemoryTierConfigCodec.Encode(clientMessage, tieredStoreConfig.MemoryTier); + DiskTierConfigCodec.Encode(clientMessage, tieredStoreConfig.DiskTier); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.TieredStoreOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var enabled = initialFrame.Bytes.ReadBoolL(EnabledFieldOffset); + + var memoryTierConfig = MemoryTierConfigCodec.Decode(iterator); + var diskTierConfig = DiskTierConfigCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateTieredStoreConfig(enabled, memoryTierConfig, diskTierConfig); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/TimedExpiryPolicyFactoryConfigCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/TimedExpiryPolicyFactoryConfigCodec.cs new file mode 100644 index 0000000000..9ac29df9aa --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/TimedExpiryPolicyFactoryConfigCodec.cs @@ -0,0 +1,73 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class TimedExpiryPolicyFactoryConfigCodec + { + private const int ExpiryPolicyTypeFieldOffset = 0; + private const int InitialFrameSize = ExpiryPolicyTypeFieldOffset + BytesExtensions.SizeOfInt; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.TimedExpiryPolicyFactoryOptions timedExpiryPolicyFactoryConfig) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteIntL(ExpiryPolicyTypeFieldOffset, timedExpiryPolicyFactoryConfig.ExpiryPolicyType); + clientMessage.Append(initialFrame); + + DurationConfigCodec.Encode(clientMessage, timedExpiryPolicyFactoryConfig.DurationConfig); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.TimedExpiryPolicyFactoryOptions Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var expiryPolicyType = initialFrame.Bytes.ReadIntL(ExpiryPolicyTypeFieldOffset); + + var durationConfig = DurationConfigCodec.Decode(iterator); + + iterator.SkipToStructEnd(); + return CustomTypeFactory.CreateTimedExpiryPolicyFactoryConfig(expiryPolicyType, durationConfig); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/CustomCodecs/WanReplicationRefCodec.cs b/src/Hazelcast.Net/Protocol/CustomCodecs/WanReplicationRefCodec.cs new file mode 100644 index 0000000000..f126e8d511 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/CustomCodecs/WanReplicationRefCodec.cs @@ -0,0 +1,77 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +// +// This code was generated by a tool. +// Hazelcast Client Protocol Code Generator @0a5719d +// https://github.com/hazelcast/hazelcast-client-protocol +// Change to this file will be lost if the code is regenerated. +// + +#pragma warning disable IDE0051 // Remove unused private members +// ReSharper disable UnusedMember.Local +// ReSharper disable RedundantUsingDirective +// ReSharper disable CheckNamespace + +using System; +using System.Collections.Generic; +using Hazelcast.Protocol.BuiltInCodecs; +using Hazelcast.Protocol.CustomCodecs; +using Hazelcast.Core; +using Hazelcast.Messaging; +using Hazelcast.Clustering; +using Hazelcast.Serialization; +using Microsoft.Extensions.Logging; + +namespace Hazelcast.Protocol.CustomCodecs +{ + internal static class WanReplicationRefCodec + { + private const int RepublishingEnabledFieldOffset = 0; + private const int InitialFrameSize = RepublishingEnabledFieldOffset + BytesExtensions.SizeOfBool; + + public static void Encode(ClientMessage clientMessage, Hazelcast.Models.WanReplicationRef wanReplicationRef) + { + clientMessage.Append(Frame.CreateBeginStruct()); + + var initialFrame = new Frame(new byte[InitialFrameSize]); + initialFrame.Bytes.WriteBoolL(RepublishingEnabledFieldOffset, wanReplicationRef.RepublishingEnabled); + clientMessage.Append(initialFrame); + + StringCodec.Encode(clientMessage, wanReplicationRef.Name); + StringCodec.Encode(clientMessage, wanReplicationRef.MergePolicyClassName); + ListMultiFrameCodec.EncodeNullable(clientMessage, wanReplicationRef.Filters, StringCodec.Encode); + + clientMessage.Append(Frame.CreateEndStruct()); + } + + public static Hazelcast.Models.WanReplicationRef Decode(IEnumerator iterator) + { + // begin frame + iterator.Take(); + + var initialFrame = iterator.Take(); + var republishingEnabled = initialFrame.Bytes.ReadBoolL(RepublishingEnabledFieldOffset); + + var name = StringCodec.Decode(iterator); + var mergePolicyClassName = StringCodec.Decode(iterator); + var filters = ListMultiFrameCodec.DecodeNullable(iterator, StringCodec.Decode); + + iterator.SkipToStructEnd(); + return new Hazelcast.Models.WanReplicationRef(name, mergePolicyClassName, filters, republishingEnabled); + } + } +} + +#pragma warning restore IDE0051 // Remove unused private members diff --git a/src/Hazelcast.Net/Protocol/Models/EvictionConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/EvictionConfigHolder.cs new file mode 100644 index 0000000000..909451087d --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/EvictionConfigHolder.cs @@ -0,0 +1,69 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.NearCaching; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class EvictionConfigHolder +{ + public EvictionConfigHolder(int size, string maxSizePolicy, string evictionPolicy, string comparatorClassName, IData comparator) + { + Size = size; + MaxSizePolicy = maxSizePolicy; + EvictionPolicy = evictionPolicy; + ComparatorClassName = comparatorClassName; + Comparator = comparator; + } + + public int Size { get; } + + public string MaxSizePolicy { get; } + + public string EvictionPolicy { get; } + + public string ComparatorClassName { get; } + + public IData Comparator { get; } + + public EvictionOptions ToEvictionConfig() + { + var config = new EvictionOptions + { + Size = Size, + MaxSizePolicy = Enums.ParseJava(MaxSizePolicy), + EvictionPolicy = Enums.ParseJava(EvictionPolicy) + }; + + if (ComparatorClassName != null) + config.ComparatorClassName = ComparatorClassName; + + /*comparator*/ + + return config; + } + + public static EvictionConfigHolder Of(EvictionOptions config) + { + return new EvictionConfigHolder( + config.Size, + config.MaxSizePolicy.ToJavaString(), + config.EvictionPolicy.ToJavaString(), + config.ComparatorClassName, + null/*comparator*/); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Protocol/Models/ListenerConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/ListenerConfigHolder.cs new file mode 100644 index 0000000000..3ac0244a8b --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/ListenerConfigHolder.cs @@ -0,0 +1,84 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Diagnostics.Tracing; +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class ListenerConfigHolder +{ + // note: we need to have listenerImplementation as a ctor parameter even + // though we don't support it, as codecs will expect the ctor to exist + + public ListenerConfigHolder(int listenerType, IData listenerImplementation, string className, bool includeValue, bool local) + : this(((ListenerConfigType) listenerType).ThrowIfUndefined(), listenerImplementation, className, includeValue, local) + { } + + public ListenerConfigHolder(ListenerConfigType listenerType, IData listenerImplementation, string className, bool includeValue, bool local) + { + ListenerType = listenerType; + ClassName = className; + IsIncludeValue = includeValue; + IsLocal = local; + } + + public string ClassName { get; } + + public ListenerConfigType ListenerType { get; } + + public bool IsIncludeValue { get; } + + public bool IsLocal { get; } + + public IData ListenerImplementation { get; } + + // FIXME missing mappings + + public T ToListenerConfig() + where T : ListenerOptions + { + if (ClassName == null) + throw new InvalidOperationException("ClassName must not be null."); + + return ListenerType switch + { + //ListenerConfigType.Item => new ItemListenerConfig(ClassName, IsIncludeValue).MustBe(), + ListenerConfigType.Entry => new EntryListenerOptions(ClassName, IsLocal, IsIncludeValue).MustBe(), + //ListenerConfigType.SplitBrainProtection => new SplitBrainProtectionListenerConfig(ClassName).MustBe(), + //ListenerConfigType.CachePartitionLost => new CachePartitionLostListenerConfig(ClassName).MustBe(), + ListenerConfigType.MapPartitionLost => new MapPartitionLostListenerOptions(ClassName).MustBe(), + ListenerConfigType.Generic => new ListenerOptions(ClassName).MustBe(), + _ => null + }; + } + + public static ListenerConfigHolder Of(ListenerOptions config) + { + var listenerType = config switch + { + //ItemListenerConfig => ListenerConfigType.Item, + EntryListenerOptions => ListenerConfigType.Entry, + //SplitBrainProtectionListenerConfig => ListenerConfigType.SplitBrainProtection, + //CachePartitionLostListenerConfig => ListenerConfigType.CachePartitionLost, + MapPartitionLostListenerOptions => ListenerConfigType.MapPartitionLost, + _ => ListenerConfigType.Generic + }; + + return new ListenerConfigHolder(listenerType, null, config.ClassName, config.IncludeValue, config.Local); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Protocol/Models/ListenerConfigType.cs b/src/Hazelcast.Net/Protocol/Models/ListenerConfigType.cs new file mode 100644 index 0000000000..ab61352f99 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/ListenerConfigType.cs @@ -0,0 +1,50 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; + +namespace Hazelcast.Protocol.Models; + +internal enum ListenerConfigType +{ + /// + /// Not specific to any data structure or service. + /// + [Enums.JavaName("GENERIC")] Generic = 0, + + /// + /// For ItemListenerConfig. + /// + [Enums.JavaName("ITEM")] Item = 1, + + /// + /// For EntryListenerConfig. + /// + [Enums.JavaName("ENTRY")] Entry = 2, + + /// + /// For SplitBrainProtectionListenerConfig. + /// + [Enums.JavaName("SPLIT_BRAIN_PROTECTION")] SplitBrainProtection = 3, + + /// + /// For CachePartitionLostListenerConfig. + /// + [Enums.JavaName("CACHE_PARTITION_LOST")] CachePartitionLost = 4, + + /// + /// For MapPartitionLostListenerConfig. + /// + [Enums.JavaName("MAP_PARTITION_LOST")] MapPartitionLost = 5 +} diff --git a/src/Hazelcast.Net/Protocol/Models/MapStoreConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/MapStoreConfigHolder.cs new file mode 100644 index 0000000000..6115eac8a8 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/MapStoreConfigHolder.cs @@ -0,0 +1,112 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System.Collections.Generic; +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class MapStoreConfigHolder +{ + private bool? _isOffload; + + public MapStoreConfigHolder() + { } + + public MapStoreConfigHolder(bool enabled, bool writeCoalescing, int writeDelaySeconds, int writeBatchSize, + string className, IData implementation, + string factoryClassName, IData factoryImplementation, + Dictionary properties, + string initialLoadMode, bool isOffloadExists, bool offload) + { + IsEnabled = enabled; + IsWriteCoalescing = writeCoalescing; + ClassName = className; + Implementation = implementation; + FactoryClassName = factoryClassName; + FactoryImplementation = factoryImplementation; + WriteDelaySeconds = writeDelaySeconds; + WriteBatchSize = writeBatchSize; + Properties = properties; + InitialLoadMode = initialLoadMode; + _isOffload = isOffloadExists ? offload : null; + } + + public bool IsEnabled { get; set; } + + public bool IsOffload + { + get => _isOffload ?? false; + set => _isOffload = value; + } + + public bool IsWriteCoalescing { get; set; } + + public string ClassName { get; set; } + + public IData Implementation { get; set; } + + public string FactoryClassName { get; set; } + + public IData FactoryImplementation { get; set; } + + public int WriteDelaySeconds { get; set; } + + public int WriteBatchSize { get; set; } + + public Dictionary Properties { get; set; } + + public string InitialLoadMode { get; set; } + + public MapStoreOptions ToMapStoreConfig() + { + var config = new MapStoreOptions(); + if (!string.IsNullOrEmpty(ClassName)) + config.ClassName = ClassName; + config.Enabled = IsEnabled; + if (!string.IsNullOrEmpty(FactoryClassName)) + config.FactoryClassName = FactoryClassName; + config.InitialLoadMode = Enums.ParseJava(InitialLoadMode); + if (Properties != null) + config.Properties = Properties; + config.WriteBatchSize = WriteBatchSize; + config.WriteCoalescing = IsWriteCoalescing; + config.WriteDelaySeconds = WriteDelaySeconds; + if (_isOffload.HasValue) + config.Offload = _isOffload.Value; + return config; + } + + public static MapStoreConfigHolder Of(MapStoreOptions config) + { + if (config == null) + return null; + + var holder = new MapStoreConfigHolder + { + ClassName = config.ClassName, + IsEnabled = config.Enabled, + FactoryClassName = config.FactoryClassName, + InitialLoadMode = config.InitialLoadMode.ToJavaString(), + Properties = config.Properties, + WriteBatchSize = config.WriteBatchSize, + IsWriteCoalescing = config.WriteCoalescing, + WriteDelaySeconds = config.WriteDelaySeconds, + IsOffload = config.Offload + }; + return holder; + } +} diff --git a/src/Hazelcast.Net/Protocol/Models/NearCacheConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/NearCacheConfigHolder.cs new file mode 100644 index 0000000000..8ccc81ba85 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/NearCacheConfigHolder.cs @@ -0,0 +1,88 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.NearCaching; + +namespace Hazelcast.Protocol.Models; + +internal class NearCacheConfigHolder +{ + public NearCacheConfigHolder(string name, string inMemoryFormat, bool serializeKeys, + bool invalidateOnChange, int timeToLiveSeconds, int maxIdleSeconds, + EvictionConfigHolder evictionConfigHolder, bool cacheLocalEntries, + string localUpdatePolicy, NearCachePreloaderOptions preloaderConfig) + { + Name = name; + InMemoryFormat = inMemoryFormat; + IsSerializeKeys = serializeKeys; + IsInvalidateOnChange = invalidateOnChange; + TimeToLiveSeconds = timeToLiveSeconds; + MaxIdleSeconds = maxIdleSeconds; + EvictionConfigHolder = evictionConfigHolder; + IsCacheLocalEntries = cacheLocalEntries; + LocalUpdatePolicy = localUpdatePolicy; + PreloaderConfig = preloaderConfig; + } + + public string Name { get; set; } + + public string InMemoryFormat { get; set; } + + public bool IsSerializeKeys { get; set; } + + public bool IsInvalidateOnChange { get; set; } + + public int TimeToLiveSeconds { get; set; } + + public int MaxIdleSeconds { get; set; } + + public EvictionConfigHolder EvictionConfigHolder { get; set; } + + public bool IsCacheLocalEntries { get; set; } + + public string LocalUpdatePolicy { get; set; } + + public NearCachePreloaderOptions PreloaderConfig { get; set; } + + public NearCacheOptions ToNearCacheConfig() + { + var config = new NearCacheOptions + { + Name = Name, + InMemoryFormat = Enums.ParseJava(InMemoryFormat), + SerializeKeys = IsSerializeKeys, + InvalidateOnChange = IsInvalidateOnChange, + TimeToLiveSeconds = TimeToLiveSeconds, + MaxIdleSeconds = MaxIdleSeconds, + Eviction = EvictionConfigHolder.ToEvictionConfig(), + CacheLocalEntries = IsCacheLocalEntries, + LocalUpdatePolicy = Enums.ParseJava(LocalUpdatePolicy), + Preloader = PreloaderConfig + }; + return config; + } + + public static NearCacheConfigHolder Of(NearCacheOptions config) + { + if (config == null) + return null; + + return new NearCacheConfigHolder(config.Name, config.InMemoryFormat.ToJavaString(), config.SerializeKeys, + config.InvalidateOnChange, config.TimeToLiveSeconds, config.MaxIdleSeconds, + EvictionConfigHolder.Of(config.Eviction), + config.CacheLocalEntries, config.LocalUpdatePolicy.ToJavaString(), config.Preloader); + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Protocol/Models/PredicateConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/PredicateConfigHolder.cs new file mode 100644 index 0000000000..6bf7812423 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/PredicateConfigHolder.cs @@ -0,0 +1,46 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using Hazelcast.Models; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class PredicateConfigHolder +{ + public PredicateConfigHolder(string className, string sql, IData implementation) + { + ClassName = className; + Sql = sql; + Implementation = implementation; + } + + public string ClassName { get; } + + public string Sql { get; } + + public IData Implementation { get; } + + public PredicateOptions ToPredicateConfig() + { + return ClassName != null + ? new PredicateOptions(ClassName) + : new PredicateOptions(); + } + + public static PredicateConfigHolder Of(PredicateOptions config) + { + return new PredicateConfigHolder(config.ClassName, config.Sql, null); + } +} diff --git a/src/Hazelcast.Net/Protocol/Models/QueryCacheConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/QueryCacheConfigHolder.cs new file mode 100644 index 0000000000..d70e1d02d7 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/QueryCacheConfigHolder.cs @@ -0,0 +1,131 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System.Collections.Generic; +using Hazelcast.Core; +using Hazelcast.Models; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class QueryCacheConfigHolder +{ + private bool? _isSerializeKeys; + + public QueryCacheConfigHolder() + { } + + public QueryCacheConfigHolder(int batchSize, int bufferSize, int delaySeconds, bool includeValue, + bool populate, bool coalesce, string inMemoryFormat, string name, + PredicateConfigHolder predicateConfigHolder, + EvictionConfigHolder evictionConfigHolder, List listenerConfigs, + List indexConfigs, bool serializeKeysExist, bool serializeKeys) + { + BatchSize = batchSize; + BufferSize = bufferSize; + DelaySeconds = delaySeconds; + IsIncludeValue = includeValue; + IsPopulate = populate; + IsCoalesce = coalesce; + _isSerializeKeys = serializeKeysExist ? serializeKeys : null; + InMemoryFormat = inMemoryFormat; + Name = name; + PredicateConfigHolder = predicateConfigHolder; + EvictionConfigHolder = evictionConfigHolder; + ListenerConfigs = listenerConfigs; + IndexConfigs = indexConfigs; + } + + public int BatchSize { get; set; } + + public int BufferSize { get; set; } + + public int DelaySeconds { get; set; } + + public bool IsIncludeValue { get; set; } + + public bool IsPopulate { get; set; } + + public bool IsSerializeKeys + { + get => _isSerializeKeys ?? false; + set => _isSerializeKeys = value; + } + + public bool IsCoalesce { get; set; } + + public string InMemoryFormat { get; set; } + + public string Name { get; set; } + public PredicateConfigHolder PredicateConfigHolder { get; set; } + + public EvictionConfigHolder EvictionConfigHolder { get; set; } + + public List ListenerConfigs { get; set; } + + public List IndexConfigs { get; set; } + + public QueryCacheOptions ToQueryCacheConfig(SerializationService serializationService) + { + var config = new QueryCacheOptions + { + BatchSize = BatchSize, + BufferSize = BufferSize, + Coalesce = IsCoalesce, + DelaySeconds = DelaySeconds, + Eviction = EvictionConfigHolder.ToEvictionConfig(), + EntryListeners = ListenerConfigs is {Count: > 0} + ? ListenerConfigs.Map(x => x.ToListenerConfig()) + : new(), + IncludeValue = IsIncludeValue, + InMemoryFormat = Enums.ParseJava(InMemoryFormat), + Indexes = IndexConfigs ?? new List(), + Name = Name, + Predicate = PredicateConfigHolder.ToPredicateConfig(), + Populate = IsPopulate + }; + + if (_isSerializeKeys.HasValue) + config.SerializeKeys = _isSerializeKeys.Value; + + return config; + } + + public static QueryCacheConfigHolder Of(QueryCacheOptions config, SerializationService serializationService) + { + var holder = new QueryCacheConfigHolder + { + BatchSize = config.BatchSize, + BufferSize = config.BufferSize, + IsCoalesce = config.Coalesce, + DelaySeconds = config.DelaySeconds, + EvictionConfigHolder = EvictionConfigHolder.Of(config.Eviction), + IsIncludeValue = config.IncludeValue, + InMemoryFormat = config.InMemoryFormat.ToJavaString(), + Name = config.Name, + }; + + if (config.Indexes is {Count: > 0}) + holder.IndexConfigs = config.Indexes.Map(x => new IndexOptions(x)); + + if (config.EntryListeners is {Count: > 0}) + holder.ListenerConfigs = config.EntryListeners.Map(ListenerConfigHolder.Of); + + holder.PredicateConfigHolder = PredicateConfigHolder.Of(config.Predicate); + holder.IsPopulate = config.Populate; + holder.IsSerializeKeys = config.SerializeKeys; + + return holder; + } +} \ No newline at end of file diff --git a/src/Hazelcast.Net/Protocol/Models/RingbufferStoreConfigHolder.cs b/src/Hazelcast.Net/Protocol/Models/RingbufferStoreConfigHolder.cs new file mode 100644 index 0000000000..20d0bbd633 --- /dev/null +++ b/src/Hazelcast.Net/Protocol/Models/RingbufferStoreConfigHolder.cs @@ -0,0 +1,64 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; +using Hazelcast.Models; +using Hazelcast.Serialization; + +namespace Hazelcast.Protocol.Models; + +internal class RingbufferStoreConfigHolder +{ + public RingbufferStoreConfigHolder(string className, string factoryClassName, IData implementation, + IData factoryImplementation, Dictionary properties, + bool enabled) + { + ClassName = className; + FactoryClassName = factoryClassName; + Implementation = implementation; + FactoryImplementation = factoryImplementation; + Properties = properties; + IsEnabled = enabled; + } + + public string ClassName { get; } + + public string FactoryClassName { get; } + + public IData Implementation { get; } + + public IData FactoryImplementation { get; } + + public Dictionary Properties { get; } + + public bool IsEnabled { get; } + + public static RingbufferStoreConfigHolder Of(RingbufferStoreOptions options) + { + if (options.ClassName == null && + options.FactoryClassName == null && + options.Enabled) + { + throw new ArgumentException("Either ClassName or FactoryClassName has to be non-null.", nameof(options)); + } + + return new RingbufferStoreConfigHolder( + options.ClassName, + options.FactoryClassName, + null, null, // no implementations + options.Properties, + options.Enabled); + } +} diff --git a/src/Hazelcast.Net/PublicAPI/PublicAPI.Shipped.txt b/src/Hazelcast.Net/PublicAPI/PublicAPI.Shipped.txt index 1c2c511a88..651508e417 100644 --- a/src/Hazelcast.Net/PublicAPI/PublicAPI.Shipped.txt +++ b/src/Hazelcast.Net/PublicAPI/PublicAPI.Shipped.txt @@ -1883,4 +1883,762 @@ override Hazelcast.Models.DistributedObjectInfo.GetHashCode() -> int ~override Hazelcast.Models.DistributedObjectInfo.ToString() -> string ~static Hazelcast.Models.DistributedObjectInfo.operator !=(Hazelcast.Models.DistributedObjectInfo left, Hazelcast.Models.DistributedObjectInfo right) -> bool ~static Hazelcast.Models.DistributedObjectInfo.operator ==(Hazelcast.Models.DistributedObjectInfo left, Hazelcast.Models.DistributedObjectInfo right) -> bool -~override Hazelcast.Logging.SingletonLoggerFactoryServiceFactory.Service.get -> Microsoft.Extensions.Logging.ILoggerFactory \ No newline at end of file +~override Hazelcast.Logging.SingletonLoggerFactoryServiceFactory.Service.get -> Microsoft.Extensions.Logging.ILoggerFactory +*REMOVED*Hazelcast.PreviewOptions +*REMOVED*Hazelcast.PreviewOptions.EnableNewReconnectOptions.get -> bool +*REMOVED*Hazelcast.PreviewOptions.EnableNewReconnectOptions.set -> void +*REMOVED*Hazelcast.PreviewOptions.EnableNewRetryOptions.get -> bool +*REMOVED*Hazelcast.PreviewOptions.EnableNewRetryOptions.set -> void +*REMOVED*Hazelcast.PreviewOptions.PreviewOptions() -> void +*REMOVED*~Hazelcast.HazelcastOptions.Preview.get -> Hazelcast.PreviewOptions +*REMOVED*~Hazelcast.Messaging.MessagingOptions.MessagingOptions(Hazelcast.PreviewOptions preview = null) -> void +*REMOVED*~Hazelcast.Networking.NetworkingOptions.NetworkingOptions(Hazelcast.PreviewOptions preview = null) -> void +*REMOVED*~Hazelcast.PreviewOptions.Clone() -> Hazelcast.PreviewOptions +const Hazelcast.Models.QueryCacheOptions.Defaults.DelaySeconds = 0 -> int +const Hazelcast.Models.QueryCacheOptions.Defaults.InMemoryFormat = Hazelcast.Core.InMemoryFormat.Binary -> Hazelcast.Core.InMemoryFormat +const Hazelcast.Models.RingbufferOptions.Defaults.InMemoryFormat = Hazelcast.Core.InMemoryFormat.Binary -> Hazelcast.Core.InMemoryFormat +const Hazelcast.NearCaching.NearCacheOptions.Defaults.MemoryFormat = Hazelcast.Core.InMemoryFormat.Binary -> Hazelcast.Core.InMemoryFormat +Hazelcast.Configuration.DynamicOptions +Hazelcast.Core.InMemoryFormat.Native = 2 -> Hazelcast.Core.InMemoryFormat +Hazelcast.DistributedObjects.IHReliableTopic +Hazelcast.DistributedObjects.IHReliableTopic.IsSubscription(System.Guid subscriptionId) -> bool +Hazelcast.DistributedObjects.IHReliableTopic.UnsubscribeAsync(System.Guid subscriptionId) -> System.Threading.Tasks.ValueTask +Hazelcast.DistributedObjects.IReliableTopicEventHandlerBase +Hazelcast.DistributedObjects.IReliableTopicExceptionEventHandler +Hazelcast.DistributedObjects.IReliableTopicMessageEventHandler +Hazelcast.DistributedObjects.IReliableTopicTerminatedEventHandler +Hazelcast.DistributedObjects.IRingBufferResultSet +Hazelcast.DistributedObjects.IRingBufferResultSet.GetSequence(int index) -> long +Hazelcast.DistributedObjects.IRingBufferResultSet.NextSequence.get -> long +Hazelcast.DistributedObjects.ReliableTopicEventHandlers +Hazelcast.DistributedObjects.ReliableTopicEventHandlers.ReliableTopicEventHandlers() -> void +Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs +Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs.Cancel.get -> bool +Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs.Cancel.set -> void +Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs.Sequence.get -> long +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.Cancel.get -> bool +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.Cancel.set -> void +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.Payload.get -> T +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.PublishTime.get -> long +Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.Sequence.get -> long +Hazelcast.DistributedObjects.ReliableTopicTerminatedEventArgs +Hazelcast.DistributedObjects.ReliableTopicTerminatedEventArgs.Sequence.get -> long +Hazelcast.Exceptions.TopicOverloadException +Hazelcast.Exceptions.TopicOverloadException.TopicOverloadException() -> void +Hazelcast.Messaging.MessagingOptions.MessagingOptions() -> void +Hazelcast.Models.AttributeOptions +Hazelcast.Models.AttributeOptions.AttributeOptions() -> void +Hazelcast.Models.AttributeOptions.ClassId.get -> int +Hazelcast.Models.AttributeOptions.FactoryId.get -> int +Hazelcast.Models.BTreeIndexOptions +Hazelcast.Models.BTreeIndexOptions.BTreeIndexOptions() -> void +Hazelcast.Models.BTreeIndexOptions.BTreeIndexOptions(Hazelcast.Models.BTreeIndexOptions! indexOptions) -> void +Hazelcast.Models.BTreeIndexOptions.ClassId.get -> int +Hazelcast.Models.BTreeIndexOptions.FactoryId.get -> int +Hazelcast.Models.BTreeIndexOptions.MemoryTier.get -> Hazelcast.Models.MemoryTierOptions! +Hazelcast.Models.BTreeIndexOptions.MemoryTier.set -> void +Hazelcast.Models.BTreeIndexOptions.PageSize.get -> Hazelcast.Models.Capacity! +Hazelcast.Models.BTreeIndexOptions.PageSize.set -> void +Hazelcast.Models.BTreeIndexOptions.ReadData(Hazelcast.Serialization.IObjectDataInput! input) -> void +Hazelcast.Models.BTreeIndexOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput! output) -> void +Hazelcast.Models.BitmapIndexOptions.ClassId.get -> int +Hazelcast.Models.BitmapIndexOptions.FactoryId.get -> int +Hazelcast.Models.CacheDeserializedValues +Hazelcast.Models.CacheDeserializedValues.Always = 2 -> Hazelcast.Models.CacheDeserializedValues +Hazelcast.Models.CacheDeserializedValues.IndexOnly = 1 -> Hazelcast.Models.CacheDeserializedValues +Hazelcast.Models.CacheDeserializedValues.Never = 0 -> Hazelcast.Models.CacheDeserializedValues +Hazelcast.Models.CacheSimpleEntryListenerOptions +Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheSimpleEntryListenerOptions() -> void +Hazelcast.Models.CacheSimpleEntryListenerOptions.ClassId.get -> int +Hazelcast.Models.CacheSimpleEntryListenerOptions.FactoryId.get -> int +Hazelcast.Models.CacheSimpleEntryListenerOptions.OldValueRequired.get -> bool +Hazelcast.Models.CacheSimpleEntryListenerOptions.OldValueRequired.set -> void +Hazelcast.Models.CacheSimpleEntryListenerOptions.Synchronous.get -> bool +Hazelcast.Models.CacheSimpleEntryListenerOptions.Synchronous.set -> void +Hazelcast.Models.Capacity +Hazelcast.Models.Capacity.Bytes.get -> long +Hazelcast.Models.Capacity.Capacity(long value) -> void +Hazelcast.Models.Capacity.Capacity(long value, Hazelcast.Models.MemoryUnit unit) -> void +Hazelcast.Models.Capacity.GigaBytes.get -> long +Hazelcast.Models.Capacity.KiloBytes.get -> long +Hazelcast.Models.Capacity.MegaBytes.get -> long +Hazelcast.Models.Capacity.Unit.get -> Hazelcast.Models.MemoryUnit +Hazelcast.Models.Capacity.Value.get -> long +Hazelcast.Models.DataPersistenceOptions +Hazelcast.Models.DataPersistenceOptions.ClassId.get -> int +Hazelcast.Models.DataPersistenceOptions.DataPersistenceOptions() -> void +Hazelcast.Models.DataPersistenceOptions.Defaults +Hazelcast.Models.DataPersistenceOptions.Enabled.get -> bool +Hazelcast.Models.DataPersistenceOptions.Enabled.set -> void +Hazelcast.Models.DataPersistenceOptions.FactoryId.get -> int +Hazelcast.Models.DataPersistenceOptions.Fsync.get -> bool +Hazelcast.Models.DataPersistenceOptions.Fsync.set -> void +Hazelcast.Models.DiskTierOptions +Hazelcast.Models.DiskTierOptions.ClassId.get -> int +Hazelcast.Models.DiskTierOptions.Defaults +Hazelcast.Models.DiskTierOptions.DiskTierOptions() -> void +Hazelcast.Models.DiskTierOptions.Enabled.get -> bool +Hazelcast.Models.DiskTierOptions.Enabled.set -> void +Hazelcast.Models.DiskTierOptions.FactoryId.get -> int +Hazelcast.Models.DurationOptions +Hazelcast.Models.DurationOptions.ClassId.get -> int +Hazelcast.Models.DurationOptions.DurationAmount.get -> long +Hazelcast.Models.DurationOptions.DurationOptions() -> void +Hazelcast.Models.DurationOptions.DurationOptions(long durationAmount, Hazelcast.Models.TimeUnit timeUnit) -> void +Hazelcast.Models.DurationOptions.FactoryId.get -> int +Hazelcast.Models.DurationOptions.TimeUnit.get -> Hazelcast.Models.TimeUnit +Hazelcast.Models.EntryListenerOptions +Hazelcast.Models.EntryListenerOptions.EntryListenerOptions() -> void +Hazelcast.Models.EventJournalOptions +Hazelcast.Models.EventJournalOptions.Capacity.get -> int +Hazelcast.Models.EventJournalOptions.Capacity.set -> void +Hazelcast.Models.EventJournalOptions.ClassId.get -> int +Hazelcast.Models.EventJournalOptions.Defaults +Hazelcast.Models.EventJournalOptions.Enabled.get -> bool +Hazelcast.Models.EventJournalOptions.Enabled.set -> void +Hazelcast.Models.EventJournalOptions.EventJournalOptions() -> void +Hazelcast.Models.EventJournalOptions.FactoryId.get -> int +Hazelcast.Models.EventJournalOptions.TimeToLiveSeconds.get -> int +Hazelcast.Models.EventJournalOptions.TimeToLiveSeconds.set -> void +Hazelcast.Models.EvictionOptions +Hazelcast.Models.EvictionOptions.ClassId.get -> int +Hazelcast.Models.EvictionOptions.Defaults +Hazelcast.Models.EvictionOptions.EvictionOptions() -> void +Hazelcast.Models.EvictionOptions.EvictionPolicy.get -> Hazelcast.NearCaching.EvictionPolicy +Hazelcast.Models.EvictionOptions.EvictionPolicy.set -> void +Hazelcast.Models.EvictionOptions.EvictionStrategyType.get -> Hazelcast.Models.EvictionStrategyType +Hazelcast.Models.EvictionOptions.FactoryId.get -> int +Hazelcast.Models.EvictionOptions.MaxSizePolicy.get -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.EvictionOptions.MaxSizePolicy.set -> void +Hazelcast.Models.EvictionOptions.Size.get -> int +Hazelcast.Models.EvictionOptions.Size.set -> void +Hazelcast.Models.EvictionStrategyType +Hazelcast.Models.EvictionStrategyType.SamplingBasedEviction = 0 -> Hazelcast.Models.EvictionStrategyType +Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.ExpiryPolicyType.Accessed = 2 -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.ExpiryPolicyType.Created = 0 -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.ExpiryPolicyType.Eternal = 4 -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.ExpiryPolicyType.Modified = 1 -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.ExpiryPolicyType.Touched = 3 -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.HotRestartOptions +Hazelcast.Models.HotRestartOptions.ClassId.get -> int +Hazelcast.Models.HotRestartOptions.Defaults +Hazelcast.Models.HotRestartOptions.Enabled.get -> bool +Hazelcast.Models.HotRestartOptions.Enabled.set -> void +Hazelcast.Models.HotRestartOptions.FactoryId.get -> int +Hazelcast.Models.HotRestartOptions.Fsync.get -> bool +Hazelcast.Models.HotRestartOptions.Fsync.set -> void +Hazelcast.Models.HotRestartOptions.HotRestartOptions() -> void +Hazelcast.Models.INamedOptions +Hazelcast.Models.IndexOptions.ClassId.get -> int +Hazelcast.Models.IndexOptions.FactoryId.get -> int +Hazelcast.Models.ListenerOptions +Hazelcast.Models.ListenerOptions.FactoryId.get -> int +Hazelcast.Models.ListenerOptions.ListenerOptions() -> void +Hazelcast.Models.LoadMode +Hazelcast.Models.LoadMode.Eager = 1 -> Hazelcast.Models.LoadMode +Hazelcast.Models.LoadMode.Lazy = 0 -> Hazelcast.Models.LoadMode +Hazelcast.Models.MapOptions +Hazelcast.Models.MapOptions.AsyncBackupCount.get -> int +Hazelcast.Models.MapOptions.AsyncBackupCount.set -> void +Hazelcast.Models.MapOptions.BackupCount.get -> int +Hazelcast.Models.MapOptions.BackupCount.set -> void +Hazelcast.Models.MapOptions.CacheDeserializedValues.get -> Hazelcast.Models.CacheDeserializedValues +Hazelcast.Models.MapOptions.CacheDeserializedValues.set -> void +Hazelcast.Models.MapOptions.ClassId.get -> int +Hazelcast.Models.MapOptions.Defaults +Hazelcast.Models.MapOptions.FactoryId.get -> int +Hazelcast.Models.MapOptions.InMemoryFormat.get -> Hazelcast.Core.InMemoryFormat +Hazelcast.Models.MapOptions.InMemoryFormat.set -> void +Hazelcast.Models.MapOptions.IsNearCacheEnabled.get -> bool +Hazelcast.Models.MapOptions.MapOptions() -> void +Hazelcast.Models.MapOptions.MaxIdleSeconds.get -> int +Hazelcast.Models.MapOptions.MaxIdleSeconds.set -> void +Hazelcast.Models.MapOptions.MetadataPolicy.get -> Hazelcast.Models.MetadataPolicy +Hazelcast.Models.MapOptions.MetadataPolicy.set -> void +Hazelcast.Models.MapOptions.PerEntryStatsEnabled.get -> bool +Hazelcast.Models.MapOptions.PerEntryStatsEnabled.set -> void +Hazelcast.Models.MapOptions.ReadBackupData.get -> bool +Hazelcast.Models.MapOptions.ReadBackupData.set -> void +Hazelcast.Models.MapOptions.StatisticsEnabled.get -> bool +Hazelcast.Models.MapOptions.StatisticsEnabled.set -> void +Hazelcast.Models.MapOptions.TimeToLiveSeconds.get -> int +Hazelcast.Models.MapOptions.TimeToLiveSeconds.set -> void +Hazelcast.Models.MapOptions.TotalBackupCount.get -> int +Hazelcast.Models.MapPartitionLostListenerOptions +Hazelcast.Models.MapPartitionLostListenerOptions.MapPartitionLostListenerOptions() -> void +Hazelcast.Models.MapStoreOptions +Hazelcast.Models.MapStoreOptions.ClassId.get -> int +Hazelcast.Models.MapStoreOptions.Defaults +Hazelcast.Models.MapStoreOptions.Enabled.get -> bool +Hazelcast.Models.MapStoreOptions.Enabled.set -> void +Hazelcast.Models.MapStoreOptions.FactoryId.get -> int +Hazelcast.Models.MapStoreOptions.InitialLoadMode.get -> Hazelcast.Models.LoadMode +Hazelcast.Models.MapStoreOptions.InitialLoadMode.set -> void +Hazelcast.Models.MapStoreOptions.MapStoreOptions() -> void +Hazelcast.Models.MapStoreOptions.Offload.get -> bool +Hazelcast.Models.MapStoreOptions.Offload.set -> void +Hazelcast.Models.MapStoreOptions.WriteBatchSize.get -> int +Hazelcast.Models.MapStoreOptions.WriteBatchSize.set -> void +Hazelcast.Models.MapStoreOptions.WriteCoalescing.get -> bool +Hazelcast.Models.MapStoreOptions.WriteCoalescing.set -> void +Hazelcast.Models.MapStoreOptions.WriteDelaySeconds.get -> int +Hazelcast.Models.MapStoreOptions.WriteDelaySeconds.set -> void +Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.EntryCount = 6 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.FreeHeapPercentage = 4 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.FreeHeapSize = 5 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.FreeNativeMemoryPercentage = 10 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.FreeNativeMemorySize = 9 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.PerNode = 0 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.PerPartition = 1 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.UsedHeapPercentage = 2 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.UsedHeapSize = 3 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.UsedNativeMemoryPercentage = 8 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MaxSizePolicy.UsedNativeMemorySize = 7 -> Hazelcast.Models.MaxSizePolicy +Hazelcast.Models.MemoryTierOptions +Hazelcast.Models.MemoryTierOptions.ClassId.get -> int +Hazelcast.Models.MemoryTierOptions.Defaults +Hazelcast.Models.MemoryTierOptions.FactoryId.get -> int +Hazelcast.Models.MemoryTierOptions.MemoryTierOptions() -> void +Hazelcast.Models.MemoryUnit +Hazelcast.Models.MemoryUnit.Bytes = 0 -> Hazelcast.Models.MemoryUnit +Hazelcast.Models.MemoryUnit.GigaBytes = 3 -> Hazelcast.Models.MemoryUnit +Hazelcast.Models.MemoryUnit.KiloBytes = 1 -> Hazelcast.Models.MemoryUnit +Hazelcast.Models.MemoryUnit.MegaBytes = 2 -> Hazelcast.Models.MemoryUnit +Hazelcast.Models.MemoryUnitExtensions +Hazelcast.Models.MergePolicyOptions +Hazelcast.Models.MergePolicyOptions.BatchSize.get -> int +Hazelcast.Models.MergePolicyOptions.BatchSize.set -> void +Hazelcast.Models.MergePolicyOptions.ClassId.get -> int +Hazelcast.Models.MergePolicyOptions.Defaults +Hazelcast.Models.MergePolicyOptions.FactoryId.get -> int +Hazelcast.Models.MergePolicyOptions.MergePolicyOptions() -> void +Hazelcast.Models.MerkleTreeOptions +Hazelcast.Models.MerkleTreeOptions.ClassId.get -> int +Hazelcast.Models.MerkleTreeOptions.Defaults +Hazelcast.Models.MerkleTreeOptions.Depth.get -> int +Hazelcast.Models.MerkleTreeOptions.Depth.set -> void +Hazelcast.Models.MerkleTreeOptions.Enabled.get -> bool +Hazelcast.Models.MerkleTreeOptions.Enabled.set -> void +Hazelcast.Models.MerkleTreeOptions.EnabledSet.get -> bool +Hazelcast.Models.MerkleTreeOptions.FactoryId.get -> int +Hazelcast.Models.MerkleTreeOptions.MerkleTreeOptions() -> void +Hazelcast.Models.MetadataPolicy +Hazelcast.Models.MetadataPolicy.CreateOnUpdate = 0 -> Hazelcast.Models.MetadataPolicy +Hazelcast.Models.MetadataPolicy.Off = 1 -> Hazelcast.Models.MetadataPolicy +Hazelcast.Models.PartitioningAttributeOptions +Hazelcast.Models.PartitioningAttributeOptions.ClassId.get -> int +Hazelcast.Models.PartitioningAttributeOptions.FactoryId.get -> int +Hazelcast.Models.PartitioningAttributeOptions.PartitioningAttributeOptions() -> void +Hazelcast.Models.PartitioningStrategyOptions +Hazelcast.Models.PartitioningStrategyOptions.ClassId.get -> int +Hazelcast.Models.PartitioningStrategyOptions.FactoryId.get -> int +Hazelcast.Models.PartitioningStrategyOptions.PartitioningStrategyOptions() -> void +Hazelcast.Models.PredicateOptions +Hazelcast.Models.PredicateOptions.ClassId.get -> int +Hazelcast.Models.PredicateOptions.FactoryId.get -> int +Hazelcast.Models.PredicateOptions.PredicateOptions() -> void +Hazelcast.Models.PublisherAddress +Hazelcast.Models.PublisherAddress.ClassId.get -> int +Hazelcast.Models.PublisherAddress.FactoryId.get -> int +Hazelcast.Models.PublisherAddress.IsIpV4.get -> bool +Hazelcast.Models.PublisherAddress.IsIpV6.get -> bool +Hazelcast.Models.PublisherAddress.PublisherAddress() -> void +Hazelcast.Models.QueryCacheOptions +Hazelcast.Models.QueryCacheOptions.BatchSize.get -> int +Hazelcast.Models.QueryCacheOptions.BatchSize.set -> void +Hazelcast.Models.QueryCacheOptions.BufferSize.get -> int +Hazelcast.Models.QueryCacheOptions.BufferSize.set -> void +Hazelcast.Models.QueryCacheOptions.ClassId.get -> int +Hazelcast.Models.QueryCacheOptions.Coalesce.get -> bool +Hazelcast.Models.QueryCacheOptions.Coalesce.set -> void +Hazelcast.Models.QueryCacheOptions.Defaults +Hazelcast.Models.QueryCacheOptions.DelaySeconds.get -> int +Hazelcast.Models.QueryCacheOptions.DelaySeconds.set -> void +Hazelcast.Models.QueryCacheOptions.FactoryId.get -> int +Hazelcast.Models.QueryCacheOptions.InMemoryFormat.get -> Hazelcast.Core.InMemoryFormat +Hazelcast.Models.QueryCacheOptions.InMemoryFormat.set -> void +Hazelcast.Models.QueryCacheOptions.IncludeValue.get -> bool +Hazelcast.Models.QueryCacheOptions.IncludeValue.set -> void +Hazelcast.Models.QueryCacheOptions.Populate.get -> bool +Hazelcast.Models.QueryCacheOptions.Populate.set -> void +Hazelcast.Models.QueryCacheOptions.QueryCacheOptions() -> void +Hazelcast.Models.QueryCacheOptions.SerializeKeys.get -> bool +Hazelcast.Models.QueryCacheOptions.SerializeKeys.set -> void +Hazelcast.Models.ReliableTopicEventHandlerOptions +Hazelcast.Models.ReliableTopicEventHandlerOptions.InitialSequence.get -> long +Hazelcast.Models.ReliableTopicEventHandlerOptions.InitialSequence.set -> void +Hazelcast.Models.ReliableTopicEventHandlerOptions.IsLossTolerant.get -> bool +Hazelcast.Models.ReliableTopicEventHandlerOptions.IsLossTolerant.set -> void +Hazelcast.Models.ReliableTopicEventHandlerOptions.ReliableTopicEventHandlerOptions() -> void +Hazelcast.Models.ReliableTopicEventHandlerOptions.StoreSequence.get -> bool +Hazelcast.Models.ReliableTopicEventHandlerOptions.StoreSequence.set -> void +Hazelcast.Models.ReliableTopicOptions +Hazelcast.Models.ReliableTopicOptions.BatchSize.get -> int +Hazelcast.Models.ReliableTopicOptions.BatchSize.set -> void +Hazelcast.Models.ReliableTopicOptions.Policy.get -> Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.ReliableTopicOptions.Policy.set -> void +Hazelcast.Models.ReliableTopicOptions.ReliableTopicOptions() -> void +Hazelcast.Models.ReliableTopicOptions.ReliableTopicOptions(Hazelcast.Models.TopicOverloadPolicy policy, int batchSize) -> void +Hazelcast.Models.RingbufferOptions +Hazelcast.Models.RingbufferOptions.AsyncBackupCount.get -> int +Hazelcast.Models.RingbufferOptions.AsyncBackupCount.set -> void +Hazelcast.Models.RingbufferOptions.BackupCount.get -> int +Hazelcast.Models.RingbufferOptions.BackupCount.set -> void +Hazelcast.Models.RingbufferOptions.Capacity.get -> int +Hazelcast.Models.RingbufferOptions.Capacity.set -> void +Hazelcast.Models.RingbufferOptions.ClassId.get -> int +Hazelcast.Models.RingbufferOptions.Defaults +Hazelcast.Models.RingbufferOptions.FactoryId.get -> int +Hazelcast.Models.RingbufferOptions.InMemoryFormat.get -> Hazelcast.Core.InMemoryFormat +Hazelcast.Models.RingbufferOptions.InMemoryFormat.set -> void +Hazelcast.Models.RingbufferOptions.RingbufferOptions() -> void +Hazelcast.Models.RingbufferOptions.TimeToLiveSeconds.get -> int +Hazelcast.Models.RingbufferOptions.TimeToLiveSeconds.set -> void +Hazelcast.Models.RingbufferOptions.TotalBackupCount.get -> int +Hazelcast.Models.RingbufferStoreOptions +Hazelcast.Models.RingbufferStoreOptions.ClassId.get -> int +Hazelcast.Models.RingbufferStoreOptions.Enabled.get -> bool +Hazelcast.Models.RingbufferStoreOptions.Enabled.set -> void +Hazelcast.Models.RingbufferStoreOptions.FactoryId.get -> int +Hazelcast.Models.RingbufferStoreOptions.RingbufferStoreOptions() -> void +Hazelcast.Models.TieredStoreOptions +Hazelcast.Models.TieredStoreOptions.ClassId.get -> int +Hazelcast.Models.TieredStoreOptions.Defaults +Hazelcast.Models.TieredStoreOptions.Enabled.get -> bool +Hazelcast.Models.TieredStoreOptions.Enabled.set -> void +Hazelcast.Models.TieredStoreOptions.FactoryId.get -> int +Hazelcast.Models.TieredStoreOptions.TieredStoreOptions() -> void +Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Days = 86400000000000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Hours = 3600000000000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Microseconds = 1000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Milliseconds = 1000000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Minutes = 60000000000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Nanoseconds = 1 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimeUnit.Seconds = 1000000000 -> Hazelcast.Models.TimeUnit +Hazelcast.Models.TimedExpiryPolicyFactoryOptions +Hazelcast.Models.TimedExpiryPolicyFactoryOptions.ClassId.get -> int +Hazelcast.Models.TimedExpiryPolicyFactoryOptions.ExpiryPolicyType.get -> Hazelcast.Models.ExpiryPolicyType +Hazelcast.Models.TimedExpiryPolicyFactoryOptions.FactoryId.get -> int +Hazelcast.Models.TimedExpiryPolicyFactoryOptions.TimedExpiryPolicyFactoryOptions() -> void +Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.TopicOverloadPolicy.Block = 2 -> Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.TopicOverloadPolicy.DiscardNewest = 1 -> Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.TopicOverloadPolicy.DiscardOldest = 0 -> Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.TopicOverloadPolicy.Error = 3 -> Hazelcast.Models.TopicOverloadPolicy +Hazelcast.Models.WanReplicationRef +Hazelcast.Models.WanReplicationRef.ClassId.get -> int +Hazelcast.Models.WanReplicationRef.FactoryId.get -> int +Hazelcast.Models.WanReplicationRef.RepublishingEnabled.get -> bool +Hazelcast.Models.WanReplicationRef.RepublishingEnabled.set -> void +Hazelcast.Models.WanReplicationRef.WanReplicationRef() -> void +Hazelcast.NearCaching.NearCacheOptions.CacheLocalEntries.get -> bool +Hazelcast.NearCaching.NearCacheOptions.CacheLocalEntries.set -> void +Hazelcast.NearCaching.NearCacheOptions.ClassId.get -> int +Hazelcast.NearCaching.NearCacheOptions.Defaults +Hazelcast.NearCaching.NearCacheOptions.FactoryId.get -> int +Hazelcast.NearCaching.NearCacheOptions.LocalUpdatePolicy.get -> Hazelcast.NearCaching.UpdatePolicy +Hazelcast.NearCaching.NearCacheOptions.LocalUpdatePolicy.set -> void +Hazelcast.NearCaching.NearCacheOptions.SerializeKeys.get -> bool +Hazelcast.NearCaching.NearCacheOptions.SerializeKeys.set -> void +Hazelcast.NearCaching.NearCachePreloaderOptions +Hazelcast.NearCaching.NearCachePreloaderOptions.ClassId.get -> int +Hazelcast.NearCaching.NearCachePreloaderOptions.Defaults +Hazelcast.NearCaching.NearCachePreloaderOptions.Enabled.get -> bool +Hazelcast.NearCaching.NearCachePreloaderOptions.Enabled.set -> void +Hazelcast.NearCaching.NearCachePreloaderOptions.FactoryId.get -> int +Hazelcast.NearCaching.NearCachePreloaderOptions.NearCachePreloaderOptions() -> void +Hazelcast.NearCaching.NearCachePreloaderOptions.StoreInitialDelaySeconds.get -> int +Hazelcast.NearCaching.NearCachePreloaderOptions.StoreInitialDelaySeconds.set -> void +Hazelcast.NearCaching.NearCachePreloaderOptions.StoreIntervalSeconds.get -> int +Hazelcast.NearCaching.NearCachePreloaderOptions.StoreIntervalSeconds.set -> void +Hazelcast.NearCaching.UpdatePolicy +Hazelcast.NearCaching.UpdatePolicy.CacheOnUpdate = 1 -> Hazelcast.NearCaching.UpdatePolicy +Hazelcast.NearCaching.UpdatePolicy.Invalidate = 0 -> Hazelcast.NearCaching.UpdatePolicy +Hazelcast.Networking.NetworkingOptions.NetworkingOptions() -> void +Hazelcast.Networking.TpcOptions +Hazelcast.Networking.TpcOptions.Enabled.get -> bool +Hazelcast.Networking.TpcOptions.Enabled.set -> void +Hazelcast.Networking.TpcOptions.Required.get -> bool +Hazelcast.Networking.TpcOptions.Required.set -> void +Hazelcast.Networking.TpcOptions.TpcOptions() -> void +Hazelcast.Sql.SqlOptions +Hazelcast.Sql.SqlOptions.PartitionArgumentIndexCacheSize.get -> int +Hazelcast.Sql.SqlOptions.PartitionArgumentIndexCacheSize.set -> void +Hazelcast.Sql.SqlOptions.SqlOptions() -> void +const Hazelcast.Models.DataPersistenceOptions.Defaults.Enabled = false -> bool +const Hazelcast.Models.DataPersistenceOptions.Defaults.Fsync = false -> bool +const Hazelcast.Models.DiskTierOptions.Defaults.Enabled = false -> bool +const Hazelcast.Models.EventJournalOptions.Defaults.Capacity = 10000 -> int +const Hazelcast.Models.EventJournalOptions.Defaults.Enabled = false -> bool +const Hazelcast.Models.EventJournalOptions.Defaults.TtlSeconds = 0 -> int +const Hazelcast.Models.EvictionOptions.Defaults.EvictionPolicy = Hazelcast.NearCaching.EvictionPolicy.None -> Hazelcast.NearCaching.EvictionPolicy +const Hazelcast.Models.EvictionOptions.Defaults.MaxSizePolicy = Hazelcast.Models.MaxSizePolicy.PerNode -> Hazelcast.Models.MaxSizePolicy +const Hazelcast.Models.EvictionOptions.Defaults.Size = 10000 -> int +const Hazelcast.Models.HotRestartOptions.Defaults.Enabled = false -> bool +const Hazelcast.Models.HotRestartOptions.Defaults.Fsync = false -> bool +const Hazelcast.Models.MapOptions.Defaults.AsyncBackupCount = 0 -> int +const Hazelcast.Models.MapOptions.Defaults.BackupCount = 1 -> int +const Hazelcast.Models.MapOptions.Defaults.CachedDeserializedValues = Hazelcast.Models.CacheDeserializedValues.IndexOnly -> Hazelcast.Models.CacheDeserializedValues +const Hazelcast.Models.MapOptions.Defaults.DisabledTtlSeconds = 0 -> int +const Hazelcast.Models.MapOptions.Defaults.EntryStatsEnabled = false -> bool +const Hazelcast.Models.MapOptions.Defaults.InMemoryFormat = Hazelcast.Core.InMemoryFormat.Binary -> Hazelcast.Core.InMemoryFormat +const Hazelcast.Models.MapOptions.Defaults.MaxBackupCount = 6 -> int +const Hazelcast.Models.MapOptions.Defaults.MaxIdleSeconds = 0 -> int +const Hazelcast.Models.MapOptions.Defaults.MetadataPolicy = Hazelcast.Models.MetadataPolicy.CreateOnUpdate -> Hazelcast.Models.MetadataPolicy +const Hazelcast.Models.MapOptions.Defaults.MinBackupCount = 0 -> int +const Hazelcast.Models.MapOptions.Defaults.ReadBackupData = false -> bool +const Hazelcast.Models.MapOptions.Defaults.StatisticsEnabled = true -> bool +const Hazelcast.Models.MapOptions.Defaults.TtlSeconds = 0 -> int +const Hazelcast.Models.MapStoreOptions.Defaults.Enabled = false -> bool +const Hazelcast.Models.MapStoreOptions.Defaults.InitialLoadMode = Hazelcast.Models.LoadMode.Lazy -> Hazelcast.Models.LoadMode +const Hazelcast.Models.MapStoreOptions.Defaults.Offload = true -> bool +const Hazelcast.Models.MapStoreOptions.Defaults.WriteBatchSize = 1 -> int +const Hazelcast.Models.MapStoreOptions.Defaults.WriteCoalescing = true -> bool +const Hazelcast.Models.MapStoreOptions.Defaults.WriteDelaySeconds = 0 -> int +const Hazelcast.Models.MergePolicyOptions.Defaults.BatchSize = 100 -> int +const Hazelcast.Models.MerkleTreeOptions.Defaults.Depth = 10 -> int +const Hazelcast.Models.MerkleTreeOptions.Defaults.MaxDepth = 27 -> int +const Hazelcast.Models.MerkleTreeOptions.Defaults.MinDepth = 2 -> int +const Hazelcast.Models.QueryCacheOptions.Defaults.BatchSize = 1 -> int +const Hazelcast.Models.QueryCacheOptions.Defaults.BufferSize = 16 -> int +const Hazelcast.Models.QueryCacheOptions.Defaults.Coalesce = false -> bool +const Hazelcast.Models.QueryCacheOptions.Defaults.IncludeValue = true -> bool +const Hazelcast.Models.QueryCacheOptions.Defaults.Populate = true -> bool +const Hazelcast.Models.QueryCacheOptions.Defaults.SerializeKeys = false -> bool +const Hazelcast.Models.RingbufferOptions.Defaults.AsyncBackupCount = 0 -> int +const Hazelcast.Models.RingbufferOptions.Defaults.Capacity = 10000 -> int +const Hazelcast.Models.RingbufferOptions.Defaults.SyncBackupCount = 1 -> int +const Hazelcast.Models.RingbufferOptions.Defaults.TtlSeconds = 0 -> int +const Hazelcast.Models.TieredStoreOptions.Defaults.Enabled = false -> bool +const Hazelcast.NearCaching.NearCacheOptions.Defaults.InvalidateOnChange = true -> bool +const Hazelcast.NearCaching.NearCacheOptions.Defaults.LocalUpdatePolicy = Hazelcast.NearCaching.UpdatePolicy.Invalidate -> Hazelcast.NearCaching.UpdatePolicy +const Hazelcast.NearCaching.NearCacheOptions.Defaults.MaxIdleSeconds = 0 -> int +const Hazelcast.NearCaching.NearCacheOptions.Defaults.SerializeKeys = false -> bool +const Hazelcast.NearCaching.NearCacheOptions.Defaults.TtlSeconds = 0 -> int +const Hazelcast.NearCaching.NearCachePreloaderOptions.Defaults.StoreInitialDelaySeconds = 600 -> int +const Hazelcast.NearCaching.NearCachePreloaderOptions.Defaults.StoreIntervalSeconds = 600 -> int +override Hazelcast.Models.EntryListenerOptions.ClassId.get -> int +override Hazelcast.Models.EntryListenerOptions.IncludeValue.get -> bool +override Hazelcast.Models.EntryListenerOptions.IncludeValue.set -> void +override Hazelcast.Models.EntryListenerOptions.Local.get -> bool +override Hazelcast.Models.EntryListenerOptions.Local.set -> void +override Hazelcast.Models.MapPartitionLostListenerOptions.ClassId.get -> int +static Hazelcast.Models.BTreeIndexOptions.DefaultPageSize.get -> Hazelcast.Models.Capacity! +static Hazelcast.Models.MemoryUnitExtensions.Convert(Hazelcast.Models.MemoryUnit toUnit, Hazelcast.Models.MemoryUnit fromUnit, long value) -> long +virtual Hazelcast.Models.ListenerOptions.ClassId.get -> int +virtual Hazelcast.Models.ListenerOptions.IncludeValue.get -> bool +virtual Hazelcast.Models.ListenerOptions.IncludeValue.set -> void +virtual Hazelcast.Models.ListenerOptions.Local.get -> bool +virtual Hazelcast.Models.ListenerOptions.Local.set -> void +~Hazelcast.Configuration.DynamicOptions.ConfigureMapAsync(Hazelcast.Models.MapOptions mapOptions) -> System.Threading.Tasks.Task +~Hazelcast.Configuration.DynamicOptions.ConfigureMapAsync(string name, System.Action configure) -> System.Threading.Tasks.Task +~Hazelcast.Configuration.DynamicOptions.ConfigureRingbufferAsync(Hazelcast.Models.RingbufferOptions ringbufferOptions) -> System.Threading.Tasks.Task +~Hazelcast.Configuration.DynamicOptions.ConfigureRingbufferAsync(string name, System.Action configure) -> System.Threading.Tasks.Task +~Hazelcast.DistributedObjects.IHReliableTopic.PublishAsync(T message, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task +~Hazelcast.DistributedObjects.IHReliableTopic.SubscribeAsync(System.Action> events, Hazelcast.Models.ReliableTopicEventHandlerOptions handlerOptions = null, object state = null) -> System.Threading.Tasks.Task +~Hazelcast.DistributedObjects.IHRingBuffer.ReadManyWithResultSetAsync(long startSequence, int minCount, int maxCount, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task> +~Hazelcast.DistributedObjects.IReliableTopicExceptionEventHandler.HandleAsync(Hazelcast.DistributedObjects.IHReliableTopic sender, Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs args) -> System.Threading.Tasks.ValueTask +~Hazelcast.DistributedObjects.IReliableTopicMessageEventHandler.HandleAsync(Hazelcast.DistributedObjects.IHReliableTopic sender, Hazelcast.Models.MemberInfo member, long publishTime, T payload, long sequence, object state) -> System.Threading.Tasks.ValueTask +~Hazelcast.DistributedObjects.IReliableTopicTerminatedEventHandler.HandleAsync(Hazelcast.DistributedObjects.IHReliableTopic sender, long sequence, object state) -> System.Threading.Tasks.ValueTask +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Exception(System.Action, Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Exception(System.Func, Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs, System.Threading.Tasks.ValueTask> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Message(System.Action, Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Message(System.Func, Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs, System.Threading.Tasks.ValueTask> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Terminated(System.Action, Hazelcast.DistributedObjects.ReliableTopicTerminatedEventArgs> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicEventHandlers.Terminated(System.Func, Hazelcast.DistributedObjects.ReliableTopicTerminatedEventArgs, System.Threading.Tasks.ValueTask> handler) -> Hazelcast.DistributedObjects.ReliableTopicEventHandlers +~Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs.Exception.get -> System.Exception +~Hazelcast.DistributedObjects.ReliableTopicExceptionEventArgs.ReliableTopicExceptionEventArgs(System.Exception exception, long sequence, object state) -> void +~Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.Member.get -> Hazelcast.Models.MemberInfo +~Hazelcast.DistributedObjects.ReliableTopicMessageEventArgs.ReliableTopicMessageEventArgs(Hazelcast.Models.MemberInfo member, long publishTime, T payload, long sequence, object state) -> void +~Hazelcast.DistributedObjects.ReliableTopicTerminatedEventArgs.ReliableTopicTerminatedEventArgs(long sequence, object state) -> void +~Hazelcast.Exceptions.TopicOverloadException.TopicOverloadException(System.Exception innerException) -> void +~Hazelcast.Exceptions.TopicOverloadException.TopicOverloadException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void +~Hazelcast.Exceptions.TopicOverloadException.TopicOverloadException(string message) -> void +~Hazelcast.Exceptions.TopicOverloadException.TopicOverloadException(string message, System.Exception innerException) -> void +~Hazelcast.HazelcastOptions.ReliableTopics.get -> System.Collections.Generic.IDictionary +~Hazelcast.HazelcastOptions.Sql.get -> Hazelcast.Sql.SqlOptions +~Hazelcast.IHazelcastClient.DynamicOptions.get -> Hazelcast.Configuration.DynamicOptions +~Hazelcast.IHazelcastClient.GetReliableTopicAsync(string name, Hazelcast.Models.ReliableTopicOptions option = null) -> System.Threading.Tasks.Task> +~Hazelcast.Models.AttributeOptions.AttributeOptions(Hazelcast.Models.AttributeOptions config) -> void +~Hazelcast.Models.AttributeOptions.AttributeOptions(string name, string extractorClassName) -> void +~Hazelcast.Models.AttributeOptions.ExtractorClassName.get -> string +~Hazelcast.Models.AttributeOptions.ExtractorClassName.set -> void +~Hazelcast.Models.AttributeOptions.Name.get -> string +~Hazelcast.Models.AttributeOptions.Name.set -> void +~Hazelcast.Models.AttributeOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.AttributeOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.BitmapIndexOptions.BitmapIndexOptions(Hazelcast.Models.BitmapIndexOptions bitmapIndexOptions) -> void +~Hazelcast.Models.BitmapIndexOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.BitmapIndexOptions.SetUniqueKey(string uniqueKey) -> Hazelcast.Models.BitmapIndexOptions +~Hazelcast.Models.BitmapIndexOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheEntryEventFilterFactory.get -> string +~Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheEntryEventFilterFactory.set -> void +~Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheEntryListenerFactory.get -> string +~Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheEntryListenerFactory.set -> void +~Hazelcast.Models.CacheSimpleEntryListenerOptions.CacheSimpleEntryListenerOptions(Hazelcast.Models.CacheSimpleEntryListenerOptions listenerConfig) -> void +~Hazelcast.Models.CacheSimpleEntryListenerOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.CacheSimpleEntryListenerOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.Capacity.ToPrettyString() -> string +~Hazelcast.Models.DataPersistenceOptions.DataPersistenceOptions(Hazelcast.Models.DataPersistenceOptions dataPersistenceConfig) -> void +~Hazelcast.Models.DataPersistenceOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.DataPersistenceOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.DiskTierOptions.DeviceName.get -> string +~Hazelcast.Models.DiskTierOptions.DeviceName.set -> void +~Hazelcast.Models.DiskTierOptions.DiskTierOptions(Hazelcast.Models.DiskTierOptions diskTierConfig) -> void +~Hazelcast.Models.DiskTierOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.DiskTierOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.DurationOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.DurationOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.EntryListenerOptions.EntryListenerOptions(Hazelcast.Models.EntryListenerOptions config) -> void +~Hazelcast.Models.EntryListenerOptions.EntryListenerOptions(string className, bool local, bool includeValue) -> void +~Hazelcast.Models.EventJournalOptions.EventJournalOptions(Hazelcast.Models.EventJournalOptions options) -> void +~Hazelcast.Models.EventJournalOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.EventJournalOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.EvictionOptions.ComparatorClassName.get -> string +~Hazelcast.Models.EvictionOptions.ComparatorClassName.set -> void +~Hazelcast.Models.EvictionOptions.EvictionOptions(Hazelcast.Models.EvictionOptions config) -> void +~Hazelcast.Models.EvictionOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.EvictionOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.HotRestartOptions.HotRestartOptions(Hazelcast.Models.HotRestartOptions hotRestartConfig) -> void +~Hazelcast.Models.HotRestartOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.HotRestartOptions.SetIsEnabled(bool enabled) -> Hazelcast.Models.HotRestartOptions +~Hazelcast.Models.HotRestartOptions.SetIsFsync(bool fsync) -> Hazelcast.Models.HotRestartOptions +~Hazelcast.Models.HotRestartOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.INamedOptions.Name.get -> string +~Hazelcast.Models.INamedOptions.Name.set -> void +~Hazelcast.Models.IndexOptions.Attributes.set -> void +~Hazelcast.Models.IndexOptions.BTreeIndex.get -> Hazelcast.Models.BTreeIndexOptions +~Hazelcast.Models.IndexOptions.BTreeIndex.set -> void +~Hazelcast.Models.IndexOptions.BitmapIndex.get -> Hazelcast.Models.BitmapIndexOptions +~Hazelcast.Models.IndexOptions.BitmapIndex.set -> void +~Hazelcast.Models.IndexOptions.IndexOptions(Hazelcast.Models.IndexOptions indexOptions) -> void +~Hazelcast.Models.IndexOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.IndexOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.ListenerOptions.ClassName.get -> string +~Hazelcast.Models.ListenerOptions.ClassName.set -> void +~Hazelcast.Models.ListenerOptions.ListenerOptions(Hazelcast.Models.ListenerOptions config) -> void +~Hazelcast.Models.ListenerOptions.ListenerOptions(string className) -> void +~Hazelcast.Models.MapOptions.Attributes.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.Attributes.set -> void +~Hazelcast.Models.MapOptions.DataPersistence.get -> Hazelcast.Models.DataPersistenceOptions +~Hazelcast.Models.MapOptions.DataPersistence.set -> void +~Hazelcast.Models.MapOptions.EntryListeners.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.EntryListeners.set -> void +~Hazelcast.Models.MapOptions.EventJournal.get -> Hazelcast.Models.EventJournalOptions +~Hazelcast.Models.MapOptions.EventJournal.set -> void +~Hazelcast.Models.MapOptions.Eviction.get -> Hazelcast.Models.EvictionOptions +~Hazelcast.Models.MapOptions.Eviction.set -> void +~Hazelcast.Models.MapOptions.HotRestart.get -> Hazelcast.Models.HotRestartOptions +~Hazelcast.Models.MapOptions.HotRestart.set -> void +~Hazelcast.Models.MapOptions.Indexes.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.Indexes.set -> void +~Hazelcast.Models.MapOptions.MapOptions(Hazelcast.Models.MapOptions options) -> void +~Hazelcast.Models.MapOptions.MapOptions(string name) -> void +~Hazelcast.Models.MapOptions.MapStore.get -> Hazelcast.Models.MapStoreOptions +~Hazelcast.Models.MapOptions.MapStore.set -> void +~Hazelcast.Models.MapOptions.MergePolicy.get -> Hazelcast.Models.MergePolicyOptions +~Hazelcast.Models.MapOptions.MergePolicy.set -> void +~Hazelcast.Models.MapOptions.MerkleTree.get -> Hazelcast.Models.MerkleTreeOptions +~Hazelcast.Models.MapOptions.MerkleTree.set -> void +~Hazelcast.Models.MapOptions.Name.get -> string +~Hazelcast.Models.MapOptions.Name.set -> void +~Hazelcast.Models.MapOptions.NearCache.get -> Hazelcast.NearCaching.NearCacheOptions +~Hazelcast.Models.MapOptions.NearCache.set -> void +~Hazelcast.Models.MapOptions.PartitionLostListeners.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.PartitionLostListeners.set -> void +~Hazelcast.Models.MapOptions.PartitioningAttributes.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.PartitioningAttributes.set -> void +~Hazelcast.Models.MapOptions.PartitioningStrategy.get -> Hazelcast.Models.PartitioningStrategyOptions +~Hazelcast.Models.MapOptions.PartitioningStrategy.set -> void +~Hazelcast.Models.MapOptions.QueryCaches.get -> System.Collections.Generic.List +~Hazelcast.Models.MapOptions.QueryCaches.set -> void +~Hazelcast.Models.MapOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.MapOptions.SplitBrainProtectionName.get -> string +~Hazelcast.Models.MapOptions.SplitBrainProtectionName.set -> void +~Hazelcast.Models.MapOptions.TieredStore.get -> Hazelcast.Models.TieredStoreOptions +~Hazelcast.Models.MapOptions.TieredStore.set -> void +~Hazelcast.Models.MapOptions.WanReplicationRef.get -> Hazelcast.Models.WanReplicationRef +~Hazelcast.Models.MapOptions.WanReplicationRef.set -> void +~Hazelcast.Models.MapOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.MapPartitionLostListenerOptions.MapPartitionLostListenerOptions(Hazelcast.Models.MapPartitionLostListenerOptions config) -> void +~Hazelcast.Models.MapPartitionLostListenerOptions.MapPartitionLostListenerOptions(string className) -> void +~Hazelcast.Models.MapStoreOptions.ClassName.get -> string +~Hazelcast.Models.MapStoreOptions.ClassName.set -> void +~Hazelcast.Models.MapStoreOptions.FactoryClassName.get -> string +~Hazelcast.Models.MapStoreOptions.FactoryClassName.set -> void +~Hazelcast.Models.MapStoreOptions.GetProperty(string name) -> string +~Hazelcast.Models.MapStoreOptions.MapStoreOptions(Hazelcast.Models.MapStoreOptions config) -> void +~Hazelcast.Models.MapStoreOptions.Properties.get -> System.Collections.Generic.Dictionary +~Hazelcast.Models.MapStoreOptions.Properties.set -> void +~Hazelcast.Models.MapStoreOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.MapStoreOptions.SetProperty(string name, string value) -> Hazelcast.Models.MapStoreOptions +~Hazelcast.Models.MapStoreOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.MemoryTierOptions.Capacity.get -> Hazelcast.Models.Capacity +~Hazelcast.Models.MemoryTierOptions.Capacity.set -> void +~Hazelcast.Models.MemoryTierOptions.MemoryTierOptions(Hazelcast.Models.MemoryTierOptions options) -> void +~Hazelcast.Models.MemoryTierOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.MemoryTierOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.MergePolicyOptions.MergePolicyOptions(Hazelcast.Models.MergePolicyOptions mergePolicyConfig) -> void +~Hazelcast.Models.MergePolicyOptions.MergePolicyOptions(string policy, int batchSize) -> void +~Hazelcast.Models.MergePolicyOptions.Policy.get -> string +~Hazelcast.Models.MergePolicyOptions.Policy.set -> void +~Hazelcast.Models.MergePolicyOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.MergePolicyOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.MerkleTreeOptions.MerkleTreeOptions(Hazelcast.Models.MerkleTreeOptions config) -> void +~Hazelcast.Models.MerkleTreeOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.MerkleTreeOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.PartitioningAttributeOptions.AttributeName.get -> string +~Hazelcast.Models.PartitioningAttributeOptions.AttributeName.set -> void +~Hazelcast.Models.PartitioningAttributeOptions.PartitioningAttributeOptions(Hazelcast.Models.PartitioningAttributeOptions config) -> void +~Hazelcast.Models.PartitioningAttributeOptions.PartitioningAttributeOptions(string attributeName) -> void +~Hazelcast.Models.PartitioningAttributeOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.PartitioningAttributeOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.PartitioningStrategyOptions.PartitioningStrategyClass.get -> string +~Hazelcast.Models.PartitioningStrategyOptions.PartitioningStrategyClass.set -> void +~Hazelcast.Models.PartitioningStrategyOptions.PartitioningStrategyOptions(Hazelcast.Models.PartitioningStrategyOptions config) -> void +~Hazelcast.Models.PartitioningStrategyOptions.PartitioningStrategyOptions(string partitioningStrategyClass) -> void +~Hazelcast.Models.PartitioningStrategyOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.PartitioningStrategyOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.PredicateOptions.ClassName.get -> string +~Hazelcast.Models.PredicateOptions.ClassName.set -> void +~Hazelcast.Models.PredicateOptions.PredicateOptions(Hazelcast.Models.PredicateOptions config) -> void +~Hazelcast.Models.PredicateOptions.PredicateOptions(string className) -> void +~Hazelcast.Models.PredicateOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.PredicateOptions.Sql.get -> string +~Hazelcast.Models.PredicateOptions.Sql.set -> void +~Hazelcast.Models.PredicateOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.PublisherAddress.IpEndPoint.get -> System.Net.IPEndPoint +~Hazelcast.Models.PublisherAddress.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.PublisherAddress.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.QueryCacheOptions.AddEntryListener(Hazelcast.Models.EntryListenerOptions listenerConfig) -> Hazelcast.Models.QueryCacheOptions +~Hazelcast.Models.QueryCacheOptions.AddIndex(Hazelcast.Models.IndexOptions indexConfig) -> Hazelcast.Models.QueryCacheOptions +~Hazelcast.Models.QueryCacheOptions.EntryListeners.get -> System.Collections.Generic.List +~Hazelcast.Models.QueryCacheOptions.EntryListeners.set -> void +~Hazelcast.Models.QueryCacheOptions.Eviction.get -> Hazelcast.Models.EvictionOptions +~Hazelcast.Models.QueryCacheOptions.Eviction.set -> void +~Hazelcast.Models.QueryCacheOptions.Indexes.get -> System.Collections.Generic.List +~Hazelcast.Models.QueryCacheOptions.Indexes.set -> void +~Hazelcast.Models.QueryCacheOptions.Name.get -> string +~Hazelcast.Models.QueryCacheOptions.Name.set -> void +~Hazelcast.Models.QueryCacheOptions.Predicate.get -> Hazelcast.Models.PredicateOptions +~Hazelcast.Models.QueryCacheOptions.Predicate.set -> void +~Hazelcast.Models.QueryCacheOptions.QueryCacheOptions(Hazelcast.Models.QueryCacheOptions other) -> void +~Hazelcast.Models.QueryCacheOptions.QueryCacheOptions(string name) -> void +~Hazelcast.Models.QueryCacheOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.QueryCacheOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.ReliableTopicOptions.Clone() -> Hazelcast.Models.ReliableTopicOptions +~Hazelcast.Models.RingbufferOptions.MergePolicy.get -> Hazelcast.Models.MergePolicyOptions +~Hazelcast.Models.RingbufferOptions.MergePolicy.set -> void +~Hazelcast.Models.RingbufferOptions.Name.get -> string +~Hazelcast.Models.RingbufferOptions.Name.set -> void +~Hazelcast.Models.RingbufferOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.RingbufferOptions.RingbufferOptions(Hazelcast.Models.RingbufferOptions options) -> void +~Hazelcast.Models.RingbufferOptions.RingbufferOptions(string name) -> void +~Hazelcast.Models.RingbufferOptions.RingbufferOptions(string name, Hazelcast.Models.RingbufferOptions options) -> void +~Hazelcast.Models.RingbufferOptions.RingbufferStore.get -> Hazelcast.Models.RingbufferStoreOptions +~Hazelcast.Models.RingbufferOptions.RingbufferStore.set -> void +~Hazelcast.Models.RingbufferOptions.SplitBrainProtectionName.get -> string +~Hazelcast.Models.RingbufferOptions.SplitBrainProtectionName.set -> void +~Hazelcast.Models.RingbufferOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.RingbufferStoreOptions.ClassName.get -> string +~Hazelcast.Models.RingbufferStoreOptions.ClassName.set -> void +~Hazelcast.Models.RingbufferStoreOptions.FactoryClassName.get -> string +~Hazelcast.Models.RingbufferStoreOptions.FactoryClassName.set -> void +~Hazelcast.Models.RingbufferStoreOptions.Properties.get -> System.Collections.Generic.Dictionary +~Hazelcast.Models.RingbufferStoreOptions.Properties.set -> void +~Hazelcast.Models.RingbufferStoreOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.RingbufferStoreOptions.RingbufferStoreOptions(Hazelcast.Models.RingbufferStoreOptions options) -> void +~Hazelcast.Models.RingbufferStoreOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.TieredStoreOptions.DiskTier.get -> Hazelcast.Models.DiskTierOptions +~Hazelcast.Models.TieredStoreOptions.DiskTier.set -> void +~Hazelcast.Models.TieredStoreOptions.MemoryTier.get -> Hazelcast.Models.MemoryTierOptions +~Hazelcast.Models.TieredStoreOptions.MemoryTier.set -> void +~Hazelcast.Models.TieredStoreOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.TieredStoreOptions.TieredStoreOptions(Hazelcast.Models.TieredStoreOptions tieredStoreConfig) -> void +~Hazelcast.Models.TieredStoreOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.TimedExpiryPolicyFactoryOptions.DurationConfig.get -> Hazelcast.Models.DurationOptions +~Hazelcast.Models.TimedExpiryPolicyFactoryOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.TimedExpiryPolicyFactoryOptions.TimedExpiryPolicyFactoryOptions(Hazelcast.Models.ExpiryPolicyType expiryPolicyType, Hazelcast.Models.DurationOptions durationConfig) -> void +~Hazelcast.Models.TimedExpiryPolicyFactoryOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Models.WanReplicationRef.AddFilter(string filterClassName) -> Hazelcast.Models.WanReplicationRef +~Hazelcast.Models.WanReplicationRef.Filters.get -> System.Collections.Generic.List +~Hazelcast.Models.WanReplicationRef.Filters.set -> void +~Hazelcast.Models.WanReplicationRef.MergePolicyClassName.get -> string +~Hazelcast.Models.WanReplicationRef.MergePolicyClassName.set -> void +~Hazelcast.Models.WanReplicationRef.Name.get -> string +~Hazelcast.Models.WanReplicationRef.Name.set -> void +~Hazelcast.Models.WanReplicationRef.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.Models.WanReplicationRef.WanReplicationRef(Hazelcast.Models.WanReplicationRef other) -> void +~Hazelcast.Models.WanReplicationRef.WanReplicationRef(string name, string mergePolicyClassName, System.Collections.Generic.List filters, bool republishingEnabled) -> void +~Hazelcast.Models.WanReplicationRef.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.NearCaching.NearCacheOptions.Eviction.get -> Hazelcast.Models.EvictionOptions +~Hazelcast.NearCaching.NearCacheOptions.Eviction.set -> void +~Hazelcast.NearCaching.NearCacheOptions.Name.get -> string +~Hazelcast.NearCaching.NearCacheOptions.Name.set -> void +~Hazelcast.NearCaching.NearCacheOptions.NearCacheOptions(Hazelcast.NearCaching.NearCacheOptions config) -> void +~Hazelcast.NearCaching.NearCacheOptions.NearCacheOptions(string name) -> void +~Hazelcast.NearCaching.NearCacheOptions.Preloader.get -> Hazelcast.NearCaching.NearCachePreloaderOptions +~Hazelcast.NearCaching.NearCacheOptions.Preloader.set -> void +~Hazelcast.NearCaching.NearCacheOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.NearCaching.NearCacheOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.Directory.get -> string +~Hazelcast.NearCaching.NearCachePreloaderOptions.Directory.set -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.NearCachePreloaderOptions(Hazelcast.NearCaching.NearCachePreloaderOptions nearCachePreloaderConfig) -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.NearCachePreloaderOptions(bool enabled, string directory) -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.NearCachePreloaderOptions(string directory) -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~Hazelcast.NearCaching.NearCachePreloaderOptions.SetDirectory(string directory) -> Hazelcast.NearCaching.NearCachePreloaderOptions +~Hazelcast.NearCaching.NearCachePreloaderOptions.SetIsEnabled(bool enabled) -> Hazelcast.NearCaching.NearCachePreloaderOptions +~Hazelcast.NearCaching.NearCachePreloaderOptions.SetStoreInitialDelaySeconds(int storeInitialDelaySeconds) -> Hazelcast.NearCaching.NearCachePreloaderOptions +~Hazelcast.NearCaching.NearCachePreloaderOptions.SetStoreIntervalSeconds(int storeIntervalSeconds) -> Hazelcast.NearCaching.NearCachePreloaderOptions +~Hazelcast.NearCaching.NearCachePreloaderOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~Hazelcast.Networking.NetworkingOptions.Tpc.get -> Hazelcast.Networking.TpcOptions +~Hazelcast.Sql.SqlOptions.Clone() -> Hazelcast.Sql.SqlOptions +~const Hazelcast.Models.DiskTierOptions.Defaults.DeviceName = "default-tiered-store-device" -> string +~const Hazelcast.Models.EvictionOptions.Defaults.ComparatorClassName = null -> string +~const Hazelcast.Models.MapOptions.Defaults.SplitBrainProtectionName = null -> string +~const Hazelcast.Models.MapStoreOptions.Defaults.ClassName = "" -> string +~const Hazelcast.Models.MapStoreOptions.Defaults.FactoryClassName = "" -> string +~const Hazelcast.Models.MergePolicyOptions.Defaults.MergePolicy = "com.hazelcast.spi.merge.PutIfAbsentMergePolicy" -> string +~const Hazelcast.NearCaching.NearCacheOptions.Defaults.Name = "default" -> string +~override Hazelcast.Models.AttributeOptions.ToString() -> string +~override Hazelcast.Models.CacheSimpleEntryListenerOptions.ToString() -> string +~override Hazelcast.Models.Capacity.ToString() -> string +~override Hazelcast.Models.DataPersistenceOptions.ToString() -> string +~override Hazelcast.Models.DiskTierOptions.ToString() -> string +~override Hazelcast.Models.DurationOptions.ToString() -> string +~override Hazelcast.Models.EntryListenerOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~override Hazelcast.Models.EntryListenerOptions.ToString() -> string +~override Hazelcast.Models.EntryListenerOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void +~override Hazelcast.Models.EventJournalOptions.ToString() -> string +~override Hazelcast.Models.EvictionOptions.ToString() -> string +~override Hazelcast.Models.HotRestartOptions.ToString() -> string +~override Hazelcast.Models.ListenerOptions.ToString() -> string +~override Hazelcast.Models.MapOptions.ToString() -> string +~override Hazelcast.Models.MapStoreOptions.ToString() -> string +~override Hazelcast.Models.MemoryTierOptions.ToString() -> string +~override Hazelcast.Models.MergePolicyOptions.ToString() -> string +~override Hazelcast.Models.MerkleTreeOptions.ToString() -> string +~override Hazelcast.Models.PartitioningAttributeOptions.ToString() -> string +~override Hazelcast.Models.PartitioningStrategyOptions.ToString() -> string +~override Hazelcast.Models.PredicateOptions.ToString() -> string +~override Hazelcast.Models.QueryCacheOptions.ToString() -> string +~override Hazelcast.Models.RingbufferOptions.ToString() -> string +~override Hazelcast.Models.RingbufferStoreOptions.ToString() -> string +~override Hazelcast.Models.TieredStoreOptions.ToString() -> string +~override Hazelcast.Models.TimedExpiryPolicyFactoryOptions.ToString() -> string +~override Hazelcast.Models.WanReplicationRef.ToString() -> string +~override Hazelcast.NearCaching.NearCachePreloaderOptions.ToString() -> string +~static Hazelcast.Models.Capacity.Of(long value, Hazelcast.Models.MemoryUnit unit) -> Hazelcast.Models.Capacity +~static Hazelcast.Models.Capacity.Parse(string value) -> Hazelcast.Models.Capacity +~static Hazelcast.Models.Capacity.Parse(string value, Hazelcast.Models.MemoryUnit defaultUnit) -> Hazelcast.Models.Capacity +~static Hazelcast.Models.Capacity.ToPrettyString(long capacity) -> string +~static Hazelcast.Models.Capacity.ToPrettyString(long capacity, Hazelcast.Models.MemoryUnit unit) -> string +~static Hazelcast.Models.MemoryUnitExtensions.Abbrev(this Hazelcast.Models.MemoryUnit memoryUnit) -> string +~static readonly Hazelcast.Models.MemoryTierOptions.Defaults.Capacity -> Hazelcast.Models.Capacity +~virtual Hazelcast.Models.ListenerOptions.ReadData(Hazelcast.Serialization.IObjectDataInput input) -> void +~virtual Hazelcast.Models.ListenerOptions.WriteData(Hazelcast.Serialization.IObjectDataOutput output) -> void \ No newline at end of file diff --git a/src/Hazelcast.Net/PublicAPI/PublicAPI.Unshipped.txt b/src/Hazelcast.Net/PublicAPI/PublicAPI.Unshipped.txt index ff1fd223ae..ab058de62d 100644 --- a/src/Hazelcast.Net/PublicAPI/PublicAPI.Unshipped.txt +++ b/src/Hazelcast.Net/PublicAPI/PublicAPI.Unshipped.txt @@ -1,8 +1 @@ #nullable enable -~Hazelcast.IHazelcastClient.GetDistributedObjectsAsync() -> System.Threading.Tasks.Task> -Hazelcast.Sql.SqlOptions -Hazelcast.Sql.SqlOptions.PartitionArgumentIndexCacheSize.get -> int -Hazelcast.Sql.SqlOptions.PartitionArgumentIndexCacheSize.set -> void -Hazelcast.Sql.SqlOptions.SqlOptions() -> void -~Hazelcast.HazelcastOptions.Sql.get -> Hazelcast.Sql.SqlOptions -~Hazelcast.Sql.SqlOptions.Clone() -> Hazelcast.Sql.SqlOptions diff --git a/src/Hazelcast.Net/Serialization/ObjectDataInputOutputExtensions.cs b/src/Hazelcast.Net/Serialization/ObjectDataInputOutputExtensions.cs new file mode 100644 index 0000000000..ce212b59b1 --- /dev/null +++ b/src/Hazelcast.Net/Serialization/ObjectDataInputOutputExtensions.cs @@ -0,0 +1,73 @@ +// Copyright (c) 2008-2023, Hazelcast, Inc. All Rights Reserved. +// +// Licensed 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. + +using System; +using System.Collections.Generic; + +namespace Hazelcast.Serialization; + +internal static class ObjectDataInputOutputExtensions +{ + public static void WriteCollection(this IObjectDataOutput output, ICollection items) + { + output.WriteInt(items.Count); + foreach (var item in items) output.WriteObject(item); + } + + public static void WriteList(this IObjectDataOutput output, ICollection items) + => output.WriteCollection(items); + + public static void WriteNullableCollection(this IObjectDataOutput output, ICollection items) + { + output.WriteBoolean(items != null); + if (items != null) output.WriteCollection(items); + } + + public static void WriteNullableList(this IObjectDataOutput output, ICollection items) + => output.WriteNullableCollection(items); + + public static ICollection ReadCollection(this IObjectDataInput input) + => input.ReadList(); + + public static List ReadList(this IObjectDataInput input) + { + var count = input.ReadInt(); + var list = new List(count); + for (var i = 0; i < count; i++) list.Add(input.ReadObject()); + return list; + } + + public static ICollection ReadNullableCollection(this IObjectDataInput input) + => input.ReadNullableList(); + + public static List ReadNullableList(this IObjectDataInput input) + => input.ReadBoolean() ? input.ReadList() : null; + + public static void WriteNullableBoolean(this IObjectDataOutput output, bool? value) + { + if (value.HasValue) output.WriteByte(value.Value ? (byte) 1 : (byte) 0); + else output.WriteByte(byte.MaxValue); + } + + public static bool? ReadNullableBoolean(this IObjectDataInput input) + { + return input.ReadByte() switch + { + 0 => false, + 1 => true, + byte.MaxValue => null, + _ => throw new NotSupportedException() + }; + } +} \ No newline at end of file