public class MultiThreadManager
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected java.io.FilenameFilter |
actFilter |
protected static java.lang.String |
BINARY_FTP_TRANSER |
protected DCStreamHandler[] |
dcStHandls |
protected static java.lang.String |
DEFAULT_SUFFIX |
protected boolean |
deleteLocalFiles |
protected EINode |
eiNode |
protected boolean |
fdChecked |
protected FileEIDuplicateCheck |
fileduplicateCheck |
protected boolean |
fileLevelTransaction |
protected java.lang.String |
filePatternMode |
protected boolean |
ftp |
protected FtpFileTracker |
ftpFileTracker |
protected FtpEIManager |
ftpManager |
protected SMGLock |
ioLock |
protected boolean |
keepTrackOfFiles |
protected java.io.File |
localDir |
protected java.lang.String |
localFilePrefix |
protected java.lang.String |
localFileRegExp |
protected java.lang.String |
localFileSuffix |
protected LoggerIfc |
logger |
protected java.lang.String[] |
name |
protected int |
numberOfThreads |
protected long |
pollingInterval |
protected static java.lang.String |
RECOVERY_FILE_SUFFIX |
protected SynchronizedDirectory |
sd_localDir |
protected EITransport[] |
transport |
protected boolean |
useFtp |
protected boolean |
useSynchronizedDirectory |
Constructor and Description |
---|
MultiThreadManager(EINode eiNode,
EITransport[] transport,
DCStreamHandler[] dcStHandls,
int numThreads,
java.io.File localDir,
java.lang.String suffix)
Constructor used to create an instance of MultiThreadManager
in Ascii CC, if files are pushed to a local directory
|
MultiThreadManager(EINode eiNode,
EITransport[] transport,
DCStreamHandler[] dcStHandls,
int numThreads,
FtpFileTracker tracker,
SMGLock lock)
Constructor used to create an instance of MultiThreadManager in Flexile Ascii CC
|
MultiThreadManager(EINode eiNode,
EITransport[] transport,
DCStreamHandler[] dcStHandls,
int numThreads,
SynchronizedDirectory sd_localDir,
java.lang.String suffix)
Constructor used to create an instance of MultiThreadManager
in Ascii CC, if using Ftp to pull the files
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Vector |
getFiles() |
protected void |
initConfig() |
boolean |
isHealthy() |
boolean |
isLessThan(java.lang.String value1,
java.lang.String value2) |
boolean |
recoveryFileExists(java.io.File file) |
void |
run() |
void |
shutdown() |
java.lang.String[] |
sortFiles(java.lang.String[] filesToProcess) |
void |
waitIfThreadsProcessing() |
protected EITransport[] transport
protected DCStreamHandler[] dcStHandls
protected EINode eiNode
protected LoggerIfc logger
protected static final java.lang.String BINARY_FTP_TRANSER
protected static final java.lang.String DEFAULT_SUFFIX
protected long pollingInterval
protected java.lang.String localFileRegExp
protected java.lang.String localFileSuffix
protected java.lang.String localFilePrefix
protected java.lang.String filePatternMode
protected boolean useFtp
protected boolean useSynchronizedDirectory
protected boolean fileLevelTransaction
protected SynchronizedDirectory sd_localDir
protected java.io.File localDir
protected java.io.FilenameFilter actFilter
protected FtpEIManager ftpManager
protected int numberOfThreads
protected boolean ftp
protected java.lang.String[] name
protected FtpFileTracker ftpFileTracker
protected SMGLock ioLock
protected FileEIDuplicateCheck fileduplicateCheck
protected static final java.lang.String RECOVERY_FILE_SUFFIX
protected boolean fdChecked
protected boolean deleteLocalFiles
protected boolean keepTrackOfFiles
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, FtpFileTracker tracker, SMGLock lock) throws NodeStartException
eiNode
- Specifies the EINode using this MultiThreadManagertransport
- Array or transport - processing threadsdcStHandls
- Array of DCStreamHandlersnumThreads
- Number of processing threadstracker
- FtpFileTracker used to keep track of files that have been retrieved from a specific FTP serverlock
- Used to have synchronized access on FtpFileTrackerNodeStartException
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, java.io.File localDir, java.lang.String suffix) throws NodeStartException
eiNode
- Specifies the EINode using this MultiThreadManagertransport
- Array or transport - processing threadsdcStHandls
- Array of DCStreamHandlersnumThreads
- Number of processing threadslocalDir
- Local Directory from which files are processedsuffix
- User-specified local file suffixNodeStartException
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, SynchronizedDirectory sd_localDir, java.lang.String suffix) throws NodeStartException
eiNode
- Specifies the EINode using this MultiThreadManagertransport
- Array or transport - processing threadsdcStHandls
- Array of DCStreamHandlersnumThreads
- Number of processing threadssd_localDir
- Synchronized Directory from which files are processedsuffix
- User-specified local file suffixNodeStartException
protected void initConfig() throws NodeStartException
NodeStartException
public void run()
run
in interface java.lang.Runnable
protected java.util.Vector getFiles()
public void shutdown()
public boolean isHealthy()
public java.lang.String[] sortFiles(java.lang.String[] filesToProcess)
public boolean isLessThan(java.lang.String value1, java.lang.String value2)
public void waitIfThreadsProcessing()
public boolean recoveryFileExists(java.io.File file)