我的野生蝇配置为用于冬眠的缓存,如下所示:
<subsystem xmlns="urn:jboss:domain:infinispan:3.0">
<cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan">
<local-cache name="local-query">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" size="10000"/>
<expiration max-idle="28800000"/>
</local-cache>
<local-cache name="entity">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" size="10000"/>
<expiration max-idle="28800000"/>
</local-cache>
<local-cache name="timestamps">
<transaction mode="NON_XA"/>
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
</subsystem>
我想露出热门端点,并以与我如何使用Infinispan Server进行此操作的方式来收听缓存事件。我之所以这样做,是因为我正在手动和选择性地复制基础数据库,我也想手动使另一端的冬眠缓存无效。
我该怎么做?
您可以将Hotrod Server嵌入野外部署。您需要从JNDI获取Wildfly Cache Manager,然后使用它启动Hotrodserver。我有一个小项目[1],演示了如何设置这样的设置。
[1] https://github.com/tristantartant/infinispan-playground-embedded-hotrod