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@jboss.org]
Sent: Tuesday, September 12, 2006 1:15 PM
To: Vladimir Blagojevic
Cc: jbosscache-dev(a)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(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani