}
@Override
protected Region getRegion(Fqn fqn)
{
Region r = super.getRegion(fqn);
if (r != null)
return r;
else if (buddyFqnTransformer.isBackupFqn(fqn))
{
// try and grab a backup region, creating one if need be.
Fqn actualFqn = buddyFqnTransformer.getActualFqn(fqn);
Fqn backupRoot = buddyFqnTransformer.getBackupRootFromFqn(fqn);
// the actual region could be a few levels higher than actualFqn
Region actualRegion = regionManager.getRegion(actualFqn, Region.Type.EVICTION, false);
if (actualRegion == null) return null;
//create a new region for this backup
Region newRegion = regionManager.getRegion(Fqn.fromRelativeFqn(backupRoot, actualRegion.getFqn()), Region.Type.EVICTION, true);
newRegion.setEvictionRegionConfig(actualRegion.getEvictionRegionConfig());
return newRegion;
}
else return null;
}