strict listeners

This commit is contained in:
Ivannikov Kirill 2015-09-02 17:59:41 +05:00
parent fd8476dbd7
commit a097375a6f
1 changed files with 3 additions and 16 deletions

View File

@ -131,23 +131,14 @@ public class ShardIndexingService extends AbstractIndexShardComponent {
totalStats.indexCurrent.inc();
typeStats(index.type()).indexCurrent.inc();
for (IndexingOperationListener listener : listeners) {
try {
listener.preIndex(index);
} catch (Exception e) {
logger.warn("preIndex listener [{}] failed", e, listener);
}
listener.preIndex(index);
}
return index;
}
public void postIndexUnderLock(Engine.Index index) {
for (IndexingOperationListener listener : listeners) {
try {
listener.postIndexUnderLock(index);
} catch (Exception e) {
logger.warn("postIndexUnderLock listener [{}] failed", e, listener);
}
listener.postIndexUnderLock(index);
}
}
@ -160,11 +151,7 @@ public class ShardIndexingService extends AbstractIndexShardComponent {
typeStats.indexCurrent.dec();
slowLog.postIndex(index, took);
for (IndexingOperationListener listener : listeners) {
try {
listener.postIndex(index);
} catch (Exception e) {
logger.warn("postIndex listener [{}] failed", e, listener);
}
listener.postIndex(index);
}
}