[jboss-dev-forums] [Design of JBossCache] - Re: Gravitation and POJO Cache
jason.greene@jboss.com
do-not-reply at jboss.com
Fri Jun 22 01:19:50 EDT 2007
"bstansberry at jboss.com" wrote : Is it possible to check if the forceDataGravitation option is set when the initial call to the PojoCache API is made, and then preserve that value through all the internal cache calls needed to construct the pojo?
|
Yes although since references are resolved lazily (and per traversal since they could change), I would have to tag the object to always use the flag. I would limit the calls to just get calls on an internal node, but there would still be one such call per pojo operation.
I could also build an API that would allow you to control the the lifespan of the gravitation force.
anonymous wrote :
| I guess that's what you meant by adding an option API. :)
Yes, and alternatively there could be some kind of block form, to allow you to specify how long to do this for:
| PojoCacheSession session = pojoCache.startSession();
| session.setForceGravitation(true);
| pojo.getBlah().getFoo();
| session.stop();
| pojo.setSimple();
|
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056728#4056728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056728
More information about the jboss-dev-forums
mailing list