第3章 Hot Rod C++ クライアントの設定
Hot Rod C++ クライアントは、RemoteCache API 経由でリモート Data Grid クラスターと対話します。
3.1. 設定およびリモートキャッシュマネージャー API リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
ConfigurationBuilder API を使用して、Hot Rod C++ クライアント接続と RemoteCacheManager API を設定してリモートキャッシュを取得および設定します。
設定ビルダー
クロスサイトレプリケーション
ConfigurationBuilder builder;
builder.addServer().host("127.0.0.1").port(11222);
// Configure a remote cluster and node when using cross-site replication.
builder.addCluster("NYC").addClusterNode("192.0.2.0", 11322);
ConfigurationBuilder builder;
builder.addServer().host("127.0.0.1").port(11222);
// Configure a remote cluster and node when using cross-site replication.
builder.addCluster("NYC").addClusterNode("192.0.2.0", 11322);
ニアキャッシュ
ConfigurationBuilder builder;
builder.addServer().host("127.0.0.1").port(11222);
// Enable near-caching for the client.
builder.nearCache().mode(NearCacheMode::INVALIDATED).maxEntries(4);
ConfigurationBuilder builder;
builder.addServer().host("127.0.0.1").port(11222);
// Enable near-caching for the client.
builder.nearCache().mode(NearCacheMode::INVALIDATED).maxEntries(4);