This content has been marked as final.
Show 3 replies
-
1. Re: Requirement for _default_ eviction region
brian.stansberry Mar 12, 2008 1:32 PM (in response to brian.stansberry)Looking at the usage of this method, only code that passes in Region.Type.EVICTION is EvictionInterceptor.canIgnoreEvent(). And that can handle a null return just fine. So, seems we could safely replace the above with:
// test if the default region has been defined. If not, and if the request // is for an eviction region, return null if ((nextBestThing != null && nextBestThing.getFqn().isRoot() && !regionsRegistry.containsKey(Fqn.ROOT)) && type == EVICTION) { log.trace("No default eviction region; returning null"); nextBestThing = null; }
Haven't looked carefully to see if the method contract implies it won't return null. -
2. Re: Requirement for _default_ eviction region
brian.stansberry Mar 12, 2008 1:34 PM (in response to brian.stansberry)And, change the if test order so "type == EVICTION" comes first. :-)
-
3. Re: Requirement for _default_ eviction region
manik Mar 12, 2008 3:36 PM (in response to brian.stansberry)Hmm, good point. And this plays much better into what we expect with default behaviour.