You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rizal123 <kh...@btpn.com> on 2018/01/05 04:09:01 UTC
XML Format for Expiry Policies
Hi all,
Would you mind to create xml format for this java syntax.
https://apacheignite.readme.io/v2.3/docs/expiry-policies
cfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(Duration.ONE_MINUTE));
thanks for your help.
regards.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: XML Format for Expiry Policies
Posted by rizal123 <kh...@btpn.com>.
Hi Slava,
Thanks for your reply.
It`s very helpful for me.
Thanks.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: XML Format for Expiry Policies
Posted by "slava.koptilin" <sl...@gmail.com>.
Hello,
Yes, it is already supported. Please try the following configuration:
<bean id="expiryPolicy"
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
<constructor-arg>
<bean class="javax.cache.expiry.CreatedExpiryPolicy">
<constructor-arg>
<bean class="javax.cache.expiry.Duration">
<constructor-arg
type="java.util.concurrent.TimeUnit" value="MINUTES"/>
<constructor-arg value="1"/>
</bean>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
<bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<list>
<bean
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="default"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="expiryPolicyFactory">
<bean parent="expiryPolicy"/>
</property>
</bean>
</list>
</property>
....
</bean>
Thanks!
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/