|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.endeca.index.admin.SimpleIndexingAdmin
public class SimpleIndexingAdmin
A simple admin component for kicking off indexing. Current a given instance only manages one IndexingJobDefinition.
The indexing job is defined via the phaseToPriorityAndTasks property. An indexing job is made up of indexing phases, which in turn create indexing tasks.
Created: November 23 2011
IndexingJob
,
IndexingPhase
,
IndexingTask
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string from source code control system. |
protected java.lang.Object |
JOB_CONTROL_LOCK
Used when starting a job. |
protected ScheduledJob |
mBaselineScheduledJob
|
protected ScheduledJob |
mPartialScheduledJob
|
protected long |
mRetryInMs
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SimpleIndexingAdmin()
|
Method Summary | |
---|---|
void |
clearAffectedByCADeploymentFlag()
Clears property affectedByCADeployment. |
protected IndexingJob |
constructIndexingJob(boolean pBaseline)
Construct an indexing job, including adding subtasks. |
protected javax.servlet.Servlet |
createAdminServlet()
Creates and returns a new Servlet that will administer this service. |
boolean |
doesIndexIndexingOutputConfigPath(java.lang.String pPath)
Return whether this simple admin indexes the specified indexing output config path. |
void |
doStartService()
Parse our definition now, and validate after Nucleus start. |
void |
doStopService()
This is called when a Service is required to shut down. |
java.lang.Thread |
getActiveIndexingThread()
Returns property activeIndexingThread. |
int |
getAdminAutoRefreshSeconds()
Returns property adminAutoRefreshSeconds. |
Schedule |
getBaselineSchedule()
Returns property baselineSchedule. |
ScheduledJob |
getBaselineScheduledJob()
Returns property partialScheduledJob. |
java.lang.String |
getBaselineScheduledJobName()
Returns property baselineScheduledJobName. |
Indexable[] |
getIndexables()
Returns property indexables. |
IndexingJob |
getIndexingJob()
Returns property indexingJob. |
IndexingJobDefinition |
getIndexingJobDefinition()
Returns property getIndexingJobDefinition. |
java.util.Set<java.lang.String> |
getIndexingOutputConfigPaths()
Returns property indexingOutputConfigPaths. |
JobQueue |
getJobQueue()
Returns property jobQueue. |
java.lang.String |
getLocalSynchronizationInvokerPath()
Returns property localSynchronizationInvokerPath. |
Schedule |
getPartialSchedule()
Returns property partialSchedule. |
ScheduledJob |
getPartialScheduledJob()
Returns property partialScheduledJob. |
java.lang.String |
getPartialScheduledJobName()
Returns property partialScheduledJobName. |
java.lang.String[] |
getPhaseToPrioritiesAndTasks()
Returns property phaseToPrioritiesAndTasks. |
long |
getRetryInMs()
Returns property retryInMs. |
Scheduler |
getScheduler()
Returns property scheduler. |
int |
getScheduleThreadMethod()
Returns property scheduleThreadMethod. |
javax.transaction.TransactionManager |
getTransactionManager()
Returns property transactionManager. |
boolean |
indexBaseline()
Do a full, baseline index. |
protected boolean |
indexBaseline(IndexingJob pJob,
boolean pUseJobQueue)
Do a full, baseline index. |
boolean |
indexPartial()
Do a partial, incremental index. |
protected boolean |
indexPartial(IndexingJob pJob,
boolean pUseJobQueue)
Do a partial, incremental index. |
boolean |
isActivelyIndexing()
Whether we are actively indexing. |
boolean |
isAffectedByCADeployment()
Returns property affectedByCADeployment. |
boolean |
isDeferRunningJobsOnCADeploymentStarts()
Returns property deferRunningJobsOnCADeploymentStarts. |
boolean |
isEnableScheduledIndexing()
Returns property enableScheduledIndexing. |
boolean |
isOnCADeploymentChangesIndexInBackground()
Returns property onCADeploymentChangesIndexInBackground. |
boolean |
isRunTasksWithinPhaseInParallel()
Returns property runTasksWithinPhaseInParallel. |
void |
onCADeploymentChanges(java.util.Set<java.lang.String> pAffectedIOCPaths)
This is invoked by the LocalSynchronizationInvokerService when the IndexingDeploymentListener invokes. |
void |
performScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
This is called when a scheduled job tied to this object occurs. |
void |
setActiveIndexingThread(java.lang.Thread pActiveIndexingThread)
Sets property activeIndexingThread. |
void |
setAdminAutoRefreshSeconds(int pAdminAutoRefreshSeconds)
Sets property adminAutoRefreshSeconds. |
void |
setBaselineSchedule(Schedule pBaselineSchedule)
Sets property baselineSchedule. |
void |
setBaselineScheduledJobName(java.lang.String pBaselineScheduledJobName)
Sets property baselineScheduledJobName. |
void |
setDeferRunningJobsOnCADeploymentStarts(boolean pDeferRunningJobsOnCADeploymentStarts)
Sets property deferRunningJobsOnCADeploymentStarts. |
void |
setEnableScheduledIndexing(boolean pEnableScheduledIndexing)
Sets property enableScheduledIndexing. |
protected void |
setIndexables(Indexable[] pIndexables)
Sets property indexables. |
void |
setIndexingJob(IndexingJob pIndexingJob)
Sets property indexingJob. |
void |
setIndexingJobDefinition(IndexingJobDefinition pIndexingJobDefinition)
Sets property getIndexingJobDefinition. |
void |
setJobQueue(JobQueue pJobQueue)
Sets property jobQueue. |
void |
setLocalSynchronizationInvokerPath(java.lang.String pLocalSynchronizationInvokerPath)
Sets property localSynchronizationInvokerPath. |
void |
setOnCADeploymentChangesIndexInBackground(boolean pOnCADeploymentChangesIndexInBackground)
Sets property onCADeploymentChangesIndexInBackground. |
void |
setPartialSchedule(Schedule pPartialSchedule)
Sets property partialSchedule. |
void |
setPartialScheduledJobName(java.lang.String pPartialScheduledJobName)
Sets property partialScheduledJobName. |
void |
setPhaseToPrioritiesAndTasks(java.lang.String[] pPhaseToPrioritiesAndTasks)
Sets property phaseToPrioritiesAndTasks. |
void |
setRetryInMs(long pRetryInMs)
Sets property mRetryInMs. |
void |
setRunTasksWithinPhaseInParallel(boolean pRunTasksWithinPhaseInParallel)
Sets property runTasksWithinPhaseInParallel. |
void |
setScheduler(Scheduler pScheduler)
Sets property scheduler. |
void |
setScheduleThreadMethod(int pScheduleThreadMethod)
Sets property scheduleThreadMethod. |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager. |
java.lang.Thread |
startIndexingJobInBackground(boolean pBaseline)
Start an indexing job in its own thread. |
protected void |
startScheduledJobs()
Start any scheduled jobs, if configured to do so. |
protected void |
stopScheduledJob(ScheduledJob pJob)
Stop the specified scheduled job and log any exception. |
protected void |
stopScheduledJobs()
Stop any scheduled jobs by removing them from the scheduler. |
protected void |
updateIndexingOutputConfigPaths(IndexingJob pIndexingJob)
Update the indexingOutputConfigPaths property based on the passed in IndexingJob. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected java.lang.Object JOB_CONTROL_LOCK
protected ScheduledJob mBaselineScheduledJob
protected ScheduledJob mPartialScheduledJob
protected long mRetryInMs
Constructor Detail |
---|
public SimpleIndexingAdmin()
Method Detail |
---|
protected void setIndexables(Indexable[] pIndexables)
public Indexable[] getIndexables()
public void setIndexingJobDefinition(IndexingJobDefinition pIndexingJobDefinition)
public IndexingJobDefinition getIndexingJobDefinition()
public void setActiveIndexingThread(java.lang.Thread pActiveIndexingThread)
public java.lang.Thread getActiveIndexingThread()
public boolean isActivelyIndexing()
public void setPhaseToPrioritiesAndTasks(java.lang.String[] pPhaseToPrioritiesAndTasks)
public java.lang.String[] getPhaseToPrioritiesAndTasks()
public void setIndexingJob(IndexingJob pIndexingJob)
public IndexingJob getIndexingJob()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public void setRunTasksWithinPhaseInParallel(boolean pRunTasksWithinPhaseInParallel)
public boolean isRunTasksWithinPhaseInParallel()
public void setAdminAutoRefreshSeconds(int pAdminAutoRefreshSeconds)
public int getAdminAutoRefreshSeconds()
public void setLocalSynchronizationInvokerPath(java.lang.String pLocalSynchronizationInvokerPath)
public java.lang.String getLocalSynchronizationInvokerPath()
public java.util.Set<java.lang.String> getIndexingOutputConfigPaths()
public void setOnCADeploymentChangesIndexInBackground(boolean pOnCADeploymentChangesIndexInBackground)
public boolean isOnCADeploymentChangesIndexInBackground()
public void setScheduler(Scheduler pScheduler)
public Scheduler getScheduler()
public void setScheduleThreadMethod(int pScheduleThreadMethod)
REUSE_THREAD
.
public int getScheduleThreadMethod()
REUSE_THREAD
.
public void setBaselineSchedule(Schedule pBaselineSchedule)
public Schedule getBaselineSchedule()
public void setBaselineScheduledJobName(java.lang.String pBaselineScheduledJobName)
public java.lang.String getBaselineScheduledJobName()
public ScheduledJob getBaselineScheduledJob()
public void setPartialSchedule(Schedule pPartialSchedule)
public Schedule getPartialSchedule()
public void setPartialScheduledJobName(java.lang.String pPartialScheduledJobName)
public java.lang.String getPartialScheduledJobName()
public ScheduledJob getPartialScheduledJob()
public void setEnableScheduledIndexing(boolean pEnableScheduledIndexing)
public boolean isEnableScheduledIndexing()
public long getRetryInMs()
public void setRetryInMs(long pRetryInMs)
public void setJobQueue(JobQueue pJobQueue)
public JobQueue getJobQueue()
public void setDeferRunningJobsOnCADeploymentStarts(boolean pDeferRunningJobsOnCADeploymentStarts)
pDeferRunningJobsOnCADeploymentStarts
- true
means that a running indexing job should be deferred (canceled and queued) when a CA deployment starts;
false
a running indexing process should be finished independently of CA deployments.public boolean isDeferRunningJobsOnCADeploymentStarts()
true
means that a running indexing job should be deferred (canceled and queued) when a CA deployment starts;
false
a running indexing process will be finished independently of CA deployments.public boolean isAffectedByCADeployment()
public void clearAffectedByCADeploymentFlag()
public void onCADeploymentChanges(java.util.Set<java.lang.String> pAffectedIOCPaths)
pAffectedIOCPaths
- the array of affected indexing output config
paths.public boolean indexBaseline() throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
protected boolean indexBaseline(IndexingJob pJob, boolean pUseJobQueue) throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
public boolean indexPartial() throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
protected boolean indexPartial(IndexingJob pJob, boolean pUseJobQueue) throws atg.repository.search.indexing.IndexingException
atg.repository.search.indexing.IndexingException
protected IndexingJob constructIndexingJob(boolean pBaseline) throws atg.repository.search.indexing.IndexingException
pBaseline
- whether this is a baseline index.
atg.repository.search.indexing.IndexingException
protected void startScheduledJobs()
protected void stopScheduledJob(ScheduledJob pJob)
pJob
- the scheduled job to stop.protected void stopScheduledJobs()
public void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
performScheduledTask
in interface Schedulable
pScheduler
- calling the jobpJob
- the ScheduledJobpublic void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void doStopService() throws ServiceException
GenericService
doStopService
in class GenericService
ServiceException
- if the Service had a problem shutting downprotected void updateIndexingOutputConfigPaths(IndexingJob pIndexingJob)
pIndexingJob
- the IndexingJob whose tasks should be consulted
when updating the the indexingOutputConfigPaths property.public boolean doesIndexIndexingOutputConfigPath(java.lang.String pPath)
pPath
- the absolute Nucleus path of the IndexingOutputConfig in
question.public java.lang.Thread startIndexingJobInBackground(boolean pBaseline)
pBaseline
- whether this is a baseline index.protected javax.servlet.Servlet createAdminServlet()
GenericService
createAdminServlet
in class GenericService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |