【问题标题】:apache ignite configure a custom cache storeapache ignite 配置自定义缓存存储
【发布时间】:2021-03-01 23:29:38
【问题描述】:

我正在创建自己的自定义 ignite org.apache.ignite.cache.store.CacheStore 实现以将缓存持久保存到 MongoDB。我了解如何在 ignite XML 中指定我的新自定义缓存类:

<property name="cacheConfiguration">
    <list>
        <bean class="org.apache.ignite.configuration.CacheConfiguration">
                ... 
                <property name="cacheStoreFactory">
                    <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
                        <constructor-arg value="com.glib.ws.ignite.MyCustomMongoCacheStore"/>
                    </bean>
                </property>
                ... 
        </bean>
    </list>
</property>

有没有办法为com.glib.ws.ignite.MyCustomMongoCacheStore 的实例指定/提供一些属性?

【问题讨论】:

    标签: java configuration ignite


    【解决方案1】:

    您可以拥有自己的com.glib.ws.ignite.MyCustomMongoCacheStoreFactoryimplements Factory, Serializable,它将接受所有这些属性,并使用这些属性构造您的实际MyCustomMongoCacheStore

    【讨论】:

      猜你喜欢
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-19
      • 2021-06-22
      • 1970-01-01
      • 2018-07-04
      • 2021-08-12
      相关资源
      最近更新 更多