You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kuznetsov <ak...@gridgain.com> on 2015/07/15 15:46:05 UTC
Create cache and near cache from XML configuration on client node.
Igniters,
If I use this configuration:
<property name="clientMode" value="true" />
....
<property name="cacheConfiguration">
<list>
<bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="my_cache"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="nearConfiguration">
<bean
class="org.apache.ignite.configuration.NearCacheConfiguration"/>
</property>
</bean>
</list>
</property>
This will create cache on data nodes WITH near cache and create (I hope) a
near cache on client node.
But according to documentation near cache usually NOT NEEDED on data nodes.
It seems that we need some flag like "clientNearCacheOnly" that will
prevent creating near cache on data nodes.
Thought?
P.S. I know that I could do what I need from code. But I think that such
functionality also should be available via XML.
--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Re: Create cache and near cache from XML configuration on client node.
Posted by Alexey Kuznetsov <ak...@gridgain.com>.
After reading documentation and source code I come to conclusion
that proper way to create near cache on client node is to use:
Ignition.loadSpringBean(...) API to create near cache from XML beans.
So, I will add such beans generation in Ignite Web Control Center
(IGNITE-843).
On Wed, Jul 15, 2015 at 8:46 PM, Alexey Kuznetsov <ak...@gridgain.com>
wrote:
> Igniters,
>
> If I use this configuration:
> <property name="clientMode" value="true" />
> ....
> <property name="cacheConfiguration">
> <list>
> <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="my_cache"/>
> <property name="cacheMode" value="PARTITIONED"/>
> <property name="nearConfiguration">
> <bean
> class="org.apache.ignite.configuration.NearCacheConfiguration"/>
> </property>
> </bean>
> </list>
> </property>
>
> This will create cache on data nodes WITH near cache and create (I hope) a
> near cache on client node.
>
> But according to documentation near cache usually NOT NEEDED on data nodes.
>
> It seems that we need some flag like "clientNearCacheOnly" that will
> prevent creating near cache on data nodes.
>
> Thought?
>
> P.S. I know that I could do what I need from code. But I think that such
> functionality also should be available via XML.
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>
--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com