time-to-live-seconds in hazelcast.xml file, did not work for me?

905 views
Skip to first unread message

leem...@gmail.com

unread,
Oct 21, 2013, 10:11:26 AM10/21/13
to haze...@googlegroups.com
Hi,

Anybody can tell why this <time-to-live-seconds> in hazelcast.xml file did not work for me?

1. I have a java program to create the hazelcast cluster with the hazelcast.xml as in below:
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-2.5.xsd"
           xmlns="http://www.hazelcast.com/schema/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <group>
        <name>wifi-offload-cluster</name>
        <password>wifi-offload-clusterGrA9viTy178X</password>
    </group>
    <management-center enabled="false">http://localhost:8080/mancenter</management-center>
        <network>
                <port auto-increment="true">5701</port>
                <join>
                        <multicast enabled="false">
                                <multicast-group>224.2.2.3</multicast-group>
                                <multicast-port>54327</multicast-port>
                        </multicast>
                        <tcp-ip enabled="true">
                                <interface>127.0.0.1:5701</interface>
                        </tcp-ip>
                </join>
                <interfaces enabled="false">
                        <interface>10.115.208.*</interface>
                </interfaces>
        </network>
    <properties>
        <property name="hazelcast.icmp.enabled">true</property>
    </properties>
        <executor-service>
                <core-pool-size>16</core-pool-size>
                <max-pool-size>64</max-pool-size>
                <keep-alive-seconds>60</keep-alive-seconds>
        </executor-service>

    <map name="wifi-offload-cache">
        <backup-count>1</backup-count>
        <time-to-live-seconds>120</time-to-live-seconds>
        <max-idle-seconds>60</max-idle-seconds>
        <eviction-policy>LRU</eviction-policy>
        <max-size policy="cluster_wide_map_size">5000</max-size>
        <eviction-percentage>25</eviction-percentage>
        <eviction-delay-seconds>3</eviction-delay-seconds>
    </map>
</hazelcast>

2. and another java program to inject data entries into the MultiMap in the hazelcast cluster above, but they did not get removed after 120 seconds, as defined in hazelcast.xml file

thanks,

Mehmet Dogan

unread,
Oct 21, 2013, 10:14:23 AM10/21/13
to haze...@googlegroups.com
That configuration belongs to the IMap not MultiMap. MultiMaps don't support TTL, eviction at the moment,

@mmdogan



--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast.
For more options, visit https://groups.google.com/groups/opt_out.

leem...@gmail.com

unread,
Oct 21, 2013, 10:29:46 AM10/21/13
to haze...@googlegroups.com, leem...@gmail.com
thanks for the info... is this documented by hazelcast?
Since I did not find what configurations are supported by MultiMap specifically, and have assumed the MultiMap is a Map and would support all the Map's configurations.

leem...@gmail.com

unread,
Oct 21, 2013, 10:36:16 AM10/21/13
to haze...@googlegroups.com, leem...@gmail.com
In the end, I want to control the live-cycle of records in the multiMap and how can I do that? Have to develop my own code?
thanks.


Reply all
Reply to author
Forward
0 new messages