[concurrency-interest] Implementing Cache
Tutika Chakravarthy
chakritsus at yahoo.com
Fri May 12 05:50:34 EDT 2006
> Note that the FutureTask "trick" is useful when
computing a new value
> for the cache can take a long time. If the
computation time is not an
> issue, however, then you can cache the raw values
directly rather than
> using a FutureTask (which can be thought of as a
promise to produce a
> value)
Sorry for my previous post
Thanks for quick reply. Actually our cache requires
this feature. if someone calls get() , if data is not
present in the Cache , we should load it from DataBase
.
So we are planning to use FeatureTask for achiveing
this .
Since we used FeatureTask in get() method , we will
use FutureTask in put method also , even though there
is no "task" involved in it .
Thanks again for your suggestion.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Concurrency-interest
mailing list