You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Andy Jefferson <an...@datanucleus.org> on 2016/12/08 15:08:58 UTC

javax.jdo.datastore.DataStoreCache - what to expect if a method is not supported

In DataStoreCache there are methods to pin and unpin objects in the cache. 
When using this as an interface to the standard "javax.cache", there is no feature to "pin" objects as such, and so DataNucleus does not implement these methods. They simply throw UnsupportedOperationException. 

The question is, what should be the expected result? No-op? Exception, meaning that it has to be handled in user code?

No-op may be cleanest (particularly if the user is swapping between L2 cache types to evaluate the best to use), but the javadoc doesn't define it, so ought to be clarified in the spec/javadocs.



Regards
-- 
Andy
DataNucleus (Web: http://www.datanucleus.org   Twitter: @datanucleus)