use of org.apache.geode.modules.util.RegionStatus 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 ").append(getSessionManager().getRegionName()).append(". See the server log for additional details.");
throw new IllegalStateException(builder.toString());
}
}
}
use of org.apache.geode.modules.util.RegionStatus 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