1 package org.alfresco.repo.node.index; 2 3 import org.quartz.Job; 4 import org.quartz.JobExecutionContext; 5 import org.quartz.JobExecutionException; 6 7 13 public class IndexRecoveryJob implements Job 14 { 15 16 public static final String KEY_INDEX_RECOVERY_COMPONENT = "indexRecoveryComponent"; 17 18 22 public void execute(JobExecutionContext context) throws JobExecutionException 23 { 24 IndexRecovery indexRecoveryComponent = (IndexRecovery) context.getJobDetail() 25 .getJobDataMap().get(KEY_INDEX_RECOVERY_COMPONENT); 26 if (indexRecoveryComponent == null) 27 { 28 throw new JobExecutionException("Missing job data: " + KEY_INDEX_RECOVERY_COMPONENT); 29 } 30 indexRecoveryComponent.reindex(); 32 } 33 } 34 | Popular Tags |