@Override
public RegionAttributes beforeCreate(Region parent, String regionName, RegionAttributes attrs,
InternalRegionArguments internalRegionArgs) {
RegionAttributes updatedRA = attrs;
String path = parent == null ? "/" + regionName : parent.getFullPath() + "/" + regionName;
if (path.equals(this.regionPath) && this.beforeCreateInvoked.compareAndSet(false, true)) {
LuceneServiceImpl.validateRegionAttributes(attrs);
String aeqId = LuceneServiceImpl.getUniqueIndexName(this.indexName, this.regionPath);
if (!attrs.getAsyncEventQueueIds().contains(aeqId)) {
AttributesFactory af = new AttributesFactory(attrs);
af.addAsyncEventQueueId(aeqId);
updatedRA = af.create();
}
internalRegionArgs.addCacheServiceProfile(new LuceneIndexCreationProfile(this.indexName,
this.regionPath, this.fields, this.analyzer, this.fieldAnalyzers, serializer));
luceneIndex = this.service.beforeDataRegionCreated(this.indexName, this.regionPath, attrs,
this.analyzer, this.fieldAnalyzers, aeqId, serializer, this.fields);
internalRegionArgs.addInternalAsyncEventQueueId(aeqId);
}
return updatedRA;
}