DESCRIPTION

Add Iterator versions of getAsyncBulk and getBulk

Add the following methods to Memcached/MemcachedIF:
- <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keys,
      Iterator<Transcoder<T>> tcs);
- <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keys,
      Transcoder<T> tc);
- BulkFuture<Map<String, Object>> asyncGetBulk(Iterator<String> keys);
- <T> Map<String, T> getBulk(Iterator<String> keys, Transcoder<T> tc);
- Map<String, Object> getBulk(Iterator<String> keys);

Some times it is more convenient/memory efficent to pass in an
Iterator of keys than it is to have a Collection of them.

Example:

public PrefixAdderIterator implements Iterator<String> {

  private final String prefix;
  private final Iterator<String> iterator;
  public PrefixAdderIterator(String prefix,
         Iterator<String> iterator) {
    this.prefix = prefix;
    this.iterator = iterator;
  }
  ...
  public String next() {
    return prefix+iterator.next();
  }
 ...
}

rather than

 List<String> prefixedKeys = new ArrayList<String>();
 for (String key: keys) {
  prefixedKeys.add(prefix+key);
 }

Change-Id: I15821983ea2ebd07fd98feeb968ce9fa578ded0b


COMMENTS

author: Dakota Woodward
date: 2012-01-11 19:27:24.932000000

Uploaded patch set 3.

-------------------------------------
author: Andreas Short
date: 2012-01-12 00:59:07.089000000

Patch Set 3:

Looks like a nice change Ted, thanks for submitting it!  We'll get it reviewed here shortly.

In the future, when you put a commit up for review, you may want to pick out a couple of people on the project and put them down for review.

-------------------------------------
author: Dakota Woodward
date: 2012-01-12 01:16:30.882000000

Patch Set 3:

Sorry about that.. I forgot to log in so I could see a way to edit the bug :| I really know how to use computers I swear :)

Also sorry about the three patch sets. I was having trouble publishing and Dustin had me publish a couple of times to test things out.

I have tested this patch out in our production environment here and it is working fine.

-------------------------------------
author: Dakota Woodward
date: 2012-01-19 17:58:17.399000000

Patch Set 3: Looks good to me, but someone else must approve



-------------------------------------
author: Andreas Short
date: 2012-01-22 17:12:13.373000000

Patch Set 3: Verified; Looks good to me, approved



-------------------------------------
author: Andreas Short
date: 2012-01-22 17:12:13.758000000

Change has been successfully cherry-picked as 01fe32e1a3a86be181b347cfdcdb80d47f2e3588.

-------------------------------------
