On 30 Nov 2009, at 07:10, Sanne Grinovero wrote:
For a Lucene Directory optimization;
Instead of fetching needed data just-in-time I was planning to do some
prefetching: it's easy to predict just before some not-so-trivial
methods which data I'm going to need next - like when scrolling on a
huge byte array we have scattered into several keys - so I was
planning to use a getAsync() method as soon as we feel it's likely to
need that value too soon.
Like putAsync() does exist I was naturally expecting getAsync() to
exist too, but it appears the get methods are missing from the async
APIs?
I wouldn't have thought a getAsync() would be useful - given that with a get, you
would want to block on getting your result anyway as it performs no other useful function
other than retrieving data (unlike put, remove, etc).
What would you think of adding them?
In alternative I could make use of a streaming API, but this would
likely be implemented in a similar shape?
The streaming API is probably further away. Implementing a getAsync() ought to be
trivial. Care to create a JIRA?
Cheers
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org