Package com.metasolv.nm.collector.file
Class MultiThreadManager
java.lang.Object
com.metasolv.nm.collector.file.MultiThreadManager
- All Implemented Interfaces:
Runnable
- Since:
- release specific (what release of product did this appear in)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DirectoryStream.Filter
<Path> protected static final String
protected DCStreamHandler[]
protected static final String
protected boolean
protected EINode
protected boolean
protected FileEIDuplicateCheck
protected boolean
protected String
protected boolean
protected FtpFileTracker
protected FtpEIManager
protected com.nt.common.util.SMGLock
protected boolean
protected File
protected String
protected String
protected String
protected LoggerIfc
protected String[]
protected int
protected long
protected static final String
protected SynchronizedDirectory
protected EITransport[]
protected boolean
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionMultiThreadManager
(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, FtpFileTracker tracker, com.nt.common.util.SMGLock lock) Constructor used to create an instance of MultiThreadManager in Flexile Ascii CCMultiThreadManager
(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, SynchronizedDirectory sd_localDir, String suffix) Constructor used to create an instance of MultiThreadManager in Ascii CC, if using Ftp to pull the filesMultiThreadManager
(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, File localDir, String suffix) Constructor used to create an instance of MultiThreadManager in Ascii CC, if files are pushed to a local directory -
Method Summary
Modifier and TypeMethodDescriptionprotected Vector
getFiles()
protected void
boolean
boolean
isLessThan
(String value1, String value2) boolean
recoveryFileExists
(File file) void
run()
void
shutdown()
String[]
void
-
Field Details
-
transport
-
dcStHandls
-
eiNode
-
logger
-
BINARY_FTP_TRANSER
- See Also:
-
DEFAULT_SUFFIX
- See Also:
-
pollingInterval
protected long pollingInterval -
localFileRegExp
-
localFileSuffix
-
localFilePrefix
-
filePatternMode
-
useFtp
protected boolean useFtp -
useSynchronizedDirectory
protected boolean useSynchronizedDirectory -
fileLevelTransaction
protected boolean fileLevelTransaction -
sd_localDir
-
localDir
-
actFilter
-
ftpManager
-
numberOfThreads
protected int numberOfThreads -
ftp
protected boolean ftp -
name
-
ftpFileTracker
-
ioLock
protected com.nt.common.util.SMGLock ioLock -
fileduplicateCheck
-
RECOVERY_FILE_SUFFIX
- See Also:
-
fdChecked
protected boolean fdChecked -
deleteLocalFiles
protected boolean deleteLocalFiles -
keepTrackOfFiles
protected boolean keepTrackOfFiles
-
-
Constructor Details
-
MultiThreadManager
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, FtpFileTracker tracker, com.nt.common.util.SMGLock lock) throws NodeStartException Constructor used to create an instance of MultiThreadManager in Flexile Ascii CC- Parameters:
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 FtpFileTracker- Throws:
NodeStartException
-
MultiThreadManager
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, File localDir, String suffix) throws NodeStartException Constructor used to create an instance of MultiThreadManager in Ascii CC, if files are pushed to a local directory- Parameters:
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 suffix- Throws:
NodeStartException
-
MultiThreadManager
public MultiThreadManager(EINode eiNode, EITransport[] transport, DCStreamHandler[] dcStHandls, int numThreads, SynchronizedDirectory sd_localDir, String suffix) throws NodeStartException Constructor used to create an instance of MultiThreadManager in Ascii CC, if using Ftp to pull the files- Parameters:
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 suffix- Throws:
NodeStartException
-
-
Method Details
-
initConfig
- Throws:
NodeStartException
-
run
public void run() -
getFiles
-
shutdown
public void shutdown() -
isHealthy
public boolean isHealthy() -
sortFiles
-
isLessThan
-
waitIfThreadsProcessing
public void waitIfThreadsProcessing() -
recoveryFileExists
-