31.6. パーティション処理の設定
Red Hat JBoss Data Grid では、パーティション処理はデフォルトで無効になります。
宣言による設定 (ライブラリーモード)
パーティション処理を以下のように宣言します。
<namedCache name="myCache">
<clustering mode="distribution">
<partitionHandling enabled="true" />
</clustering>
</namedCache>プログラムを用いた設定 (ライブラリモード)
パーティション処理を以下のようにプログラムで有効にします。
ConfigurationBuilder dcc = new ConfigurationBuilder(); dcc.clustering().partitionHandling().enabled(true);
宣言による設定 (リモートクライアントサーバーモード)
以下の設定を使用して、パーティション処理をリモートクライアントサーバーモードで宣言的に有効にします。
<subsystem xmlns="urn:infinispan:server:core:6.2" default-cache-container="clustered">
<cache-container name="clustered" default-cache="default" statistics="true">
<distributed-cache name="default" mode="SYNC" segments="20" owners="2"
remote-timeout="30000" start="EAGER">
<partition-handling enabled="true" />
<locking isolation="READ_COMMITTED" acquire-timeout="30000"
concurrency-level="1000" striping="false"/>
<transaction mode="NONE"/>
</distributed-cache>
</cache-container>
</subsystem>