Class BinaryLogFileManager

java.lang.Object
com.illumon.iris.logfilemanager.BinaryLogFileManager
Direct Known Subclasses:
DateBinaryLogFileManager, StandardBinaryLogFileManager

public abstract class BinaryLogFileManager extends Object
Abstract class providing base logic and required methods to be implemented for classes which determine column partition information for binary log files. Any implementation must include a constructor which takes the same parameters as BinaryLogFileManager(Logger, DataRoutingService, LogtailerConfiguration.ConfigurationEntry, LogtailerMain.LogtailerRunDetails, LogtailerDestinationThrottles). That constructor should call this constructor with super(...).
  • Field Details

    • logDetails

      protected final String logDetails
  • Method Details

    • findAndSetMatchingFiles

      protected File[] findAndSetMatchingFiles(BinaryLogFileManager.TableLocationIdentifierStatus tableLocationIdentifierStatus)
      Regenerate and return the matching-files-array for the specified TableLocationIdentifierStatus
      Parameters:
      tableLocationIdentifierStatus - the tableLocationIdentifierStatus for the event that triggered this call
      Returns:
      the current array of matching files for this TableLocationIdentifierStatus
    • getTableLocationIdentifierStatusMap

      This is for testing only.
      Returns:
      the TableLocationIdentifier status map
    • handleFile

      public boolean handleFile(Path newFilePath, boolean isStartup)
      Given a new file, see if it belongs to this BinaryLogFileManager, and if so, handle it. This determination is based on the parsed TableLocationIdentifier for the file.
      Parameters:
      newFilePath - the new file's full Path
      isStartup - if true, this is a file found during startup
      Returns:
      true if the file was consumed by this BinaryLogFileManager
    • requestShutdown

      public void requestShutdown()
      Prevent any new destination threads from being created, and request shutdown on all the existing threads.