I'd go for the latter.
We shouldn't assume that the caller is looking for the parent's
region and return that, since there are very valid use cases for
subregions.
Re: merging the different types of regions, this is what we discussed
some weeks back, this is precisely the intention.
Cheers,
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani
On 5 Oct 2006, at 07:32, Ben Wang wrote:
Regarding Cache.getRegion(fqn) API, I also need to have an API that
do like Cache.findRegion(fqn) that returns null if absent. So I am
thinking either:
1. Create a new api, findRegion(fqn), or
2. modify the getRegion(fqn) to getRegion(fqn, createIfAbsent)
What one do you prefer?
-----Original Message-----
From: jbosscache-dev-bounces(a)lists.jboss.org [mailto:jbosscache-dev-
bounces(a)lists.jboss.org] On Behalf Of Ben Wang
Sent: Thursday, October 05, 2006 12:15 PM
To: Brian Stansberry; jbosscache-dev(a)lists.jboss.org
Subject: RE: [jbosscache-dev] RegionManager
Currently it will create another new region under the children fqn.
-----Original Message-----
From: Brian Stansberry
Sent: Thursday, October 05, 2006 11:33 AM
To: Ben Wang; jbosscache-dev(a)lists.jboss.org
Subject: RE: [jbosscache-dev] RegionManager
Sounds very logical. What does it do now?
jbosscache-dev-bounces(a)lists.jboss.org wrote:
> Looks like Cache.getRegion(Fqn fqn) is the one that is most
> convenient
> to use (since activate region should not be in the responsibility of
> CacheSPI). But I am thinking to refine the contract of getRegion(Fqn
> fqn) such that if I have previously defined a parent region, say,
> "/person". Then doing a call
> getRegion("/person/joe") should still return the parent region
> associated with "/person". I think this is the logical. What do
> people
> think?
>
> Thanks,
>
> -Ben
>
> -----Original Message-----
> From: jbosscache-dev-bounces(a)lists.jboss.org
> [mailto:jbosscache-dev-bounces@lists.jboss.org] On Behalf Of Ben Wang
> Sent: Thursday, October 05, 2006 12:49 AM
> To: jbosscache-dev(a)lists.jboss.org
> Subject: [jbosscache-dev] RegionManager
>
> Manik,
>
> Currently, we have Cache.getRegion and also
> CacheSPI.getEvictionRegionManager and CacheSPI.getRegionManager APIs.
> It seems that these two are a bit redundant in that one can also
> create a region from CacheSPI call. So what is the intention here?
>
> Thanks,
>
> -Ben
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/jbosscache-dev
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
Ph: 510-396-3864
skype: bstansberry
_______________________________________________
jbosscache-dev mailing list
jbosscache-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosscache-dev
_______________________________________________
jbosscache-dev mailing list
jbosscache-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosscache-dev