Reputation: 640
I have a JAR that embedded within a webservice that has local Gemfire Caching. The problem that I am trying to solve is expiration of this data.
I have created a custom expiration timer that will set each entries expiration in seconds and have tied a listener to check for afterInvalidate(EntryEvent e).
Here is my region declaration in spring
<bean id="rse-region" class="org.springframework.data.gemfire.RegionFactoryBean"
p:name="rse-region" p:cache-ref="gemfire-cache-embedded">
<property name="cacheListeners">
<array>
<bean class="CustomListener"/>
</array>
</property>
<property name="attributes">
<bean class="org.springframework.data.gemfire.RegionAttributesFactoryBean"
p:enableGateway="false"
p:statisticsEnabled="true"
p:dataPolicy="NORMAL"
p:customEntryTimeToLive-ref="customExpiration">
</bean>
</property>
</bean>
What I am trying to do is a bit different than how I have setup. What I am trying to do is once the initial entry is put into the region I want a Time to Live on that region. Is it possible to do Time to Live on a local gemfire region?
Upvotes: 1
Views: 553