com.basho.riak.pbc
Class MapReduceResponseSource
java.lang.Object
com.basho.riak.pbc.MapReduceResponseSource
- All Implemented Interfaces:
- Iterable<MapReduceResponse>
public class MapReduceResponseSource
- extends Object
Wraps a stream of m/r responses as an iterator.
Field Summary |
protected com.basho.riak.pbc.RiakConnection |
conn
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conn
protected com.basho.riak.pbc.RiakConnection conn
MapReduceResponseSource
protected MapReduceResponseSource(RiakClient client,
com.basho.riak.pbc.RiakConnection conn,
com.google.protobuf.ByteString contentType)
throws IOException
- Throws:
IOException
hasNext
public boolean hasNext()
throws IOException
- Throws:
IOException
next
public MapReduceResponse next()
throws IOException
- Throws:
IOException
readAllResults
public static JSONArray readAllResults(MapReduceResponseSource response)
throws IOException
- Buffer the full set of results into a JSONArray
- Parameters:
response
- the MapReduceResponseSource
- Returns:
- a
JSONArray
with all phases and all results.
- Throws:
IOException
close
public void close()
isClosed
public boolean isClosed()
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
Copyright © 2012. All Rights Reserved.