简体   繁体   中英

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. I understand how to specify my new custom cache class in the 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>

Is there a way to specify/supply some properties to the instance of 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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