[jboss-dev-forums] [Design of JBossCache] - Re: Requirement for _default_ eviction region
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Mar 12 13:32:19 EDT 2008
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136054#4136054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136054
More information about the jboss-dev-forums
mailing list