gedi.solutions.geode.functions.RegionDictionary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gedi-geode-extensions-core Show documentation
Show all versions of gedi-geode-extensions-core Show documentation
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;
}
}