Class ChangedList

    • Method Detail

      • getInstance

        public static ChangedList getInstance()
      • setFileExclusionManager

        public void setFileExclusionManager​(FileExclusionManager fileExclusionManager)
      • addChangedFile

        public boolean addChangedFile​(File changedFile)
        Adds a changed file to the list of items to be processed. If the file happens to match exclusion rules it will not be added to the list (and the method will return false). Note that only the most current update to any given file is provided to the change processor.
        Parameters:
        changedFile - a file which has changed on the file system
        Returns:
        false if the changedFile is null or matches at least one exclusion rule.
      • getListSize

        public int getListSize()
        Gets the current size of the changed list
        Returns:
        the size of the list
      • getListSizeIncludingReservedFiles

        public int getListSizeIncludingReservedFiles()
        Gets the current size of the changed list included the files that have been reserved
        Returns:
        the size of the list
      • fireChangedEvent

        protected void fireChangedEvent()
      • fireChangedEventAsync

        protected void fireChangedEventAsync()
      • clear

        public void clear()
        Removes all files from the changed list.
      • reserve

        public ChangedFile reserve()
        Retrieves a changed file for processing and removes it from the list of unreserved files. Returns null if there are no changed files in the list.
        Returns:
        a file which has changed on the file system
      • getVersion

        public long getVersion()
      • persist

        public long persist​(File persistFile)
        Writes out the current state of the ChangeList to the given file.
        Parameters:
        persistFile - file to write state to
        Returns:
        the version ID of the ChangedList which was persisted
      • restore

        public void restore​(File persistFile,
                            List<File> contentDirs)
        Restores the state of the ChangedList using the given backup file
        Parameters:
        persistFile - file containing previous state
        contentDirs - content directories currently configured.
      • peek

        public List<File> peek​(int maxFiles)
      • shutdown

        public void shutdown()