Class MultiThreadManager

java.lang.Object
com.metasolv.nm.collector.file.MultiThreadManager
All Implemented Interfaces:
Runnable

public class MultiThreadManager extends Object implements Runnable
Since:
release specific (what release of product did this appear in)
  • Field Details

    • transport

      protected EITransport[] transport
    • dcStHandls

      protected DCStreamHandler[] dcStHandls
    • eiNode

      protected EINode eiNode
    • logger

      protected LoggerIfc logger
    • BINARY_FTP_TRANSER

      protected static final String BINARY_FTP_TRANSER
      See Also:
    • DEFAULT_SUFFIX

      protected static final String DEFAULT_SUFFIX
      See Also:
    • pollingInterval

      protected long pollingInterval
    • localFileRegExp

      protected String localFileRegExp
    • localFileSuffix

      protected String localFileSuffix
    • localFilePrefix

      protected String localFilePrefix
    • filePatternMode

      protected String filePatternMode
    • useFtp

      protected boolean useFtp
    • useSynchronizedDirectory

      protected boolean useSynchronizedDirectory
    • fileLevelTransaction

      protected boolean fileLevelTransaction
    • sd_localDir

      protected SynchronizedDirectory sd_localDir
    • localDir

      protected File localDir
    • actFilter

      protected DirectoryStream.Filter<Path> actFilter
    • ftpManager

      protected FtpEIManager ftpManager
    • numberOfThreads

      protected int numberOfThreads
    • ftp

      protected boolean ftp
    • name

      protected String[] name
    • ftpFileTracker

      protected FtpFileTracker ftpFileTracker
    • ioLock

      protected com.nt.common.util.SMGLock ioLock
    • fileduplicateCheck

      protected FileEIDuplicateCheck fileduplicateCheck
    • RECOVERY_FILE_SUFFIX

      protected static final String 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 MultiThreadManager
      transport - Array or transport - processing threads
      dcStHandls - Array of DCStreamHandlers
      numThreads - Number of processing threads
      tracker - FtpFileTracker used to keep track of files that have been retrieved from a specific FTP server
      lock - 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 MultiThreadManager
      transport - Array or transport - processing threads
      dcStHandls - Array of DCStreamHandlers
      numThreads - Number of processing threads
      localDir - Local Directory from which files are processed
      suffix - 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 MultiThreadManager
      transport - Array or transport - processing threads
      dcStHandls - Array of DCStreamHandlers
      numThreads - Number of processing threads
      sd_localDir - Synchronized Directory from which files are processed
      suffix - User-specified local file suffix
      Throws:
      NodeStartException
  • Method Details

    • initConfig

      protected void initConfig() throws NodeStartException
      Throws:
      NodeStartException
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • getFiles

      protected Vector getFiles()
    • shutdown

      public void shutdown()
    • isHealthy

      public boolean isHealthy()
    • sortFiles

      public String[] sortFiles(String[] filesToProcess)
    • isLessThan

      public boolean isLessThan(String value1, String value2)
    • waitIfThreadsProcessing

      public void waitIfThreadsProcessing()
    • recoveryFileExists

      public boolean recoveryFileExists(File file)