public class KeySource extends Object implements StreamingOperation<String>
| Constructor and Description |
|---|
KeySource(BucketResponse bucketResponse)
Create a Key Source from an http.
BucketResponse in response to
RiakClient.streamBucket(String) request. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the operation and cleans up the underlying network connection
|
List<String> |
getAll()
Retrieve all elements from the operation and return them in a List
|
String |
getContinuation()
Get the continuation value
|
boolean |
hasContinuation()
If this is a paginated operation, a "continuation" value may be available
|
boolean |
hasNext() |
Iterator<String> |
iterator() |
String |
next() |
void |
remove()
This is a read only stream of keys, calling this results in
UnsupportedOperationException
|
public KeySource(BucketResponse bucketResponse)
BucketResponse in response to
RiakClient.streamBucket(String) request. The bucket response
contains a stream which you must close if you do not iterate over the entire set.bucketResponse - the BucketResponse with a List of keys.public void cancel()
StreamingOperationcancel in interface StreamingOperation<String>public void remove()
remove in interface Iterator<String>Iterator.remove()public List<String> getAll()
StreamingOperationgetAll in interface StreamingOperation<String>public boolean hasContinuation()
StreamingOperationhasContinuation in interface StreamingOperation<String>public String getContinuation()
StreamingOperationgetContinuation in interface StreamingOperation<String>Copyright © 2014. All Rights Reserved.