[jboss-dev-forums] [Design of JBossCache] - Re: Thoughts on 2.0 API

ben.wang@jboss.com do-not-reply at jboss.com
Sun Oct 1 13:14:00 EDT 2006


"genman" wrote : Probably the boat has already left the dock, but here are some thoughts...

Certainly there is room for discussion and make some changes, if ncessary. That's what a devleoper release is for anyway. :-)

anonymous wrote : There's org.jboss.cache.factories and org.jboss.cache.pojo.factory, in addition to being inconsistent, I sort of don't like the "ies" look.  I also don't like "factory" as a package in general, because I don't think it has enough weight (number of classes and scope of use) to warrant separation. Its use is integral to how a user builds a cache, so it should be immediately obvious where to get it.

Agreed.  Actually, I don't use org.jboss.cache.pojo.factory package now. Use it will trigger a RuntimeException. The factory class is located directly under org.jobss.cache.pojo.

anonymous wrote : I also doubt that having the Factory be an interface is better than an abstract base class.  A simple "abstract Cache createCache(...)" that users can replace and a "static Cache createDefaultCache" would be far more useful.

I don't quite agree that the current way of creating a default cache is that bad though. If you don't pass in the start flag then the default is to start the cache life cycle. Isn't this what you are asking for?

anonymous wrote : Why does Region not have a "CacheListener"? There are 6 methods in CacheSPI for a listener, but none in Region.

Sure this would be nice. Manik can say more definitely. But we do have a plan to elevate the Region into first class construct.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975356#3975356

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975356



More information about the jboss-dev-forums mailing list