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);
It could be a timing issue between the moment you change the config and the eviction thread trying to process it. Does this clear up after a few eviction cycles?