Class CrawlerAgent
- java.lang.Object
-
- org.apache.manifoldcf.crawler.system.CrawlerAgent
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CrawlerAgent()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp(IThreadContext threadContext)Tear down agent environment.voidcleanUpAgentData(IThreadContext threadContext, java.lang.String currentProcessID, java.lang.String cleanupProcessID)Cleanup after agents process.voidcleanUpAllAgentData(IThreadContext threadContext, java.lang.String currentProcessID)Cleanup after ALL agents processes.voidclusterInit(IThreadContext threadContext)Called ONLY when no other active services of this kind are running.voiddeinstall(IThreadContext threadContext)Uninstall agent.voidinitialize(IThreadContext threadContext)Initialize agent environment.voidinstall(IThreadContext threadContext)Install agent.booleanisOutputConnectionInUse(IThreadContext threadContext, java.lang.String connName)Request permission from agent to delete an output connection.booleanisTransformationConnectionInUse(IThreadContext threadContext, java.lang.String connName)Request permission from agent to delete a transformation connection.voidnoteOutputConnectionChange(IThreadContext threadContext, java.lang.String connectionName)Note a change in configuration for an output connection.voidnoteOutputConnectorDeregistration(IThreadContext threadContext, java.lang.String[] connectionNames)Note the deregistration of a set of output connections.voidnoteOutputConnectorRegistration(IThreadContext threadContext, java.lang.String[] connectionNames)Note the registration of a set of output connections.voidnoteTransformationConnectionChange(IThreadContext threadContext, java.lang.String connectionName)Note a change in configuration for a transformation connection.voidnoteTransformationConnectorDeregistration(IThreadContext threadContext, java.lang.String[] connectionNames)Note the deregistration of a set of transformation connections.voidnoteTransformationConnectorRegistration(IThreadContext threadContext, java.lang.String[] connectionNames)Note the registration of a set of transformation connections.voidstartAgent(IThreadContext threadContext, java.lang.String processID)Start the agent.voidstartSystem(IThreadContext threadContext)Start everything.voidstopAgent(IThreadContext threadContext)Stop the agent.voidstopSystem(IThreadContext threadContext)Stop the system.
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
jobStartThread
protected JobStartThread jobStartThread
-
stufferThread
protected StufferThread stufferThread
-
finisherThread
protected FinisherThread finisherThread
-
notificationThread
protected JobNotificationThread notificationThread
-
startupThread
protected StartupThread startupThread
-
startDeleteThread
protected StartDeleteThread startDeleteThread
-
jobDeleteThread
protected JobDeleteThread jobDeleteThread
-
workerThreads
protected WorkerThread[] workerThreads
-
expireStufferThread
protected ExpireStufferThread expireStufferThread
-
expireThreads
protected ExpireThread[] expireThreads
-
deleteStufferThread
protected DocumentDeleteStufferThread deleteStufferThread
-
deleteThreads
protected DocumentDeleteThread[] deleteThreads
-
cleanupStufferThread
protected DocumentCleanupStufferThread cleanupStufferThread
-
cleanupThreads
protected DocumentCleanupThread[] cleanupThreads
-
jobResetThread
protected JobResetThread jobResetThread
-
seedingThread
protected SeedingThread seedingThread
-
idleCleanupThread
protected IdleCleanupThread idleCleanupThread
-
setPriorityThread
protected SetPriorityThread setPriorityThread
-
historyCleanupThread
protected HistoryCleanupThread historyCleanupThread
-
assessmentThread
protected AssessmentThread assessmentThread
-
workerResetManager
protected WorkerResetManager workerResetManager
Worker thread pool reset manager
-
docDeleteResetManager
protected DocDeleteResetManager docDeleteResetManager
Delete thread pool reset manager
-
docCleanupResetManager
protected DocCleanupResetManager docCleanupResetManager
Cleanup thread pool reset manager
-
numWorkerThreads
protected int numWorkerThreads
-
numDeleteThreads
protected int numDeleteThreads
-
numCleanupThreads
protected int numCleanupThreads
-
numExpireThreads
protected int numExpireThreads
-
lowWaterFactor
protected float lowWaterFactor
-
stuffAmtFactor
protected float stuffAmtFactor
-
processID
protected java.lang.String processID
Process identifier for this agent
-
-
Constructor Detail
-
CrawlerAgent
public CrawlerAgent() throws ManifoldCFExceptionConstructor.- Throws:
ManifoldCFException
-
-
Method Detail
-
initialize
public void initialize(IThreadContext threadContext) throws ManifoldCFException
Initialize agent environment. This is called before any of the other operations are called, and is meant to insure that the environment is properly initialized.- Specified by:
initializein interfaceIAgent- Throws:
ManifoldCFException
-
cleanUp
public void cleanUp(IThreadContext threadContext) throws ManifoldCFException
Tear down agent environment. This is called after all the other operations are completed, and is meant to allow environment resources to be freed.- Specified by:
cleanUpin interfaceIAgent- Throws:
ManifoldCFException
-
install
public void install(IThreadContext threadContext) throws ManifoldCFException
Install agent. This usually installs the agent's database tables etc.- Specified by:
installin interfaceIAgent- Throws:
ManifoldCFException
-
deinstall
public void deinstall(IThreadContext threadContext) throws ManifoldCFException
Uninstall agent. This must clean up everything the agent is responsible for.- Specified by:
deinstallin interfaceIAgent- Throws:
ManifoldCFException
-
clusterInit
public void clusterInit(IThreadContext threadContext) throws ManifoldCFException
Called ONLY when no other active services of this kind are running. Meant to be used after the cluster has been down for an indeterminate period of time.- Specified by:
clusterInitin interfaceIAgent- Throws:
ManifoldCFException
-
cleanUpAllAgentData
public void cleanUpAllAgentData(IThreadContext threadContext, java.lang.String currentProcessID) throws ManifoldCFException
Cleanup after ALL agents processes. Call this method to clean up dangling persistent state when a cluster is just starting to come up. This method CANNOT be called when there are any active agents processes at all.- Specified by:
cleanUpAllAgentDatain interfaceIAgent- Parameters:
currentProcessID- is the current process ID.- Throws:
ManifoldCFException
-
cleanUpAgentData
public void cleanUpAgentData(IThreadContext threadContext, java.lang.String currentProcessID, java.lang.String cleanupProcessID) throws ManifoldCFException
Cleanup after agents process. Call this method to clean up dangling persistent state after agent has been stopped. This method CANNOT be called when the agent is active, but it can be called at any time and by any process in order to guarantee that a terminated agent does not block other agents from completing their tasks.- Specified by:
cleanUpAgentDatain interfaceIAgent- Parameters:
currentProcessID- is the current process ID.cleanupProcessID- is the process ID of the agent to clean up after.- Throws:
ManifoldCFException
-
startAgent
public void startAgent(IThreadContext threadContext, java.lang.String processID) throws ManifoldCFException
Start the agent. This method should spin up the agent threads, and then return.- Specified by:
startAgentin interfaceIAgentprocessID- is the process ID to start up an agent for.- Throws:
ManifoldCFException
-
stopAgent
public void stopAgent(IThreadContext threadContext) throws ManifoldCFException
Stop the agent. This should shut down the agent threads etc.- Specified by:
stopAgentin interfaceIAgent- Throws:
ManifoldCFException
-
isOutputConnectionInUse
public boolean isOutputConnectionInUse(IThreadContext threadContext, java.lang.String connName) throws ManifoldCFException
Request permission from agent to delete an output connection.- Specified by:
isOutputConnectionInUsein interfaceIAgent- Parameters:
connName- is the name of the output connection.- Returns:
- true if the connection is in use, false otherwise.
- Throws:
ManifoldCFException
-
noteOutputConnectorDeregistration
public void noteOutputConnectorDeregistration(IThreadContext threadContext, java.lang.String[] connectionNames) throws ManifoldCFException
Note the deregistration of a set of output connections.- Specified by:
noteOutputConnectorDeregistrationin interfaceIAgent- Parameters:
connectionNames- are the names of the connections being deregistered.- Throws:
ManifoldCFException
-
noteOutputConnectorRegistration
public void noteOutputConnectorRegistration(IThreadContext threadContext, java.lang.String[] connectionNames) throws ManifoldCFException
Note the registration of a set of output connections.- Specified by:
noteOutputConnectorRegistrationin interfaceIAgent- Parameters:
connectionNames- are the names of the connections being registered.- Throws:
ManifoldCFException
-
noteOutputConnectionChange
public void noteOutputConnectionChange(IThreadContext threadContext, java.lang.String connectionName) throws ManifoldCFException
Note a change in configuration for an output connection.- Specified by:
noteOutputConnectionChangein interfaceIAgent- Parameters:
connectionName- is the name of the connections being changed.- Throws:
ManifoldCFException
-
isTransformationConnectionInUse
public boolean isTransformationConnectionInUse(IThreadContext threadContext, java.lang.String connName) throws ManifoldCFException
Request permission from agent to delete a transformation connection.- Specified by:
isTransformationConnectionInUsein interfaceIAgent- Parameters:
connName- is the name of the transformation connection.- Returns:
- true if the connection is in use, false otherwise.
- Throws:
ManifoldCFException
-
noteTransformationConnectorDeregistration
public void noteTransformationConnectorDeregistration(IThreadContext threadContext, java.lang.String[] connectionNames) throws ManifoldCFException
Note the deregistration of a set of transformation connections.- Specified by:
noteTransformationConnectorDeregistrationin interfaceIAgent- Parameters:
connectionNames- are the names of the connections being deregistered.- Throws:
ManifoldCFException
-
noteTransformationConnectorRegistration
public void noteTransformationConnectorRegistration(IThreadContext threadContext, java.lang.String[] connectionNames) throws ManifoldCFException
Note the registration of a set of transformation connections.- Specified by:
noteTransformationConnectorRegistrationin interfaceIAgent- Parameters:
connectionNames- are the names of the connections being registered.- Throws:
ManifoldCFException
-
noteTransformationConnectionChange
public void noteTransformationConnectionChange(IThreadContext threadContext, java.lang.String connectionName) throws ManifoldCFException
Note a change in configuration for a transformation connection.- Specified by:
noteTransformationConnectionChangein interfaceIAgent- Parameters:
connectionName- is the name of the connection being changed.- Throws:
ManifoldCFException
-
startSystem
public void startSystem(IThreadContext threadContext) throws ManifoldCFException
Start everything.- Throws:
ManifoldCFException
-
stopSystem
public void stopSystem(IThreadContext threadContext) throws ManifoldCFException
Stop the system.- Throws:
ManifoldCFException
-
-