use of org.apache.geode.modules.util.RegionConfiguration in project geode by apache.
the class ClientServerSessionCache method createSessionRegionOnServers.
private void createSessionRegionOnServers() {
// Create the RegionConfiguration
RegionConfiguration configuration = createRegionConfiguration();
// Send it to the server tier
Execution execution = FunctionService.onServer(this.cache).setArguments(configuration);
ResultCollector collector = execution.execute(CreateRegionFunction.ID);
// Verify the region was successfully created on the servers
List<RegionStatus> results = (List<RegionStatus>) collector.getResult();
for (RegionStatus status : results) {
if (status == RegionStatus.INVALID) {
StringBuilder builder = new StringBuilder();
builder.append("An exception occurred on the server while attempting to create or validate region named ");
builder.append(properties.get(CacheProperty.REGION_NAME));
builder.append(". See the server log for additional details.");
throw new IllegalStateException(builder.toString());
}
}
}
Aggregations