class DeleteExpiredIndexJob<V> extends DeleteExpiredJob<V> {

    private static final String JOB_TYPE = "delete_expired_index";

    private final Set<HugeIndex> indexes;

    public DeleteExpiredIndexJob(Set<HugeIndex> indexes) {
        E.checkArgument(indexes != null && !indexes.isEmpty(),
                        "The indexes can't be null or empty");
        this.indexes = indexes;
    }

    @Override
    public String type() {
        return JOB_TYPE;
    }

    @Override
    public V execute() throws Exception {<FILL_FUNCTION_BODY>}

    /*
     * Delete expired element(if exist) of the index,
     * otherwise just delete expired index only
     */
    private void deleteExpiredIndex(HugeGraphParams graph, HugeIndex index) {
        GraphTransaction tx = graph.graphTransaction();
        HugeType type = index.indexLabel().queryType().isVertex() ?
                        HugeType.VERTEX : HugeType.EDGE;
        IdQuery query = new IdQuery(type);
        query.query(index.elementId());
        query.showExpired(true);
        Iterator<?> elements = type.isVertex() ?
                               tx.queryVertices(query) :
                               tx.queryEdges(query);
        if (elements.hasNext()) {
            HugeElement element = (HugeElement) elements.next();
            if (element.expiredTime() == index.expiredTime()) {
                element.remove();
            } else {
                tx.removeIndex(index);
            }
        } else {
            tx.removeIndex(index);
        }
    }
}

        LOG.debug("Delete expired indexes: {}", this.indexes);

        HugeGraphParams graph = this.params();
        GraphTransaction tx = graph.graphTransaction();
        try {
            for (HugeIndex index : this.indexes) {
                this.deleteExpiredIndex(graph, index);
            }
            tx.commit();
        } catch (Throwable e) {
            tx.rollback();
            LOG.warn("Failed to delete expired indexes: {}", this.indexes);
            throw e;
        } finally {
            JOB_COUNTERS.jobCounter(graph.graph()).decrement();
        }
        return null;
    
<methods>public non-sealed void <init>() ,public static void asyncDeleteExpiredObject(org.apache.hugegraph.HugeGraph, V) ,public static EphemeralJob<V> newDeleteExpiredElementJob(org.apache.hugegraph.job.system.JobCounters.JobCounter, V) <variables>protected static final org.apache.hugegraph.job.system.JobCounters JOB_COUNTERS,protected static final Logger LOG,private static final int MAX_JOBS