ObjectLookupContainer<String> templates = metaData.templates().keys();
ImmutableOpenMap<String, IndexMetaData> indices = metaData.indices();
while (it.hasNext()) {
String tableName = it.next();
IndexMetaData newIndexMetaData = event.state().getMetaData().index(tableName);
if (newIndexMetaData != null && event.indexMetaDataChanged(newIndexMetaData)) {
cache.invalidate(tableName);
// invalidate aliases of changed indices
invalidateAliases(newIndexMetaData.aliases());
IndexMetaData oldIndexMetaData = event.previousState().metaData().index(tableName);
if (oldIndexMetaData != null) {
invalidateAliases(oldIndexMetaData.aliases());
}
} else {
// this is the case if a single partition has been modified using alter table <t> partition (...)
String possibleTemplateName = PartitionName.templateName(tableName);
if (templates.contains(possibleTemplateName)) {