This content has been marked as final.
Show 6 replies
-
1. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
genman Apr 4, 2006 9:38 PM (in response to genman)
Okay, this may be a doc issue instead, since the docs say:
* Adds a new node to the tree and sets its data. If the node doesn not yet exist, it will be created.
* Also, parent nodes will be created if not existent. If the node already has data, then the new data
* will override the old one. If the node already existed, a nodeModified() notification will be generated.
* Otherwise a nodeCreated() motification will be emitted.
*/
public void put(Fqn fqn, Map data) throws CacheException
But in fact the call is:GlobalTransaction tx = getCurrentTransaction(); MethodCall m = new MethodCall(putDataMethodLocal, new Object[]{tx, fqn, data, Boolean.TRUE}); invokeMethod(m);
What's the correct behavior here?
Still, I wonder how comeputDataEraseMethodLocal
isn't being used like I would expect. -
2. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
manik Apr 5, 2006 6:35 AM (in response to genman)Hmm, interesting - I would have expected it to call
... = new MethodCall(putDataMethodLocal, new Object[]{tx, fqn, data, Boolean.TRUE, Boolean.TRUE});
Let me dig around and see why this is happening -
3. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
manik Apr 5, 2006 8:32 AM (in response to genman)Again, it looks like this is how it has always been. I'd rather it changed as per my prevous posting and be true to the contract as per javadocs.
-
4. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
genman Apr 5, 2006 12:19 PM (in response to genman)
To me, I would probably change the docs to match the behavior, since it's less likely to screw people over. And then, it's consistent with the CacheLoader.putAll() behavior. Then, create a putErase() or something method (!) for those that want the replacing behavior. Sounds like a bug report at least, let me know what you want. Thanks. -
5. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
genman Apr 5, 2006 1:11 PM (in response to genman)It may also be the wording:
If the node already has data, then the new data will override the old one.
could mean, "If the node already has data, then the new keys and values will overwrite the existing keys and values." Notice it does say override not "overwrite". -
6. Re: CacheStoreInterceptor -- how is putDataEraseMethodLocal
manik Apr 5, 2006 3:02 PM (in response to genman)Ben, Bela, what are your opinions on the semantics of this?