class IndexTask implements Subscriber {

    /**
     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public void inform(final Event e) {<FILL_FUNCTION_BODY>}
}


        if (e instanceof final IndexEvent event) {
            if (IndexEvent.Action.CHECK == event.getAction()) {
                IndexManager.checkIndexesConsistency();
                return;
            }

            final ObjectIndexer indexManager = IndexManagerFactory.getIndexManager(event);

            if (IndexEvent.Action.CREATE == event.getAction()) {
                indexManager.add(event.getDocument());
            } else if (IndexEvent.Action.UPDATE == event.getAction()) {
                indexManager.update(event.getDocument());
            } else if (IndexEvent.Action.DELETE == event.getAction()) {
                indexManager.remove(event.getDocument());
            } else if (IndexEvent.Action.COMMIT == event.getAction()) {
                indexManager.commit();
            } else if (IndexEvent.Action.REINDEX == event.getAction()) {
                Timer timer = Timer.builder("lucene_index_rebuild")
                        .description("Lucene index rebuild")
                        .tags("type", event.getIndexableClass().getName().toLowerCase())
                        .register(Metrics.getRegistry());
                Timer.Sample recording = Timer.start();
                indexManager.reindex();
                recording.stop(timer);
            }
        }
    
<no_super_class>