use of org.apache.geode.internal.cache.PartitionRegionConfig in project geode by apache.
the class FixedPartitioningTestBase method setPRObserverBeforeCalculateStartingBucketId.
public static void setPRObserverBeforeCalculateStartingBucketId() {
PartitionedRegion.BEFORE_CALCULATE_STARTING_BUCKET_FLAG = true;
origObserver = PartitionedRegionObserverHolder.setInstance(new PartitionedRegionObserverAdapter() {
public void beforeCalculatingStartingBucketId() {
WaitCriterion wc = new WaitCriterion() {
String excuse;
public boolean done() {
Region prRoot = PartitionedRegionHelper.getPRRoot(cache);
PartitionRegionConfig regionConfig = (PartitionRegionConfig) prRoot.get("#Quarter");
if (regionConfig == null) {
return false;
} else {
if (!regionConfig.isFirstDataStoreCreated()) {
return true;
} else {
return false;
}
}
}
public String description() {
return excuse;
}
};
Wait.waitForCriterion(wc, 20000, 500, false);
LogWriterUtils.getLogWriter().info("end of beforeCalculatingStartingBucketId");
}
});
}
Aggregations