public class FileProcessorManager extends ChannelListener implements JPropertiesListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
order
Modifier and Type | Method and Description |
---|---|
void |
add(ProcessingData data)
Add ProcessingData in the queue for a futur processing
|
void |
addRunningDataFromScan(java.lang.String repositoryId)
Tell the manager that a scan of a repository is currently beginning and no
other scan of the same repository should be done until the first has been totally processed.
|
static FileProcessorManager |
getInstance() |
ProcessingData |
getLastProcessingData() |
ProcessingData |
getProcessingData()
Retrieve the next ProcessingData to processe, wait until one
is added if none is yet available.
|
java.util.List<ProcessingData> |
getProcessingDataQueueCopy()
Retrieve a copy of the Processing queue containing all
ProcessingData yet to be processed
|
void |
handleFinalize()
Called when the channel is finalized
|
void |
init() |
void |
initAfterStoreLoad()
Called just after the store has been loaded and
the channel has been initialized.
|
void |
initBeforeStoreLoad()
Called just before the store has been loaded.
|
boolean |
isProcessingThreadAlive() |
boolean |
isProcessingThreadRunning() |
boolean |
isRunnningDataFromScan(java.lang.String repositoryId)
Indicates if the processing thread currently process a set of data sent by a scan of the
repository directory.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
startProcessingThread() |
void |
stopProcessingThread() |
compareTo, equals, init
public static final java.lang.String REVISION
public static FileProcessorManager getInstance()
public void init()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public void initBeforeStoreLoad() throws java.lang.Exception
ChannelListener
initBeforeStoreLoad
in class ChannelListener
java.lang.Exception
- any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.public void initAfterStoreLoad() throws java.lang.Exception
ChannelListener
initAfterStoreLoad
in class ChannelListener
java.lang.Exception
- any exception you may want to throw if a problem occurs needing to interrupt JCMS startup.public void handleFinalize()
ChannelListener
handleFinalize
in class ChannelListener
public void startProcessingThread()
public void stopProcessingThread()
public boolean isProcessingThreadRunning()
public boolean isProcessingThreadAlive()
public boolean isRunnningDataFromScan(java.lang.String repositoryId)
repositoryId
- The id of the given repositorypublic void addRunningDataFromScan(java.lang.String repositoryId)
repositoryId
- the id of the given repositorypublic ProcessingData getLastProcessingData()
public void add(ProcessingData data)
data
- the ProcessingData to be processedpublic ProcessingData getProcessingData() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.util.List<ProcessingData> getProcessingDataQueueCopy()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.