此内容没有您所选择的语言版本。
Chapter 1. Installing and configuring the Hot Rod .NET/C# client
Install the Hot Rod .NET/C# client on Microsoft Windows systems where you use .NET Framework to interact with Data Grid clusters via the RemoteCache API.
1.1. Installing Hot Rod .NET/C# clients 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Data Grid provides an installation package to install the Hot Rod .NET/C# client on Windows.
Prerequisites
- Any operating system on which Microsoft supports the .NET Framework
- .NET Framework 4.6.2 or later
- Windows Visual Studio 2015 or later
Procedure
-
Download
redhat-datagrid-<version>-hotrod-dotnet-client.msifrom the Data Grid Software Downloads. - Launch the MSI installer for the Hot Rod .NET/C# client and follow the interactive wizard through the installation process.
1.2. Configuration and Remote Cache Manager APIs 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Use the ConfigurationBuilder API to configure Hot Rod .NET/C# client connections and the RemoteCacheManager API to obtain and configure remote caches.
Basic configuration
Authentication
Encryption
Cross-site failover
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddServer().Host("127.0.0.1").Port(11222);
// Configure a remote cluster and node when using cross-site failover.
builder.AddCluster("nyc").AddClusterNode("192.0.2.0", 11322);
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddServer().Host("127.0.0.1").Port(11222);
// Configure a remote cluster and node when using cross-site failover.
builder.AddCluster("nyc").AddClusterNode("192.0.2.0", 11322);
Near caching
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddServer().Host("127.0.0.1").Port(11222);
// Enable near-caching for the client.
builder.NearCache().Mode(NearCacheMode.INVALIDATED).MaxEntries(10);
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.AddServer().Host("127.0.0.1").Port(11222);
// Enable near-caching for the client.
builder.NearCache().Mode(NearCacheMode.INVALIDATED).MaxEntries(10);