@Override public Engine.Delete beforeDelete(Engine.Delete delete) { if (delete.type().equals(index().name())) { percolator.removeQuery(delete.id()); } return delete; }
@Override public void postDeleteUnderLock(Engine.Delete delete) { // remove the query under a lock if (PercolatorService.TYPE_NAME.equals(delete.type())) { removePercolateQuery(delete.id()); } }
@Override public void postDelete(Engine.Delete delete, Throwable ex) { if (delete.origin() != Engine.Operation.Origin.RECOVERY) { totalStats.deleteCurrent.dec(); typeStats(delete.type()).deleteCurrent.dec(); } }
@Override public Engine.Delete preDelete(Engine.Delete delete) { if (delete.origin() != Engine.Operation.Origin.RECOVERY) { totalStats.deleteCurrent.inc(); typeStats(delete.type()).deleteCurrent.inc(); } return delete; }
@Override public void postDelete(Engine.Delete delete) { if (delete.origin() != Engine.Operation.Origin.RECOVERY) { long took = delete.endTime() - delete.startTime(); totalStats.deleteMetric.inc(took); totalStats.deleteCurrent.dec(); StatsHolder typeStats = typeStats(delete.type()); typeStats.deleteMetric.inc(took); typeStats.deleteCurrent.dec(); } }