ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "slava.koptilin" <slava.kopti...@gmail.com>
Subject Re: XML Format for Expiry Policies
Date Fri, 05 Jan 2018 10:13:04 GMT
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/

Mime
View raw message