Moving to root below branch label

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2005-12-08 07:13:07 +00:00
commit e1e6508fec
1095 changed files with 230566 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package org.alfresco.repo.node.index;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
/**
* Forces a index recovery using the {@link IndexRecovery recovery component} passed
* in via the job detail.
*
* @author Derek Hulley
*/
public class IndexRecoveryJob implements Job
{
/** KEY_INDEX_RECOVERY_COMPONENT = 'indexRecoveryComponent' */
public static final String KEY_INDEX_RECOVERY_COMPONENT = "indexRecoveryComponent";
/**
* Forces a full index recovery using the {@link IndexRecovery recovery component} passed
* in via the job detail.
*/
public void execute(JobExecutionContext context) throws JobExecutionException
{
IndexRecovery indexRecoveryComponent = (IndexRecovery) context.getJobDetail()
.getJobDataMap().get(KEY_INDEX_RECOVERY_COMPONENT);
if (indexRecoveryComponent == null)
{
throw new JobExecutionException("Missing job data: " + KEY_INDEX_RECOVERY_COMPONENT);
}
// reindex
indexRecoveryComponent.reindex();
}
}