简体   繁体   English

apache ignite 配置自定义缓存存储

[英]apache ignite configure a custom cache store

I am creating my own custom ignite org.apache.ignite.cache.store.CacheStore implementation to persist a cache to MongoDB.我正在创建自己的自定义 ignite org.apache.ignite.cache.store.CacheStore实现以将缓存持久化到 MongoDB。 I understand how to specify my new custom cache class in the ignite XML:我了解如何在 ignite XML 中指定我的新自定义缓存 class:

<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>

Is there a way to specify/supply some properties to the instance of com.glib.ws.ignite.MyCustomMongoCacheStore ?有没有办法为com.glib.ws.ignite.MyCustomMongoCacheStore的实例指定/提供一些属性?

You can have your own com.glib.ws.ignite.MyCustomMongoCacheStoreFactory implements Factory, Serializable , which will accept all of these properties, construct your actual MyCustomMongoCacheStore with these properties.您可以拥有自己的com.glib.ws.ignite.MyCustomMongoCacheStoreFactory implements Factory, Serializable ,它将接受所有这些属性,使用这些属性构造您的实际MyCustomMongoCacheStore

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM