All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.basho.riak.client.api.commands.mapreduce.BucketKeyInput Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package com.basho.riak.client.api.commands.mapreduce;

import com.basho.riak.client.core.query.Location;

import java.util.Collection;

public class BucketKeyInput implements MapReduceInput
{

	private final Collection inputs;

	public BucketKeyInput(Collection inputs)
	{
		this.inputs = inputs;
	}

	public Collection getInputs()
	{
		return inputs;
	}

	static class IndividualInput
	{
		public final Location location;
		public final String keyData;

	  IndividualInput(Location location, String keyData)
		{
			this.location = location;
            if (keyData == null)
            {
                throw new IllegalArgumentException("keyData cannot be null.");
            }
			this.keyData = keyData;
		}

	  IndividualInput(Location location)
		{
			this.location = location;
			this.keyData = "";
		}

		public boolean hasKeyData()
		{
			return keyData != null;
		}
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy