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

org.metricssampler.config.Configuration Maven / Gradle / Ivy

The newest version!
package org.metricssampler.config;

import java.util.Collection;
import java.util.Map;

import static java.util.Collections.unmodifiableCollection;
import static java.util.Collections.unmodifiableMap;
import static org.metricssampler.util.Preconditions.checkArgumentNotNull;

/**
 * The root configuration of the application
 */
public class Configuration {
	private final Collection inputs;
	private final Collection outputs;
	private final Collection samplers;
	private final Map variables;
	private final Map sharedResources;
	
	public Configuration(final Collection inputs, final Collection outputs, final Collection samplers, final Map variables, final Map sharedResources) {
		checkArgumentNotNull(inputs, "inputs");
		checkArgumentNotNull(outputs, "outputs");
		checkArgumentNotNull(samplers, "samplers");
		checkArgumentNotNull(variables, "variables");
		checkArgumentNotNull(sharedResources, "sharedResources");
		this.inputs = unmodifiableCollection(inputs);
		this.outputs = unmodifiableCollection(outputs);
		this.samplers = unmodifiableCollection(samplers);
		this.variables = unmodifiableMap(variables);
		this.sharedResources = unmodifiableMap(sharedResources);
	}

	public Collection getInputs() {
		return inputs;
	}

	public Collection getOutputs() {
		return outputs;
	}

	public Collection getSamplers() {
		return samplers;
	}

	public Map getSharedResources() {
		return sharedResources;
	}

	/**
	 * @return an unmodifiable map of the global variables
	 */
	public Map getVariables() {
		return variables;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy