From fd2e3667812ce46787860d925ca38c794b6770a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?As=C4=B1m=20Arslan?= Date: Tue, 2 Jan 2018 14:06:40 +0300 Subject: [PATCH] API doc improvement Added Test Categories for features introduced at specific versions --- .../ClientConnection.cs | 3 - .../DefaultSocketFactory.cs | 27 --- .../EventMessageConst.cs | 2 +- .../IClientMessage.cs | 92 +++++++-- .../ClientClusterService.cs | 2 +- .../Hazelcast.Client.Spi/ClientContext.cs | 3 +- .../ClientExecutionService.cs | 3 +- .../Hazelcast.Client.Spi/ClientInvocation.cs | 3 +- .../ClientInvocationService.cs | 3 +- .../ClientListenerService.cs | 3 +- .../ClientMembershipListener.cs | 3 +- .../ClientNonSmartInvocationService.cs | 3 +- .../ClientPartitionService.cs | 3 +- .../Hazelcast.Client.Spi/ClientProxy.cs | 3 +- .../ClientSmartInvocationService.cs | 3 +- .../Hazelcast.Client.Spi/EventRegistration.cs | 3 +- .../Hazelcast.Client.Spi/Exception.cs | 21 ++- .../IClientClusterService.cs | 3 +- .../IClientExecutionService.cs | 6 +- .../IClientInvocationService.cs | 1 + .../IClientListenerService.cs | 10 +- .../IClientPartitionService.cs | 7 + .../IClientProxyFactory.cs | 1 + Hazelcast.Net/Hazelcast.Client.Spi/IFuture.cs | 1 + .../ListenerRegistrationKey.cs | 1 + .../MemberAttributeChange.cs | 1 + .../MemberAttributeOperationType.cs | 1 + .../Hazelcast.Client.Spi/ObjectNamespace.cs | 1 + .../Hazelcast.Client.Spi/ProxyManager.cs | 1 + .../Hazelcast.Client.Spi/SettableFuture.cs | 1 + .../Hazelcast.Client/ClientNearCache.cs | 2 +- .../Hazelcast.Client/HazelcastClient.cs | 36 +++- .../Hazelcast.Client/ILoadBalancer.cs | 5 + .../AbstractXmlConfigHelper.cs | 2 + .../Hazelcast.Config/ClientConfig.cs | 130 +++++++++++-- .../Hazelcast.Config/ClientNetworkConfig.cs | 104 ++++++++++- .../GlobalSerializerConfig.cs | 4 + Hazelcast.Net/Hazelcast.Config/GroupConfig.cs | 21 ++- .../Hazelcast.Config/InMemoryFormat.cs | 8 +- .../Hazelcast.Config/NearCacheConfig.cs | 154 +++++++++++++-- .../NearCacheConfigReadOnly.cs | 36 ++++ .../Hazelcast.Config/ProxyFactoryConfig.cs | 19 ++ Hazelcast.Net/Hazelcast.Config/SSLConfig.cs | 1 + .../Hazelcast.Config/SerializationConfig.cs | 176 ++++++++++++++++++ .../Hazelcast.Config/SerializerConfig.cs | 4 + .../SocketInterceptorConfig.cs | 4 + .../Hazelcast.Config/SocketOptions.cs | 6 + .../XmlClientConfigBuilder.cs | 17 ++ Hazelcast.Net/Hazelcast.Core/IMap.cs | 4 +- .../AggregatorAndProjectionTest.cs | 1 + .../Hazelcast.Client.Test/ClientMapTest.cs | 1 + .../ClientNearCacheTest.cs | 1 + .../PartitionPredicateTest.cs | 1 + Hazelcast.Test/Hazelcast.Test.csproj | 6 +- docs/hazelcastdoc.shfbproj | 15 +- 55 files changed, 857 insertions(+), 116 deletions(-) delete mode 100644 Hazelcast.Net/Hazelcast.Client.Connection/DefaultSocketFactory.cs diff --git a/Hazelcast.Net/Hazelcast.Client.Connection/ClientConnection.cs b/Hazelcast.Net/Hazelcast.Client.Connection/ClientConnection.cs index b468bc862e..ff4c1fdf3e 100644 --- a/Hazelcast.Net/Hazelcast.Client.Connection/ClientConnection.cs +++ b/Hazelcast.Net/Hazelcast.Client.Connection/ClientConnection.cs @@ -70,9 +70,6 @@ public ClientConnection(ClientConnectionManager clientConnectionManager, var isa = address.GetInetSocketAddress(); var socketOptions = clientNetworkConfig.GetSocketOptions(); - var socketFactory = socketOptions.GetSocketFactory() ?? new DefaultSocketFactory(); - _clientSocket = socketFactory.CreateSocket(); - try { _clientSocket = new Socket(isa.AddressFamily, SocketType.Stream, ProtocolType.Tcp); diff --git a/Hazelcast.Net/Hazelcast.Client.Connection/DefaultSocketFactory.cs b/Hazelcast.Net/Hazelcast.Client.Connection/DefaultSocketFactory.cs deleted file mode 100644 index 62ae6a11c7..0000000000 --- a/Hazelcast.Net/Hazelcast.Client.Connection/DefaultSocketFactory.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2008-2017, 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.Net.Sockets; - -namespace Hazelcast.Client.Connection -{ - internal class DefaultSocketFactory : ISocketFactory - { - /// - public virtual Socket CreateSocket() - { - return new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); - } - } -} \ No newline at end of file diff --git a/Hazelcast.Net/Hazelcast.Client.Protocol/EventMessageConst.cs b/Hazelcast.Net/Hazelcast.Client.Protocol/EventMessageConst.cs index a1b3d681fa..ac17a71bfd 100644 --- a/Hazelcast.Net/Hazelcast.Client.Protocol/EventMessageConst.cs +++ b/Hazelcast.Net/Hazelcast.Client.Protocol/EventMessageConst.cs @@ -19,7 +19,7 @@ namespace Hazelcast.Client.Protocol /// Message type ids of event responses in client protocol. They also used to bind a request to event inside Request /// annotation. /// - public sealed class EventMessageConst + internal sealed class EventMessageConst { public const int EventMember = 200; public const int EventMemberList = 201; diff --git a/Hazelcast.Net/Hazelcast.Client.Protocol/IClientMessage.cs b/Hazelcast.Net/Hazelcast.Client.Protocol/IClientMessage.cs index eba47870f3..98dc7bb587 100644 --- a/Hazelcast.Net/Hazelcast.Client.Protocol/IClientMessage.cs +++ b/Hazelcast.Net/Hazelcast.Client.Protocol/IClientMessage.cs @@ -17,29 +17,95 @@ namespace Hazelcast.Client.Protocol { + /// + /// Client Message is the carrier framed data as defined below. + /// + /// + ///

+ /// Client Message is the carrier framed data as defined below. + ///

+ ///

+ /// Any request parameter, response or event data will be carried in + /// the payload. + ///

+ ///

+ ///

+    ///         0                   1                   2                   3
+    ///         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+    ///         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    ///         |R|                      Frame Length                           |
+    ///         +-------------+---------------+---------------------------------+
+    ///         |  Version    |B|E|  Flags    |               Type              |
+    ///         +-------------+---------------+---------------------------------+
+    ///         |                                                               |
+    ///         +                       CorrelationId                           +
+    ///         |                                                               |
+    ///         +---------------------------------------------------------------+
+    ///         |                        PartitionId                            |
+    ///         +-----------------------------+---------------------------------+
+    ///         |        Data Offset          |                                 |
+    ///         +-----------------------------+                                 |
+    ///         |                      Message Payload Data                    ...
+    ///         |                                                              ...
+    ///     
+ ///
public interface IClientMessage { + /// Sets the flags field value. + /// The value to set in the flags field. + /// The ClientMessage with the new flags field value. IClientMessage AddFlag(short flags); + + /// Check this flag to see if it is set. + /// true if the given flag is set, false otherwise. + bool IsFlagSet(short listenerEventFlag); + + /// Returns the flags field value. + /// The flags field value. + short GetFlags(); + + /// Returns the message type field. + /// The message type field value. + int GetMessageType(); + + /// Returns the correlation ID field. + /// The correlation ID field. + long GetCorrelationId(); + + /// Sets the correlation ID field. + /// The value to set in the correlation ID field. + /// The ClientMessage with the new correlation ID field value. + IClientMessage SetCorrelationId(long correlationId); + + /// Returns the partition ID field. + /// The partition ID field. + int GetPartitionId(); + + /// Sets the partition ID field. + /// The value to set in the partitions ID field. + /// The ClientMessage with the new partitions ID field value. + IClientMessage SetPartitionId(int partitionId); + + /// Returns the frame length field. + /// The frame length field. + int GetFrameLength(); + + /// Returns the version field value. + /// The version field value. + short GetVersion(); + + /// Checks the frame size and total data size to validate the message size. + /// true if the message is constructed. + bool IsComplete(); + + bool IsRetryable(); bool GetBoolean(); byte GetByte(); - long GetCorrelationId(); IData GetData(); short GetShort(); int GetInt(); long GetLong(); KeyValuePair GetMapEntry(); - int GetMessageType(); - int GetPartitionId(); string GetStringUtf8(); - bool IsFlagSet(short listenerEventFlag); - bool IsRetryable(); - bool IsComplete(); - - /// Sets the correlation id field. - /// The value to set in the correlation id field. - /// The ClientMessage with the new correlation id field value. - IClientMessage SetCorrelationId(long correlationId); - - IClientMessage SetPartitionId(int partitionId); } } \ No newline at end of file diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientClusterService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientClusterService.cs index 416b1b6cd5..139eea4712 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientClusterService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientClusterService.cs @@ -31,7 +31,7 @@ using Hazelcast.Security; using Hazelcast.Util; using ICredentials = Hazelcast.Security.ICredentials; - +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { /// diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientContext.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientContext.cs index e56f75bea4..793592a8e7 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientContext.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientContext.cs @@ -15,7 +15,8 @@ using Hazelcast.Config; using Hazelcast.IO.Serialization; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal sealed class ClientContext { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientExecutionService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientExecutionService.cs index b9b8c4e7f7..49167d541c 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientExecutionService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientExecutionService.cs @@ -18,7 +18,8 @@ using Hazelcast.Core; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal sealed class ClientExecutionService : IClientExecutionService { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocation.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocation.cs index eff17ad7f6..6631e6a984 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocation.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocation.cs @@ -17,7 +17,8 @@ using Hazelcast.IO; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class ClientInvocation { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocationService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocationService.cs index 927c6682e8..6363febc0d 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocationService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientInvocationService.cs @@ -28,7 +28,8 @@ using Hazelcast.Logging; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal abstract class ClientInvocationService : IClientInvocationService, IConnectionListener { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientListenerService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientListenerService.cs index 54fe14edd6..81c8b44ead 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientListenerService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientListenerService.cs @@ -26,7 +26,8 @@ using Hazelcast.Logging; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class ClientListenerService : IClientListenerService, IConnectionListener, IConnectionHeartbeatListener, IDisposable diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientMembershipListener.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientMembershipListener.cs index fa1be14f6f..0400daca1f 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientMembershipListener.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientMembershipListener.cs @@ -23,7 +23,8 @@ using Hazelcast.Logging; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class ClientMembershipListener { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientNonSmartInvocationService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientNonSmartInvocationService.cs index e5109abdca..cd06f63c9a 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientNonSmartInvocationService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientNonSmartInvocationService.cs @@ -17,7 +17,8 @@ using Hazelcast.IO; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class ClientNonSmartInvocationService : ClientInvocationService { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientPartitionService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientPartitionService.cs index b18092b697..78016e2eff 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientPartitionService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientPartitionService.cs @@ -24,7 +24,8 @@ using Hazelcast.Net.Ext; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal sealed class ClientPartitionService : IClientPartitionService diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientProxy.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientProxy.cs index 17a452d731..30c7fee172 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientProxy.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientProxy.cs @@ -23,7 +23,8 @@ using Hazelcast.Partition.Strategy; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal abstract class ClientProxy : IDistributedObject { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ClientSmartInvocationService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ClientSmartInvocationService.cs index dfe8334bf1..a69b26327c 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ClientSmartInvocationService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ClientSmartInvocationService.cs @@ -17,7 +17,8 @@ using Hazelcast.IO; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class ClientSmartInvocationService : ClientInvocationService { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/EventRegistration.cs b/Hazelcast.Net/Hazelcast.Client.Spi/EventRegistration.cs index 7b88f9cc84..5b634ca507 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/EventRegistration.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/EventRegistration.cs @@ -14,7 +14,8 @@ using Hazelcast.Client.Connection; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { internal class EventRegistration { diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/Exception.cs b/Hazelcast.Net/Hazelcast.Client.Spi/Exception.cs index 265c2c0972..78fd6e39e2 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/Exception.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/Exception.cs @@ -16,41 +16,58 @@ using Hazelcast.Core; using Hazelcast.IO; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { + /// + /// Marker interface for exceptions to indicate that an operation can be retried. + /// E.g. a map.get sent to a machine where the partition has just moved to another machine. + /// [Serializable] public class RetryableHazelcastException : HazelcastException { + /// public RetryableHazelcastException() { } + /// public RetryableHazelcastException(string message) : base(message) { } } + /// + /// A that indicates operation is sent to a machine that isn't member of the cluster + /// [Serializable] public class TargetNotMemberException : RetryableHazelcastException { + /// public TargetNotMemberException(string message) : base(message) { } } + /// + /// Thrown when a client invocation is failed because related target is disconnected, and + /// whether the invocation runs or not is indeterminate + /// [Serializable] public class TargetDisconnectedException : RetryableHazelcastException { + /// public TargetDisconnectedException(Address address) : base("Target[" + address + "] disconnected.") { } + /// public TargetDisconnectedException(Address address, string message) : base("Target[" + address + "] disconnected, " + message) { } - + /// public TargetDisconnectedException(string msg) : base(msg) { } diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientClusterService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientClusterService.cs index 725b831747..455630a3f3 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientClusterService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientClusterService.cs @@ -16,7 +16,8 @@ using Hazelcast.Core; using Hazelcast.IO; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { /// mdogan 5/16/13 public interface IClientClusterService diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientExecutionService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientExecutionService.cs index bdac7057a0..c5ad13ff85 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientExecutionService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientExecutionService.cs @@ -17,8 +17,12 @@ using System.Threading.Tasks; using Hazelcast.Core; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { + /// + /// Executor service for Hazelcast clients. + /// public interface IClientExecutionService { Task Schedule(Action command, long delay, TimeUnit unit); diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientInvocationService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientInvocationService.cs index 3cf51e893c..ee01344a61 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientInvocationService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientInvocationService.cs @@ -17,6 +17,7 @@ using Hazelcast.IO; using Hazelcast.Util; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { /// diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientListenerService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientListenerService.cs index 58405cee0b..039a21de28 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientListenerService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientListenerService.cs @@ -15,8 +15,16 @@ using Hazelcast.Client.Protocol; using Hazelcast.Util; -namespace Hazelcast.Client.Spi +#pragma warning disable CS1591 + namespace Hazelcast.Client.Spi { + /// + /// Client service to add/remove remote listeners. + /// + /// + /// For smart client, it registers local listeners to all nodes in the cluster. + /// For dummy client, it registers global listener to one node. + /// public interface IClientListenerService { bool AddEventHandler(long correlationId, DistributedEventHandler eventHandler); diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientPartitionService.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientPartitionService.cs index 2f11ddf8fc..14103efc1f 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientPartitionService.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientPartitionService.cs @@ -14,8 +14,15 @@ using Hazelcast.IO; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { + /// + /// Partition service for Hazelcast clients. + /// + /// + /// Allows to retrieve information about the partition count, partition owner or partition ID of a key. + /// public interface IClientPartitionService { int GetPartitionCount(); diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IClientProxyFactory.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IClientProxyFactory.cs index d8b3f35a75..2579165f90 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IClientProxyFactory.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IClientProxyFactory.cs @@ -14,6 +14,7 @@ using System; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { internal delegate ClientProxy ClientProxyFactory(Type type, string id); diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/IFuture.cs b/Hazelcast.Net/Hazelcast.Client.Spi/IFuture.cs index b55fb3a830..a9c387aa43 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/IFuture.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/IFuture.cs @@ -15,6 +15,7 @@ using System; using System.Threading.Tasks; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { public interface IFuture diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ListenerRegistrationKey.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ListenerRegistrationKey.cs index 9cf8c5735e..4045a69a31 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ListenerRegistrationKey.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ListenerRegistrationKey.cs @@ -15,6 +15,7 @@ using Hazelcast.Client.Protocol; using Hazelcast.Util; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { internal class ListenerRegistrationKey diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeChange.cs b/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeChange.cs index e314ec3a19..997d14fead 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeChange.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeChange.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { internal class MemberAttributeChange diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeOperationType.cs b/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeOperationType.cs index 1feaa82788..5e0b2cf4cc 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeOperationType.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/MemberAttributeOperationType.cs @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { /// Used to identify the type of member attribute change, either PUT or REMOVED diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ObjectNamespace.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ObjectNamespace.cs index 123b939fbd..fc0d990396 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ObjectNamespace.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ObjectNamespace.cs @@ -15,6 +15,7 @@ using System; using System.Text; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { [Serializable] diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/ProxyManager.cs b/Hazelcast.Net/Hazelcast.Client.Spi/ProxyManager.cs index ba822bace3..98fd46f13b 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/ProxyManager.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/ProxyManager.cs @@ -28,6 +28,7 @@ using Hazelcast.Logging; using Hazelcast.Util; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { internal sealed class ProxyManager diff --git a/Hazelcast.Net/Hazelcast.Client.Spi/SettableFuture.cs b/Hazelcast.Net/Hazelcast.Client.Spi/SettableFuture.cs index aa6cef2f4e..5f3f9987c5 100644 --- a/Hazelcast.Net/Hazelcast.Client.Spi/SettableFuture.cs +++ b/Hazelcast.Net/Hazelcast.Client.Spi/SettableFuture.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using Hazelcast.Util; +#pragma warning disable CS1591 namespace Hazelcast.Client.Spi { //WARNING: All exceptions should returned from the _taskSource otherwise UnobservedTaskException problem occur diff --git a/Hazelcast.Net/Hazelcast.Client/ClientNearCache.cs b/Hazelcast.Net/Hazelcast.Client/ClientNearCache.cs index eb9b7991d1..d3ac6cd5ee 100644 --- a/Hazelcast.Net/Hazelcast.Client/ClientNearCache.cs +++ b/Hazelcast.Net/Hazelcast.Client/ClientNearCache.cs @@ -27,7 +27,7 @@ namespace Hazelcast.Client { - public enum ClientNearCacheType + internal enum ClientNearCacheType { Map, ReplicatedMap diff --git a/Hazelcast.Net/Hazelcast.Client/HazelcastClient.cs b/Hazelcast.Net/Hazelcast.Client/HazelcastClient.cs index 7639610bde..a116e3fb15 100644 --- a/Hazelcast.Net/Hazelcast.Client/HazelcastClient.cs +++ b/Hazelcast.Net/Hazelcast.Client/HazelcastClient.cs @@ -102,96 +102,115 @@ private HazelcastClient(ClientConfig config) _lockReferenceIdGenerator = new ClientLockReferenceIdGenerator(); } + /// public string GetName() { return _instanceName; } + /// public IQueue GetQueue(string name) { return GetDistributedObject>(ServiceNames.Queue, name); } + /// public IRingbuffer GetRingbuffer(string name) { return GetDistributedObject>(ServiceNames.Ringbuffer, name); } + /// public ITopic GetTopic(string name) { return GetDistributedObject>(ServiceNames.Topic, name); } + /// public IHSet GetSet(string name) { return GetDistributedObject>(ServiceNames.Set, name); } + /// public IHList GetList(string name) { return GetDistributedObject>(ServiceNames.List, name); } + /// public IMap GetMap(string name) { return GetDistributedObject>(ServiceNames.Map, name); } + /// public IMultiMap GetMultiMap(string name) { return GetDistributedObject>(ServiceNames.MultiMap, name); } + /// public IReplicatedMap GetReplicatedMap(string name) { return GetDistributedObject>(ServiceNames.ReplicatedMap, name); } + /// public ILock GetLock(string key) { return GetDistributedObject(ServiceNames.Lock, key); } + /// public ICluster GetCluster() { return new ClientClusterProxy(_clusterService); } + /// public IEndpoint GetLocalEndpoint() { return _clusterService.GetLocalClient(); } + /// public ITransactionContext NewTransactionContext() { return NewTransactionContext(TransactionOptions.GetDefault()); } + /// public ITransactionContext NewTransactionContext(TransactionOptions options) { return new TransactionContextProxy(this, options); } + /// public IIdGenerator GetIdGenerator(string name) { return GetDistributedObject(ServiceNames.IdGenerator, name); } + /// public IAtomicLong GetAtomicLong(string name) { return GetDistributedObject(ServiceNames.AtomicLong, name); } + /// public ICountDownLatch GetCountDownLatch(string name) { return GetDistributedObject(ServiceNames.CountDownLatch, name); } + /// public ISemaphore GetSemaphore(string name) { return GetDistributedObject(ServiceNames.Semaphore, name); } + /// public ICollection GetDistributedObjects() { try @@ -213,37 +232,44 @@ public ICollection GetDistributedObjects() } } + /// public string AddDistributedObjectListener(IDistributedObjectListener distributedObjectListener) { return _proxyManager.AddDistributedObjectListener(distributedObjectListener); } + /// public bool RemoveDistributedObjectListener(string registrationId) { return _proxyManager.RemoveDistributedObjectListener(registrationId); } + /// public IClientService GetClientService() { throw new NotSupportedException(); } + /// public ILifecycleService GetLifecycleService() { return _lifecycleService; } + /// public T GetDistributedObject(string serviceName, string name) where T : IDistributedObject { var clientProxy = _proxyManager.GetOrCreateProxy(serviceName, name); return (T) ((IDistributedObject) clientProxy); } + /// public ConcurrentDictionary GetUserContext() { return _userContext; } + /// public void Shutdown() { GetLifecycleService().Shutdown(); @@ -258,16 +284,22 @@ public static ICollection GetAllHazelcastClients() return (ICollection) Clients.Values; } + /// + /// Gets the configured instance + /// + /// public ILoadBalancer GetLoadBalancer() { return _loadBalancer; } - // @Override + /// + /// Not supported yet. + /// + /// public IClientPartitionService GetPartitionService() { throw new NotSupportedException("not supported yet"); - //return new PartitionServiceProxy(partitionService); } /// diff --git a/Hazelcast.Net/Hazelcast.Client/ILoadBalancer.cs b/Hazelcast.Net/Hazelcast.Client/ILoadBalancer.cs index ca5df1b228..8ca5e7272f 100644 --- a/Hazelcast.Net/Hazelcast.Client/ILoadBalancer.cs +++ b/Hazelcast.Net/Hazelcast.Client/ILoadBalancer.cs @@ -32,6 +32,11 @@ namespace Hazelcast.Client /// public interface ILoadBalancer { + /// + /// Initializes the LoadBalancer. + /// + /// the Cluster this LoadBalancer uses to select members from + /// the ClientConfig void Init(ICluster cluster, ClientConfig config); /// Returns the next member to route to diff --git a/Hazelcast.Net/Hazelcast.Config/AbstractXmlConfigHelper.cs b/Hazelcast.Net/Hazelcast.Config/AbstractXmlConfigHelper.cs index a8ae22ac28..ad0f75c084 100644 --- a/Hazelcast.Net/Hazelcast.Config/AbstractXmlConfigHelper.cs +++ b/Hazelcast.Net/Hazelcast.Config/AbstractXmlConfigHelper.cs @@ -21,6 +21,8 @@ namespace Hazelcast.Config { +#pragma warning disable CS1591 + public abstract class AbstractXmlConfigHelper { private static readonly ILogger Logger = Logging.Logger.GetLogger(typeof (AbstractXmlConfigHelper)); diff --git a/Hazelcast.Net/Hazelcast.Config/ClientConfig.cs b/Hazelcast.Net/Hazelcast.Config/ClientConfig.cs index 5e9f16c45f..8ed6efc9cc 100644 --- a/Hazelcast.Net/Hazelcast.Config/ClientConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/ClientConfig.cs @@ -21,6 +21,9 @@ namespace Hazelcast.Config { + /// + /// Main configuration to setup a Hazelcast Client. + /// public class ClientConfig { private static readonly ILogger Logger = Logging.Logger.GetLogger(typeof (ClientConfig)); @@ -79,30 +82,55 @@ public class ClientConfig private SerializationConfig _serializationConfig = new SerializationConfig(); + /// + /// Helper method to add a new ListenerConfig. + /// + /// ListnerConfig + /// configured for chaining public virtual ClientConfig AddListenerConfig(ListenerConfig listenerConfig) { GetListenerConfigs().Add(listenerConfig); return this; } + /// + /// Helper method to add a new NearCacheConfig. + /// + /// NearCacheConfig + /// configured for chaining public virtual ClientConfig AddNearCacheConfig(NearCacheConfig nearCacheConfig) { _nearCacheConfigMap.Add(nearCacheConfig.GetName(), nearCacheConfig); return this; } + /// + /// Helper method to add a new NearCacheConfig. + /// + /// name of the IMap / ICache that Near Cache config will be applied to + /// NearCacheConfig + /// configured for chaining public virtual ClientConfig AddNearCacheConfig(string mapName, NearCacheConfig nearCacheConfig) { _nearCacheConfigMap.Add(mapName, nearCacheConfig); return this; } + /// + /// Helper method to add a new . + /// + /// ProxyFactoryConfig + /// configured for chaining public virtual ClientConfig AddProxyFactoryConfig(ProxyFactoryConfig proxyFactoryConfig) { _proxyFactoryConfigs.Add(proxyFactoryConfig); return this; } + /// + /// Gets . + /// + /// Credentials public virtual ICredentials GetCredentials() { if (_credentials == null) @@ -113,113 +141,191 @@ public virtual ICredentials GetCredentials() return _credentials; } + /// + /// Gets pool-size for internal ExecutorService which handles responses etc. + /// public virtual int GetExecutorPoolSize() { return _executorPoolSize; } + /// + /// Gets . + /// + /// public virtual GroupConfig GetGroupConfig() { return _groupConfig; } + /// + /// Gets list of configured . + /// + /// list of configured public virtual IList GetListenerConfigs() { return _listenerConfigs; } + /// + /// Gets . + /// + /// public virtual IManagedContext GetManagedContext() { return _managedContext; } + /// + /// Gets . + /// + /// name of map + /// public virtual NearCacheConfig GetNearCacheConfig(string mapName) { return LookupByPattern(_nearCacheConfigMap, mapName); } + /// + /// Gets dictionary of all configured 's with the name key and configuration as the value. + /// + /// Dictionary of NearCacheConfig public virtual IDictionary GetNearCacheConfigMap() { return _nearCacheConfigMap; } - //public virtual ClientSecurityConfig GetSecurityConfig() - //{ - // return securityConfig; - //} - - //public virtual void SetSecurityConfig(ClientSecurityConfig securityConfig) - //{ - // this.securityConfig = securityConfig; - //} - + /// + /// Gets . + /// + /// public virtual ClientNetworkConfig GetNetworkConfig() { return _networkConfig; } + /// + /// Gets . + /// + /// public virtual IList GetProxyFactoryConfigs() { return _proxyFactoryConfigs; } + /// + /// Gets . + /// + /// public virtual SerializationConfig GetSerializationConfig() { return _serializationConfig; } - public void SetConfigPatternMatcher(IConfigPatternMatcher matchingPointConfigPatternMatcher) + /// + /// Sets . + /// + /// + /// + public ClientConfig SetConfigPatternMatcher(IConfigPatternMatcher matchingPointConfigPatternMatcher) { _configPatternMatcher = matchingPointConfigPatternMatcher; + return this; } + /// + /// Sets object. + /// + /// to be set + /// for chaining public virtual ClientConfig SetCredentials(ICredentials credentials) { _credentials = credentials; return this; } + /// + /// Sets pool-size for internal ExecutorService which handles responses etc. + /// + /// executor pool size + /// for chaining public virtual ClientConfig SetExecutorPoolSize(int executorPoolSize) { _executorPoolSize = executorPoolSize; return this; } + /// + /// Sets object. + /// + /// to be set + /// for chaining public virtual ClientConfig SetGroupConfig(GroupConfig groupConfig) { _groupConfig = groupConfig; return this; } + /// + /// Sets object. + /// + /// to be set + /// for chaining public virtual ClientConfig SetListenerConfigs(IList listenerConfigs) { _listenerConfigs = listenerConfigs; return this; } + /// + /// Sets object. + /// + /// + /// for chaining public virtual ClientConfig SetManagedContext(IManagedContext managedContext) { _managedContext = managedContext; return this; } + /// + /// Sets all near cache configs. + /// + /// Dictionary of map-name to NearCacheConfig + /// for chaining public virtual ClientConfig SetNearCacheConfigMap(IDictionary nearCacheConfigMap) { _nearCacheConfigMap = nearCacheConfigMap; return this; } - public virtual void SetNetworkConfig(ClientNetworkConfig networkConfig) + /// + /// Sets . + /// + /// + /// for chaining + public virtual ClientConfig SetNetworkConfig(ClientNetworkConfig networkConfig) { _networkConfig = networkConfig; + return this; } + /// + /// Sets . + /// + /// + /// for chaining public virtual ClientConfig SetProxyFactoryConfigs(IList proxyFactoryConfigs) { _proxyFactoryConfigs = proxyFactoryConfigs; return this; } + /// + /// Sets . + /// + /// + /// for chaining public virtual ClientConfig SetSerializationConfig(SerializationConfig serializationConfig) { _serializationConfig = serializationConfig; diff --git a/Hazelcast.Net/Hazelcast.Config/ClientNetworkConfig.cs b/Hazelcast.Net/Hazelcast.Config/ClientNetworkConfig.cs index 69b4820487..19c449ad37 100644 --- a/Hazelcast.Net/Hazelcast.Config/ClientNetworkConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/ClientNetworkConfig.cs @@ -16,6 +16,9 @@ namespace Hazelcast.Config { + /// + /// Contains configuration parameters for client network related behavior + /// public class ClientNetworkConfig { /// List of the initial set of addresses. @@ -76,12 +79,21 @@ public class ClientNetworkConfig private SSLConfig _sslConfig = new SSLConfig(); + /// + /// Adds given addresses to the list of candidate addresses that client will use to establish initial connection. + /// + /// + /// for chaining public virtual ClientNetworkConfig AddAddress(params string[] addresses) { _addressList.AddRange(addresses); return this; } + /// + /// Returns the list of candidate addresses that client will use to establish initial connection + /// + /// list of addresses public virtual IList GetAddresses() { if (_addressList.Count == 0) @@ -91,49 +103,85 @@ public virtual IList GetAddresses() return _addressList; } + /// + /// While client is trying to connect initially to one of the members in the configured address list, + /// all might be not available. Instead of giving up, throwing Exception and stopping client, it will + /// attempt to retry as much as connection attempt limit times. + /// + /// number of times to attempt to connect public virtual int GetConnectionAttemptLimit() { return _connectionAttemptLimit; } + /// + /// Gets the connection attempt period, in millis, for the next attempt to find a member to connect. + /// + /// connection attempt period in millis public virtual int GetConnectionAttemptPeriod() { return _connectionAttemptPeriod; } + /// + /// Gets connection timeout. + /// + /// connection timeout public virtual int GetConnectionTimeout() { return _connectionTimeout; } + /// + /// Gets . + /// + /// public virtual SocketInterceptorConfig GetSocketInterceptorConfig() { return _socketInterceptorConfig; } + /// + /// Gets . + /// + /// public virtual SocketOptions GetSocketOptions() { return _socketOptions; } + /// + /// Gets . + /// + /// public virtual SSLConfig GetSSLConfig() { return _sslConfig; } + /// + /// Specifies whether the redo operations are enabled or not. + /// + /// public virtual bool IsRedoOperation() { return _redoOperation; } - /// Enabling ssl for client - //private SSLConfig sslConfig = null; + /// + /// Specifies whether the client is smart or not. + /// + /// true if client is smart public virtual bool IsSmartRouting() { return _smartRouting; } - // required for spring module + /// + /// Sets all addresses + /// + /// list of addresses + /// for chaining public virtual ClientNetworkConfig SetAddresses(IList addresses) { _addressList.Clear(); @@ -141,48 +189,98 @@ public virtual ClientNetworkConfig SetAddresses(IList addresses) return this; } + /// + /// While client is trying to connect initially to one of the members in the configured address list, + /// all might be not available. Instead of giving up, throwing Exception and stopping client, it will + /// attempt to retry as much as connection attempt limit times. + /// + /// + /// number of times to attempt to connect; + /// A zero value means try forever. + /// A negative value means default value + /// + /// for chaining public virtual ClientNetworkConfig SetConnectionAttemptLimit(int connectionAttemptLimit) { _connectionAttemptLimit = connectionAttemptLimit; return this; } + /// + /// Sets the connection attempt period, in millis, for the next attempt to find a member to connect.. + /// + /// time to wait before another attempt in millis + /// for chaining public virtual ClientNetworkConfig SetConnectionAttemptPeriod(int connectionAttemptPeriod) { _connectionAttemptPeriod = connectionAttemptPeriod; return this; } + /// + /// Sets connection timeout + /// + /// connection timeout + /// for chaining public virtual ClientNetworkConfig SetConnectionTimeout(int connectionTimeout) { _connectionTimeout = connectionTimeout; return this; } + /// + /// If true, client will redo the operations that were executing on the server and client lost the connection. + /// This can be because of network, or simply because the member died. However it is not clear whether the + /// application is performed or not. For idempotent operations this is harmless, but for non-idempotent ones + /// retrying can cause to undesirable effects. Note that the redo can perform on any member. + /// If false, the operation will throw exception + /// + /// true if redo operations are enabled + /// for chaining public virtual ClientNetworkConfig SetRedoOperation(bool redoOperation) { _redoOperation = redoOperation; return this; } + /// + /// If true, client will route the key based operations to owner of the key at the best effort. + /// + /// true if smart routing should be enabled. + /// for chaining public virtual ClientNetworkConfig SetSmartRouting(bool smartRouting) { _smartRouting = smartRouting; return this; } + /// + /// Sets + /// + /// + /// for chaining public virtual ClientNetworkConfig SetSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig) { _socketInterceptorConfig = socketInterceptorConfig; return this; } + /// + /// Sets + /// + /// + /// for chaining public virtual ClientNetworkConfig SetSocketOptions(SocketOptions socketOptions) { _socketOptions = socketOptions; return this; } + /// + /// Sets + /// + /// + /// for chaining public virtual ClientNetworkConfig SetSSLConfig(SSLConfig sslConfig) { _sslConfig = sslConfig; diff --git a/Hazelcast.Net/Hazelcast.Config/GlobalSerializerConfig.cs b/Hazelcast.Net/Hazelcast.Config/GlobalSerializerConfig.cs index 80070d5757..eb35aa2caf 100644 --- a/Hazelcast.Net/Hazelcast.Config/GlobalSerializerConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/GlobalSerializerConfig.cs @@ -17,6 +17,9 @@ namespace Hazelcast.Config { + /// + /// Contains the configuration for global serializer. + /// public class GlobalSerializerConfig { private string _className; @@ -57,6 +60,7 @@ public bool GetOverrideClrSerialization() return _overrideClrSerialization; } + /// public override string ToString() { return string.Format("ClassName: {0}, Implementation: {1}, OverrideClrSerialization: {2}", diff --git a/Hazelcast.Net/Hazelcast.Config/GroupConfig.cs b/Hazelcast.Net/Hazelcast.Config/GroupConfig.cs index adc0a08be6..29f103a700 100644 --- a/Hazelcast.Net/Hazelcast.Config/GroupConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/GroupConfig.cs @@ -25,21 +25,27 @@ namespace Hazelcast.Config /// public sealed class GroupConfig { + /// + /// Default group password. + /// public const string DefaultGroupPassword = "dev-pass"; + /// + /// Default group name. + /// public const string DefaultGroupName = "dev"; private string _name = DefaultGroupName; private string _password = DefaultGroupPassword; - /// Creates a GroupConfig with default group-name and group-password. - /// Creates a GroupConfig with default group-name and group-password. + /// Creates a with default group-name and group-password. + /// Creates a with default group-name and group-password. public GroupConfig() { } - /// Creates a GroupConfig with the given group-name and default group-password + /// Creates a with the given group-name and default group-password /// the name of the group /// if name is null. public GroupConfig(string name) @@ -47,7 +53,7 @@ public GroupConfig(string name) SetName(name); } - /// Creates a GroupConfig with the given group-name and group-password + /// Creates a with the given group-name and group-password /// the name of the group /// the password of the group /// if name or password is null. @@ -57,6 +63,7 @@ public GroupConfig(string name, string password) SetPassword(password); } + /// public override bool Equals(object obj) { if (this == obj) @@ -72,6 +79,7 @@ public override bool Equals(object obj) (_password == null ? other._password == null : _password.Equals(other._password)); } + /// public override int GetHashCode() { return (_name != null ? _name.GetHashCode() : 0) + 31*(_password != null ? _password.GetHashCode() : 0); @@ -96,7 +104,7 @@ public string GetPassword() /// Sets the group name. /// Sets the group name. /// the name to set - /// the updated GroupConfig. + /// the updated . /// if name is null. public GroupConfig SetName(string name) { @@ -107,7 +115,7 @@ public GroupConfig SetName(string name) /// Sets the password. /// Sets the password. /// the password to set - /// the updated GroupConfig. + /// the updated . /// if password is null. public GroupConfig SetPassword(string password) { @@ -115,6 +123,7 @@ public GroupConfig SetPassword(string password) return this; } + /// public override string ToString() { var builder = new StringBuilder(); diff --git a/Hazelcast.Net/Hazelcast.Config/InMemoryFormat.cs b/Hazelcast.Net/Hazelcast.Config/InMemoryFormat.cs index 17c110a6ba..f6c8244be2 100644 --- a/Hazelcast.Net/Hazelcast.Config/InMemoryFormat.cs +++ b/Hazelcast.Net/Hazelcast.Config/InMemoryFormat.cs @@ -17,8 +17,14 @@ namespace Hazelcast.Config /// Storage format type of values stored in cluster public enum InMemoryFormat { + /// + /// Binary format + /// Binary, + + /// + /// Object data + /// Object - // Offheap } } \ No newline at end of file diff --git a/Hazelcast.Net/Hazelcast.Config/NearCacheConfig.cs b/Hazelcast.Net/Hazelcast.Config/NearCacheConfig.cs index c59d1cef5e..29d4773f2c 100644 --- a/Hazelcast.Net/Hazelcast.Config/NearCacheConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/NearCacheConfig.cs @@ -17,6 +17,9 @@ namespace Hazelcast.Config { + /// + /// Contains the configuration for a Near Cache. + /// public class NearCacheConfig { public const int DefaultTtlSeconds = 0; @@ -26,8 +29,8 @@ public class NearCacheConfig public static readonly InMemoryFormat DefaultMemoryFormat = InMemoryFormat.Binary; - private bool _cacheLocalEntries; private string _evictionPolicy = DefaultEvictionPolicy; + private bool _cacheLocalEntries; private InMemoryFormat _inMemoryFormat = DefaultMemoryFormat; private bool _invalidateOnChange = true; private int _maxIdleSeconds = DefaultMaxIdleSeconds; @@ -56,7 +59,6 @@ public NearCacheConfig(NearCacheConfig config) _maxIdleSeconds = config.GetMaxIdleSeconds(); _maxSize = config.GetMaxSize(); _timeToLiveSeconds = config.GetTimeToLiveSeconds(); - _cacheLocalEntries = config.IsCacheLocalEntries(); } public NearCacheConfig() @@ -68,6 +70,10 @@ public NearCacheConfig(string name) _name = name; } + /// + /// Returns an immutable version of this configuration. + /// + /// public virtual NearCacheConfigReadOnly GetAsReadOnly() { if (_readOnly == null) @@ -77,101 +83,201 @@ public virtual NearCacheConfigReadOnly GetAsReadOnly() return _readOnly; } + /// + /// Returns the eviction policy for the Near Cache. + /// + /// eviction policy public virtual string GetEvictionPolicy() { return _evictionPolicy; } + /// + /// Returns + /// + /// public virtual InMemoryFormat GetInMemoryFormat() { return _inMemoryFormat; } + /// + /// Gets the maximum number of seconds each entry can stay in the Near Cache as untouched (not read). + /// + /// + /// Entries that are untouched more than maxIdleSeconds value will get removed from the Near Cache. + /// + /// maximum number of seconds each entry can stay in the Near Cache as untouched public virtual int GetMaxIdleSeconds() { return _maxIdleSeconds; } + /// + /// Returns the maximum size of the Near Cache.
+ /// When the maxSize is reached, the Near Cache is evicted based on the policy defined. + ///
+ /// the maximum size of the Near Cache public virtual int GetMaxSize() { return _maxSize; } + /// + /// Returns the name of the Near Cache + /// + /// the name of the Near Cache public virtual string GetName() { return _name; } + /// + /// Returns the maximum number of seconds for each entry to stay in the Near Cache (time to live).
+ /// Entries that are older than timeToLiveSeconds will automatically be evicted from the Near Cache. + ///
+ /// the maximum number of seconds for each entry to stay in the Near Cache public virtual int GetTimeToLiveSeconds() { return _timeToLiveSeconds; } - public virtual bool IsCacheLocalEntries() - { - return _cacheLocalEntries; - } - + /// + /// Checks if Near Cache entries are invalidated when the entries in the backing data structure are changed + /// (updated or removed). + ///
+ /// When this setting is enabled, a Hazelcast instance with a Near Cache listens for cluster-wide changes + /// on the entries of the backing data structure and invalidates its corresponding Near Cache entries. + /// Changes done on the local Hazelcast instance always invalidate the Near Cache immediately. + ///
+ /// true if Near Cache invalidations are enabled on changes, false otherwise public virtual bool IsInvalidateOnChange() { return _invalidateOnChange; } - public virtual NearCacheConfig SetCacheLocalEntries(bool cacheLocalEntries) - { - _cacheLocalEntries = cacheLocalEntries; - return this; - } - + /// + /// Sets the eviction policy. + /// Valid values are: + ///
    + ///
  • LRU (Least Recently Used)
  • + ///
  • LFU (Least Frequently Used)
  • + ///
  • NONE (no extra eviction, time-to-live-seconds or max-idle-seconds may still apply)
  • + ///
  • RANDOM (random entry)
  • + ///
+ ///
+ /// eviction policy. + /// this Near Cache config instance public virtual NearCacheConfig SetEvictionPolicy(string evictionPolicy) { _evictionPolicy = evictionPolicy; return this; } + /// + /// Sets the data type used to store entries. + ///
+ /// Possible values: + ///
    + ///
  • BINARY: keys and values are stored as binary data
  • + ///
  • OBJECT: values are stored in their object forms
  • + ///
  • NATIVE: keys and values are stored in native memory
  • + ///
+ /// The default value is BINARY. + ///
+ /// the data type used to store entries + /// this Near Cache config instance public virtual NearCacheConfig SetInMemoryFormat(InMemoryFormat inMemoryFormat) { _inMemoryFormat = inMemoryFormat; return this; } - // this setter is for reflection based configuration building + /// + /// + /// this setter is for reflection based configuration building + /// public virtual NearCacheConfig SetInMemoryFormat(string inMemoryFormat) { Enum.TryParse(inMemoryFormat, true, out _inMemoryFormat); return this; } + /// + /// Sets if Near Cache entries are invalidated when the entries in the backing data structure are changed + /// (updated or removed). + ///
+ /// When this setting is enabled, a Hazelcast instance with a Near Cache listens for cluster-wide changes + /// on the entries of the backing data structure and invalidates its corresponding Near Cache entries. + /// Changes done on the local Hazelcast instance always invalidate the Near Cache immediately. + ///
+ /// + /// this Near Cache config instance public virtual NearCacheConfig SetInvalidateOnChange(bool invalidateOnChange) { _invalidateOnChange = invalidateOnChange; return this; } + /// + /// Set the maximum number of seconds each entry can stay in the Near Cache as untouched (not read). + /// + /// + /// Entries that are untouched (not read) more than maxIdleSeconds value will get removed from the Near Cache. + ///
+ /// Accepts any integer between 0 and int.MaxValue. The value 0 means int.MaxValue. + /// The default is 0. + ///
+ /// + /// this Near Cache config instance public virtual NearCacheConfig SetMaxIdleSeconds(int maxIdleSeconds) { _maxIdleSeconds = maxIdleSeconds; return this; } - + /// + /// Sets the maximum size of the Near Cache. + /// When the maxSize is reached, the Near Cache is evicted based on the policy defined. + ///
+ /// Accepts any integer between 0 and int.MaxValue. The value 0 means int.MaxValue. + /// The default is 0. + ///
+ /// the maximum size of the Near Cache + /// this Near Cache config instance public virtual NearCacheConfig SetMaxSize(int maxSize) { _maxSize = maxSize; return this; } + /// + /// Sets the name of the Near Cache. + /// + /// the name of the Near Cache + /// this Near Cache config instance public virtual NearCacheConfig SetName(string name) { _name = name; return this; } + /// + /// Returns the maximum number of seconds for each entry to stay in the Near Cache (time to live). + ///
+ /// Entries that are older than {@code timeToLiveSeconds} will automatically be evicted from the Near Cache. + ///
+ /// Accepts any integer between 0 and int.MaxValue. The value 0 means int.MaxValue. + /// The default is 0. + ///
+ /// the maximum number of seconds for each entry to stay in the Near Cache + /// this Near Cache config instance public virtual NearCacheConfig SetTimeToLiveSeconds(int timeToLiveSeconds) { _timeToLiveSeconds = timeToLiveSeconds; return this; } + /// public override string ToString() { var sb = new StringBuilder("NearCacheConfig{"); @@ -181,9 +287,23 @@ public override string ToString() sb.Append(", maxIdleSeconds=").Append(_maxIdleSeconds); sb.Append(", invalidateOnChange=").Append(_invalidateOnChange); sb.Append(", inMemoryFormat=").Append(_inMemoryFormat); - sb.Append(", cacheLocalEntries=").Append(_cacheLocalEntries); - sb.Append('}'); return sb.ToString(); } + +#pragma warning disable CS1591 + [Obsolete("This configuration is not used on client")] + public virtual bool IsCacheLocalEntries() + { + return _cacheLocalEntries; + } + + [Obsolete("This configuration is not used on client")] + public virtual NearCacheConfig SetCacheLocalEntries(bool cacheLocalEntries) + { + _cacheLocalEntries = cacheLocalEntries; + return this; + } +#pragma warning restore + } } \ No newline at end of file diff --git a/Hazelcast.Net/Hazelcast.Config/NearCacheConfigReadOnly.cs b/Hazelcast.Net/Hazelcast.Config/NearCacheConfigReadOnly.cs index 9545e9f540..9d16c48c2f 100644 --- a/Hazelcast.Net/Hazelcast.Config/NearCacheConfigReadOnly.cs +++ b/Hazelcast.Net/Hazelcast.Config/NearCacheConfigReadOnly.cs @@ -16,47 +16,83 @@ namespace Hazelcast.Config { + /// + /// Readonly version of + /// public class NearCacheConfigReadOnly : NearCacheConfig { + public NearCacheConfigReadOnly(NearCacheConfig config) : base(config) { } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetEvictionPolicy(string evictionPolicy) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetInMemoryFormat(InMemoryFormat inMemoryFormat) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetInMemoryFormat(string inMemoryFormat) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetInvalidateOnChange(bool invalidateOnChange) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetMaxIdleSeconds(int maxIdleSeconds) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetMaxSize(int maxSize) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetName(string name) { throw new NotSupportedException("This config is read-only"); } + /// + /// Not supported function in readonly config, throws + /// + /// public override NearCacheConfig SetTimeToLiveSeconds(int timeToLiveSeconds) { throw new NotSupportedException("This config is read-only"); diff --git a/Hazelcast.Net/Hazelcast.Config/ProxyFactoryConfig.cs b/Hazelcast.Net/Hazelcast.Config/ProxyFactoryConfig.cs index 62165b4cbd..77ab0342ad 100644 --- a/Hazelcast.Net/Hazelcast.Config/ProxyFactoryConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/ProxyFactoryConfig.cs @@ -14,6 +14,9 @@ namespace Hazelcast.Config { + /// + /// This class is related to SPI; it is used to register custom services to client. + /// public class ProxyFactoryConfig { private string _className; @@ -29,21 +32,37 @@ public ProxyFactoryConfig(string className, string service) _service = service; } + /// + /// Gets class name of proxy factory + /// + /// class name of proxy factory public virtual string GetClassName() { return _className; } + /// + /// Gets service name of related proxy factory + /// + /// service name of related proxy factory public virtual string GetService() { return _service; } + /// + /// Sets class name of proxy factory + /// + /// class name of proxy factory public virtual void SetClassName(string className) { _className = className; } + /// + /// Sets service name of related proxy factory + /// + /// service name of related proxy factory public virtual void SetService(string service) { _service = service; diff --git a/Hazelcast.Net/Hazelcast.Config/SSLConfig.cs b/Hazelcast.Net/Hazelcast.Config/SSLConfig.cs index 22dc700d8e..77af489927 100644 --- a/Hazelcast.Net/Hazelcast.Config/SSLConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/SSLConfig.cs @@ -79,6 +79,7 @@ internal string GetCertificateName() return GetProperty(CertificateName); } + /// public override string ToString() { var sb = new StringBuilder(); diff --git a/Hazelcast.Net/Hazelcast.Config/SerializationConfig.cs b/Hazelcast.Net/Hazelcast.Config/SerializationConfig.cs index 96cf9f20e4..8c36478fe2 100644 --- a/Hazelcast.Net/Hazelcast.Config/SerializationConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/SerializationConfig.cs @@ -21,6 +21,12 @@ namespace Hazelcast.Config { + /// + /// Contains the serialization configuration + /// + /// + /// , , custom serializers, and global serializer can be configured using this config. + /// public class SerializationConfig { private ByteOrder _byteOrder = ByteOrder.BigEndian; @@ -41,6 +47,11 @@ public class SerializationConfig private bool _useNativeByteOrder; + /// + /// Adds a class definition to be registered + /// + /// class definition + /// configured for chaining public virtual SerializationConfig AddClassDefinition(IClassDefinition classDefinition) { if (GetClassDefinitions().Contains(classDefinition)) @@ -52,6 +63,12 @@ public virtual SerializationConfig AddClassDefinition(IClassDefinition classDefi return this; } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// object to be registered + /// configured for chaining public virtual SerializationConfig AddDataSerializableFactory(int factoryId, IDataSerializableFactory dataSerializableFactory) { @@ -59,6 +76,12 @@ public virtual SerializationConfig AddDataSerializableFactory(int factoryId, return this; } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// class name of the factory + /// configured for chaining public virtual SerializationConfig AddDataSerializableFactoryClass(int factoryId, string dataSerializableFactoryClass) { @@ -67,6 +90,12 @@ public virtual SerializationConfig AddDataSerializableFactoryClass(int factoryId return this; } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// Type of the factory + /// configured for chaining public virtual SerializationConfig AddDataSerializableFactoryClass(int factoryId, Type dataSerializableFactoryClass) { @@ -76,12 +105,24 @@ public virtual SerializationConfig AddDataSerializableFactoryClass(int factoryId return AddDataSerializableFactoryClass(factoryId, factoryClassName); } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// factory instance to be registered + /// configured for chaining public virtual SerializationConfig AddPortableFactory(int factoryId, IPortableFactory portableFactory) { GetPortableFactories().Add(factoryId, portableFactory); return this; } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// Type of the factory + /// configured for chaining public virtual SerializationConfig AddPortableFactoryClass(int factoryId, Type portableFactoryClass) { var portableFactoryClassName = @@ -89,23 +130,42 @@ public virtual SerializationConfig AddPortableFactoryClass(int factoryId, Type p return AddPortableFactoryClass(factoryId, portableFactoryClassName); } + /// + /// Adds a mapped with a factory id to be registered + /// + /// factory ID of to be registered + /// class name of the factory + /// configured for chaining public virtual SerializationConfig AddPortableFactoryClass(int factoryId, string portableFactoryClass) { GetPortableFactoryClasses().Add(factoryId, portableFactoryClass); return this; } + /// + /// Adds a + /// + /// + /// configured for chaining public virtual SerializationConfig AddSerializerConfig(SerializerConfig serializerConfig) { GetSerializerConfigs().Add(serializerConfig); return this; } + /// + /// Gets the configured + /// + /// public virtual ByteOrder GetByteOrder() { return _byteOrder; } + /// + /// Gets all registered s + /// + /// collection of public virtual ICollection GetClassDefinitions() { if (_classDefinitions == null) @@ -115,6 +175,10 @@ public virtual ICollection GetClassDefinitions() return _classDefinitions; } + /// + /// Gets the dictionary of factoryId to mapping + /// + /// dictionary of public virtual IDictionary GetDataSerializableFactories() { if (_dataSerializableFactories == null) @@ -124,6 +188,10 @@ public virtual IDictionary GetDataSerializableFac return _dataSerializableFactories; } + /// + /// Gets the dictionary of factoryId to class names mapping + /// + /// dictionary of factory ID and corresponding IDataSerializableFactory names public virtual IDictionary GetDataSerializableFactoryClasses() { if (_dataSerializableFactoryClasses == null) @@ -133,11 +201,19 @@ public virtual IDictionary GetDataSerializableFactoryClasses() return _dataSerializableFactoryClasses; } + /// + /// Gets + /// + /// public virtual GlobalSerializerConfig GetGlobalSerializerConfig() { return _globalSerializerConfig; } + /// + /// Gets the dictionary of factoryId to mapping + /// + /// dictionary of public virtual IDictionary GetPortableFactories() { if (_portableFactories == null) @@ -147,6 +223,10 @@ public virtual IDictionary GetPortableFactories() return _portableFactories; } + /// + /// Gets the dictionary of factoryId to class names mapping + /// + /// dictionary of factory ID and corresponding portable factory names public virtual IDictionary GetPortableFactoryClasses() { if (_portableFactoryClasses == null) @@ -156,11 +236,20 @@ public virtual IDictionary GetPortableFactoryClasses() return _portableFactoryClasses; } + /// + /// Gets the configured Portable version that will be used to differentiate two versions of the same class + /// that have changes on the class, like adding/removing a field or changing a type of a field. + /// + /// version of portable classes public virtual int GetPortableVersion() { return _portableVersion; } + /// + /// Gets all s + /// + /// collection of public virtual ICollection GetSerializerConfigs() { if (_serializerConfigs == null) @@ -170,44 +259,84 @@ public virtual ICollection GetSerializerConfigs() return _serializerConfigs; } + /// + /// When enabled, serialization system will check for class definitions error at start + /// and throw an Serialization Exception with error definition or not. + ///
+ /// Default value is true + ///
+ /// true if enables false otherwise public virtual bool IsCheckClassDefErrors() { return _checkClassDefErrors; } + /// + /// Not used + /// + [Obsolete("This configuration is not used in .net client")] public virtual bool IsEnableCompression() { return _enableCompression; } + /// + /// Not used + /// + [Obsolete("This configuration is not used in .net client")] public virtual bool IsEnableSharedObject() { return _enableSharedObject; } + /// + /// + /// + /// true if serialization is configured to use native byte order of the underlying platform public virtual bool IsUseNativeByteOrder() { return _useNativeByteOrder; } + /// + /// Sets the serialization's + /// + /// the that serialization will use + /// configured for chaining public virtual SerializationConfig SetByteOrder(ByteOrder byteOrder) { _byteOrder = byteOrder; return this; } + /// + /// When enabled, serialization system will check for class definitions error at start + /// and throw an Serialization Exception with error definition or not. + /// + /// set to false to disable + /// configured for chaining public virtual SerializationConfig SetCheckClassDefErrors(bool checkClassDefErrors) { _checkClassDefErrors = checkClassDefErrors; return this; } + /// + /// Sets all s + /// + /// collection of s + /// configured for chaining public virtual SerializationConfig SetClassDefinitions(ICollection classDefinitions) { _classDefinitions = classDefinitions; return this; } + /// + /// Sets the dictionary of factory ID and corresponding s + /// + /// dictionary of factory ID and corresponding s + /// configured for chaining public virtual SerializationConfig SetDataSerializableFactories( IDictionary dataSerializableFactories) { @@ -215,6 +344,11 @@ public virtual SerializationConfig SetDataSerializableFactories( return this; } + /// + /// Sets the dictionary of factory ID and corresponding factory class names + /// + /// dictionary of factory ID and corresponding factory class names + /// configured for chaining public virtual SerializationConfig SetDataSerializableFactoryClasses( IDictionary dataSerializableFactoryClasses) { @@ -222,36 +356,67 @@ public virtual SerializationConfig SetDataSerializableFactoryClasses( return this; } + /// + /// Not used + /// + /// configured for chaining + [Obsolete("This configuration is not used in .net client")] public virtual SerializationConfig SetEnableCompression(bool enableCompression) { _enableCompression = enableCompression; return this; } + /// + /// Not used + /// + /// configured for chaining + [Obsolete("This configuration is not used in .net client")] public virtual SerializationConfig SetEnableSharedObject(bool enableSharedObject) { _enableSharedObject = enableSharedObject; return this; } + /// + /// Sets + /// + /// + /// configured for chaining public virtual SerializationConfig SetGlobalSerializerConfig(GlobalSerializerConfig globalSerializerConfig) { _globalSerializerConfig = globalSerializerConfig; return this; } + /// + /// Sets the dictionary of factory ID and corresponding s + /// + /// dictionary of factory ID and corresponding s + /// configured for chaining public virtual SerializationConfig SetPortableFactories(IDictionary portableFactories) { _portableFactories = portableFactories; return this; } + /// + /// Sets the dictionary of factory ID and corresponding factory class names + /// + /// dictionary of factory ID and corresponding factory class names + /// configured for chaining public virtual SerializationConfig SetPortableFactoryClasses(IDictionary portableFactoryClasses) { _portableFactoryClasses = portableFactoryClasses; return this; } + /// + /// Sets the version of portable classes + /// + /// version of portable classes + /// configured for chaining + /// if portableVersion is less than 0 public virtual SerializationConfig SetPortableVersion(int portableVersion) { if (portableVersion < 0) @@ -262,18 +427,29 @@ public virtual SerializationConfig SetPortableVersion(int portableVersion) return this; } + /// + /// Sets all s + /// + /// collection of s + /// configured for chaining public virtual SerializationConfig SetSerializerConfigs(ICollection serializerConfigs) { _serializerConfigs = serializerConfigs; return this; } + /// + /// Sets to use native byte order of the underlying platform + /// + /// set to true to use native byte order of the underlying platform + /// configured for chaining public virtual SerializationConfig SetUseNativeByteOrder(bool useNativeByteOrder) { _useNativeByteOrder = useNativeByteOrder; return this; } + /// public override string ToString() { var sb = new StringBuilder("SerializationConfig{"); diff --git a/Hazelcast.Net/Hazelcast.Config/SerializerConfig.cs b/Hazelcast.Net/Hazelcast.Config/SerializerConfig.cs index e28f51a5b6..5e06f9dfef 100644 --- a/Hazelcast.Net/Hazelcast.Config/SerializerConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/SerializerConfig.cs @@ -18,6 +18,9 @@ namespace Hazelcast.Config { + /// + /// Contains the serialization configuration for a particular class. + /// public class SerializerConfig { private string _className; @@ -82,6 +85,7 @@ public virtual SerializerConfig SetTypeClassName(string typeClassName) return this; } + /// public override string ToString() { var sb = new StringBuilder("SerializerConfig{"); diff --git a/Hazelcast.Net/Hazelcast.Config/SocketInterceptorConfig.cs b/Hazelcast.Net/Hazelcast.Config/SocketInterceptorConfig.cs index fed9d09a2c..82dc8be3e7 100644 --- a/Hazelcast.Net/Hazelcast.Config/SocketInterceptorConfig.cs +++ b/Hazelcast.Net/Hazelcast.Config/SocketInterceptorConfig.cs @@ -19,6 +19,9 @@ namespace Hazelcast.Config { + /// + /// Contains the configuration for interceptor socket. + /// public class SocketInterceptorConfig { private string _className; @@ -142,6 +145,7 @@ public virtual SocketInterceptorConfig SetProperty(string name, string value) return this; } + /// public override string ToString() { var sb = new StringBuilder(); diff --git a/Hazelcast.Net/Hazelcast.Config/SocketOptions.cs b/Hazelcast.Net/Hazelcast.Config/SocketOptions.cs index a39a15cbe1..04f296fd6c 100644 --- a/Hazelcast.Net/Hazelcast.Config/SocketOptions.cs +++ b/Hazelcast.Net/Hazelcast.Config/SocketOptions.cs @@ -12,10 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; using Hazelcast.Client.Connection; namespace Hazelcast.Config { + /// + /// TCP Socket options + /// public class SocketOptions { private int _bufferSize = 32; @@ -38,6 +42,7 @@ public virtual int GetLingerSeconds() return _lingerSeconds; } + [Obsolete("This configuration is not used.")] public virtual ISocketFactory GetSocketFactory() { return _socketFactory; @@ -89,6 +94,7 @@ public virtual SocketOptions SetReuseAddress(bool reuseAddress) return this; } + [Obsolete("This configuration is not used.")] public virtual SocketOptions SetSocketFactory(ISocketFactory socketFactory) { _socketFactory = socketFactory; diff --git a/Hazelcast.Net/Hazelcast.Config/XmlClientConfigBuilder.cs b/Hazelcast.Net/Hazelcast.Config/XmlClientConfigBuilder.cs index c8db8b1fe6..11bbe2451a 100644 --- a/Hazelcast.Net/Hazelcast.Config/XmlClientConfigBuilder.cs +++ b/Hazelcast.Net/Hazelcast.Config/XmlClientConfigBuilder.cs @@ -22,6 +22,9 @@ namespace Hazelcast.Config { + /// + /// Loads the using XML. + /// public class XmlClientConfigBuilder : AbstractXmlConfigHelper { private static readonly ILogger Logger = Logging.Logger.GetLogger(typeof (XmlClientConfigBuilder)); @@ -96,16 +99,30 @@ private XmlClientConfigBuilder(string configFile = null) } } + /// + /// Build a from an XML file + /// + /// hazelcast client XML config file + /// ClientConfig public static ClientConfig Build(string configFile = null) { return new XmlClientConfigBuilder(configFile).Init(); } + /// + /// Build a from an XML file + /// + /// Text reader to provide hazelcast client XML + /// ClientConfig public static ClientConfig Build(TextReader reader) { return new XmlClientConfigBuilder(reader).Init(); } + /// + /// Creates a using the XML content + /// + /// protected ClientConfig Init() { _clientConfig = new ClientConfig(); diff --git a/Hazelcast.Net/Hazelcast.Core/IMap.cs b/Hazelcast.Net/Hazelcast.Core/IMap.cs index a2d8911360..e860029682 100644 --- a/Hazelcast.Net/Hazelcast.Core/IMap.cs +++ b/Hazelcast.Net/Hazelcast.Core/IMap.cs @@ -926,13 +926,13 @@ public interface IMap : IDistributedObject TValue PutIfAbsent(TKey key, TValue value, long ttl, TimeUnit timeunit); /// - /// Same as + /// Same as /// but MapStore, if defined, /// will not be called to store/persist the entry. If ttl is 0, then /// the entry lives forever. /// /// - /// Same as + /// Same as /// but MapStore, if defined, /// will not be called to store/persist the entry. If ttl is 0, then /// the entry lives forever. diff --git a/Hazelcast.Test/Hazelcast.Client.Test/AggregatorAndProjectionTest.cs b/Hazelcast.Test/Hazelcast.Client.Test/AggregatorAndProjectionTest.cs index e8b076cf89..cc164c42c0 100644 --- a/Hazelcast.Test/Hazelcast.Client.Test/AggregatorAndProjectionTest.cs +++ b/Hazelcast.Test/Hazelcast.Client.Test/AggregatorAndProjectionTest.cs @@ -24,6 +24,7 @@ namespace Hazelcast.Client.Test { [TestFixture] + [Category("3.8")] public class AggregatorAndProjectionTest : SingleMemberBaseTest { internal static IMap map; diff --git a/Hazelcast.Test/Hazelcast.Client.Test/ClientMapTest.cs b/Hazelcast.Test/Hazelcast.Client.Test/ClientMapTest.cs index 58d8b8b741..874a1d9d21 100644 --- a/Hazelcast.Test/Hazelcast.Client.Test/ClientMapTest.cs +++ b/Hazelcast.Test/Hazelcast.Client.Test/ClientMapTest.cs @@ -1005,6 +1005,7 @@ public void TestRemoveInterceptor() } [Test] + [Category("3.8")] public void TestRemoveAllWithPredicate() { FillMap(); diff --git a/Hazelcast.Test/Hazelcast.Client.Test/ClientNearCacheTest.cs b/Hazelcast.Test/Hazelcast.Client.Test/ClientNearCacheTest.cs index 4b8d540e35..d246b5d8d8 100644 --- a/Hazelcast.Test/Hazelcast.Client.Test/ClientNearCacheTest.cs +++ b/Hazelcast.Test/Hazelcast.Client.Test/ClientNearCacheTest.cs @@ -247,6 +247,7 @@ public void TestNearCacheInvalidationOnClear() } [Test] + [Category("3.8")] public void TestNearCacheInvalidationOnRemoveAllPredicate() { var map = Client.GetMap("nearCacheMapInvalidate-" + TestSupport.RandomString()); diff --git a/Hazelcast.Test/Hazelcast.Client.Test/PartitionPredicateTest.cs b/Hazelcast.Test/Hazelcast.Client.Test/PartitionPredicateTest.cs index 8b4a6f280d..6e77b44487 100644 --- a/Hazelcast.Test/Hazelcast.Client.Test/PartitionPredicateTest.cs +++ b/Hazelcast.Test/Hazelcast.Client.Test/PartitionPredicateTest.cs @@ -25,6 +25,7 @@ namespace Hazelcast.Client.Test { [TestFixture] + [Category("3.9")] public class PartitionPredicateTest : SingleMemberBaseTest { private const int ItemsPerPartition = 10; diff --git a/Hazelcast.Test/Hazelcast.Test.csproj b/Hazelcast.Test/Hazelcast.Test.csproj index 9b35b891c0..4cf7512892 100644 --- a/Hazelcast.Test/Hazelcast.Test.csproj +++ b/Hazelcast.Test/Hazelcast.Test.csproj @@ -8,7 +8,7 @@ Library Properties 4 - + true @@ -20,7 +20,6 @@ - @@ -46,7 +45,4 @@ Hazelcast.Test - - - \ No newline at end of file diff --git a/docs/hazelcastdoc.shfbproj b/docs/hazelcastdoc.shfbproj index ade5d8f349..ed1e6c563e 100644 --- a/docs/hazelcastdoc.shfbproj +++ b/docs/hazelcastdoc.shfbproj @@ -3,7 +3,7 @@ - Debug + Release AnyCPU 2.0 {9588f8fa-c516-4bb7-abc2-24e02dca5848} @@ -13,15 +13,16 @@ Documentation Documentation - .NET Framework 4.0 + .NET Framework 4.5 output\ HazelcastClientDoc en-US - + + OnlyErrors - HtmlHelp1, Website + Website False True False @@ -35,9 +36,9 @@ Standard Blank False - VS2010 + VS2013 False - Guid + MemberName Hazelcast .Net Client Class Library AboveNamespaces InheritedMembers, InheritedFrameworkMembers @@ -59,6 +60,8 @@ Hazelcast-Client + 1.0.0.0 + 100