簡體   English   中英

Infinispan Server-目錄提供者

[英]Infinispan Server - directory provider

我打算將我的獨立緩存“升級”到集群緩存。 直到現在,我仍然可以按照以下方式將Properties添加到ConfigurationBuilder中。

Properties properties = new Properties();
properties.put( "default.indexwriter.max_merge_docs", "10000" );
properties.put( "default.indexwriter.ram_buffer_size", "500" );
properties.put( "default.directory_provider", "ram" );
properties.put( "default.indexmanager", "near-real-time" );

Configuration configuration = new ConfigurationBuilder().withProperties( properties ).connectionPool().addServer().host( "localhost" ).port( 11322 ).addServer().host( "localhost" ).port( 11422 ).build();

但是,當我嘗試為RemoteCacheManager創建配置時,這些屬性將不適用,並且我的所有記錄都將寫入磁盤。

我的問題是我可以在哪里添加這些屬性。 我瀏覽了我的服務器配置文件,但是找不到放置這些信息的正確位置。

謝謝您的幫助。

RemoteCacheManager屬性僅用於配置客戶端行為。 如果運行服務器,則需要在standalone/configuration/standalone.xml文件中添加這些屬性。 更確切地說,查找默認的cache-container條目,然后獲取您要與之交互的高速緩存名稱(即默認),然后按照docs/schema/jboss-infinispan-core_X_0.xsd中的服務器分發中的XSD在元素內添加屬性。 docs/schema/jboss-infinispan-core_X_0.xsd文件。 有關如何使用Infinispan服務器的更多信息,請參閱服務器指南

順便說一句,RemoteCacheManager僅用於遠程使用緩存。 如果要使用群集緩存,仍然可以使用之前使用的相同嵌入式DefaultCacheManager。 您只需要使用集群配置啟動多個JVM,它們就可以相互找到。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM