We're talking about 2 get() methods in CacheLoader:
#1  Object get(Fqn name, Object key) throws Exception;
#2 Map get(Fqn name) throws Exception;

You're only referring to the 2nd case. 

#1
If you return null, this could mean:
- key not associated with a value or
- node doesn't exist

#2
(same as above)

I think the cleanest way is to add an exception to the get() methods, e.g. 
NodeNotExistsException. I'm thinking about whether it would make sense to make 
this a runtime exception, so we don't have to change the signature, but then 
again, we should make this clear on the API level.
Of course this would break existing CacheLoader implementations, so we'd have 
to communicate this clearly.
Thoughts ?

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to