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

gedi.solutions.geode.functions.RegionDictionary Maven / Gradle / Ivy

Go to download

GemFire Enterprise Data Integration - common development extensions powered by Apache Geode

The newest version!
package gedi.solutions.geode.functions;

import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.partition.PartitionRegionHelper;

/**
 * Interface for clients to the region instances
 * @author Gregory Green
 *
 */
public interface RegionDictionary
{
	public  Region getRegion(String name);
	
	/**
	 * @param  the region key type
	 * @param  the region value type
	 * @param region the region
	 * @return the local data
	 */
	  default  Region getLocalData(Region region) 
	  {
		  if(!DataPolicy.EMPTY.equals(region.getAttributes().getDataPolicy()))
				  return PartitionRegionHelper.getLocalData(region);
		  
		  return region;
	
	  } 

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy