/*******************************************************************************
 *
 *    Copyright (C) 2015-2018 the BBoxDB project
 *  
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License. 
 *    
 *******************************************************************************/
package org.bboxdb.distribution.partitioner;

import java.util.Set;

import org.bboxdb.distribution.DistributionGroupName;
import org.bboxdb.distribution.region.DistributionRegionCallback;
import org.bboxdb.distribution.region.DistributionRegionIdMapper;
import org.bboxdb.distribution.zookeeper.ZookeeperClient;

public class SpacePartitionerContext {
	
	private String spacePartitionerConfig;
	
	private DistributionGroupName distributionGroupName;
	
	private ZookeeperClient zookeeperClient;
	
	private DistributionGroupZookeeperAdapter distributionGroupAdapter;
	
	private Set<DistributionRegionCallback> callback;
	
	private DistributionRegionIdMapper mapper;

	public SpacePartitionerContext(final String spacePartitionerConfig, final DistributionGroupName distributionGroupName,
			final ZookeeperClient zookeeperClient, final DistributionGroupZookeeperAdapter distributionGroupAdapter,
			final Set<DistributionRegionCallback> callback, final DistributionRegionIdMapper mapper) {
		
		this.spacePartitionerConfig = spacePartitionerConfig;
		this.distributionGroupName = distributionGroupName;
		this.zookeeperClient = zookeeperClient;
		this.distributionGroupAdapter = distributionGroupAdapter;
		this.callback = callback;
		this.mapper = mapper;
	}

	public String getSpacePartitionerConfig() {
		return spacePartitionerConfig;
	}

	public DistributionGroupName getDistributionGroupName() {
		return distributionGroupName;
	}

	public ZookeeperClient getZookeeperClient() {
		return zookeeperClient;
	}

	public DistributionGroupZookeeperAdapter getDistributionGroupAdapter() {
		return distributionGroupAdapter;
	}

	public Set<DistributionRegionCallback> getCallback() {
		return callback;
	}

	public DistributionRegionIdMapper getMapper() {
		return mapper;
	}
}
@@ -851,16 +851,42 @@
 ioner;%0A%0A
+import java.util.Objects;%0A
 import j
@@ -1854,16 +1854,39 @@
 onfig = 
+Objects.requireNonNull(
 spacePar
@@ -1899,16 +1899,17 @@
 erConfig
+)
 ;%0A%09%09this
@@ -1933,16 +1933,39 @@
 pName = 
+Objects.requireNonNull(
 distribu
@@ -1977,16 +1977,17 @@
 roupName
+)
 ;%0A%09%09this
@@ -2005,16 +2005,39 @@
 lient = 
+Objects.requireNonNull(
 zookeepe
@@ -2043,16 +2043,17 @@
 erClient
+)
 ;%0A%09%09this
@@ -2080,16 +2080,39 @@
 apter = 
+Objects.requireNonNull(
 distribu
@@ -2127,16 +2127,17 @@
 pAdapter
+)
 ;%0A%09%09this
@@ -2148,24 +2148,47 @@
 lback = 
+Objects.requireNonNull(
 callback
 ;%0A%09%09this
@@ -2179,16 +2179,17 @@
 callback
+)
 ;%0A%09%09this
@@ -2197,23 +2197,46 @@
 mapper =
- 
+Objects.requireNonNull(
 mapper
+)
 ;%0A%09%7D%0A%0A%09p

Ensure not null