Hello
I am trying to set an eviction policy to a Region that already has one. My problem comes up when the eviction policy's type that I want to configure differs from the old one, throwing a ClassCastException. In my case, the new eviction policy is FIFO and the old one is LRU.
What I am doing...
RegionManager regionMgr = cache.getEvictionRegionManager();
Region region = regionMgr.getRegion(strRegion);
region.setEvictionConfiguration(config);
The exception I got:
16:16:20,557 ERROR [STDERR] Exception in thread "Timer-14"
16:16:20,557 ERROR [STDERR] java.lang.ClassCastException: org.jboss.cache.eviction.FIFOConfiguration
16:16:20,557 ERROR [STDERR] at org.jboss.cache.eviction.LRUAlgorithm.shouldEvictNode(LRUAlgorithm.java:38)
16:16:20,557 ERROR [STDERR] at org.jboss.cache.eviction.LRUAlgorithm.prune(LRUAlgorithm.java:117)
16:16:20,557 ERROR [STDERR] at org.jboss.cache.eviction.BaseEvictionAlgorithm.process(BaseEvictionAlgorithm.java:98)
16:16:20,557 ERROR [STDERR] at org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:80)
16:16:20,557 ERROR [STDERR] at java.util.TimerThread.mainLoop(Timer.java:512)
16:16:20,557 ERROR [STDERR] at java.util.TimerThread.run(Timer.java:462)
I hope someone could help me, I dont know if I miss something.
Thank you guys