
com.basho.riak.client.api.commands.mapreduce.BucketKeyMapReduce Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riak-client Show documentation
Show all versions of riak-client Show documentation
HttpClient-based client for Riak
package com.basho.riak.client.api.commands.mapreduce;
import com.basho.riak.client.core.query.Location;
import java.util.ArrayList;
import java.util.List;
public class BucketKeyMapReduce extends MapReduce
{
public BucketKeyMapReduce(BucketKeyInput input, Builder builder)
{
super(input, builder);
}
public static class Builder extends MapReduce.Builder
{
private List input =
new ArrayList();
@Override
protected Builder self()
{
return this;
}
public Builder withLocation(Location location)
{
input.add(new BucketKeyInput.IndividualInput(location));
return this;
}
public Builder withLocation(Location location, String keyData)
{
input.add(new BucketKeyInput.IndividualInput(location, keyData));
return this;
}
public BucketKeyMapReduce build()
{
if (input == null)
{
throw new IllegalStateException("At least one location must be specified");
}
return new BucketKeyMapReduce(new BucketKeyInput(input), this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy