[jbosscache-dev] JBoss Cache 2.0.0.ALPHA status

Brian Stansberry brian.stansberry at jboss.com
Tue Sep 12 13:37:33 EDT 2006


If I understand the thread right, the question is about providing a
default impl of put(Fqn, Map, boolean) instead of just an abstract
method.  That sounds fine.

But for the delegating cache loaders, load/store will still have their
own implementation that doesn't call put(Fqn, Map, boolean), but instead
uses the prepare(GTX, List<Modification>) idea Bela had, yes?

jbosscache-dev-bounces at lists.jboss.org wrote:
> Yeah exactly. I just sent a private email to Brian to check my sanity.
> 
> Remember how we wanted to have abstract method in AbstractCacheLoader:
> 
> public abstract void put(Fqn fqn, Map attributes, boolean
> erase) throws Exception;
> 
> so we can move up load/store in AbstractCacheLoader. Well I
> just saw that DelegatingCacheLoader has a really good idea
> how to implement this method as a default:
> 
> public void put(Fqn fqn, Map attributes, boolean erase)
> throws Exception {
>       if(erase)
>          removeData(fqn);
>       put(fqn, attributes);
> }
> 
> So why can't we have this implementation of put in
> AbstractCacheLoader as a default and if cacheloader
> implementation has a more efficient way to implement it - so be it.
> 
> I have actually done this change (moved up both load/store to
> AbstractCacheLoader) and now I am making sure that all tests
> are passing. Bdbje compatibility test is passing now:). Lets
> see that all other o.j.c.loader test are passing as well.
> 
> What do you think? Any flaws with this approach?
> 
> 
> 
> 
>> -----Original Message-----
>> From: Manik Surtani [mailto:manik at jboss.org]
>> Sent: Tuesday, September 12, 2006 1:15 PM
>> To: Vladimir Blagojevic
>> Cc: jbosscache-dev at lists.jboss.org
>> Subject: Re: [jbosscache-dev] JBoss Cache 2.0.0.ALPHA status
>> 
>> Well this is just it - I don't think we *need* to do this for the
>> BdbjeCacheLoader if you're going to implement load/store state as a
>> series of get/put calls. --
>> Manik Surtani
>> 
>> Lead, JBoss Cache
>> JBoss, a division of Red Hat
>> 
>> Email: manik at jboss.org
>> Telephone: +44 7786 702 706
>> MSN: manik at surtani.org
>> Yahoo/AIM/Skype: maniksurtani
> 
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev at 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




More information about the jbosscache-dev mailing list