Class FileDependency

  • All Implemented Interfaces:
    java.io.Serializable

    public class FileDependency
    extends CacheDependency
    FileDependency class is used to provide file based dependency to the user. If items are dependent on that file the items will be removed on file update.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FileDependency​(java.lang.Iterable<java.lang.String> fileNames)
      Initializes a new instance of the FileExpiration class that monitors a list of file paths (to files or directories) for changes.
      FileDependency​(java.lang.Iterable<java.lang.String> fileNames, java.util.Date startAfter)
      Initializes a new instance of the FileExpiration class that monitors an list of file paths (to files or directories) for changes and specifies a time when change monitoring begins.
      FileDependency​(java.lang.String fileName)
      Initializes a new instance of the FileExpiration class that monitors a file or directory for changes.
      FileDependency​(java.lang.String fileName, java.util.Date startAfter)
      Initializes a new instance of the FileExpiration class that monitors a file or directory for changes and indicates when change tracking is to begin.
    • Constructor Detail

      • FileDependency

        public FileDependency​(java.lang.String fileName)
                       throws OperationFailedException
        Initializes a new instance of the FileExpiration class that monitors a file or directory for changes.
        Parameters:
        fileName - The filename along with the path that is to be monitored.
        Throws:
        OperationFailedException
      • FileDependency

        public FileDependency​(java.lang.Iterable<java.lang.String> fileNames)
                       throws OperationFailedException
        Initializes a new instance of the FileExpiration class that monitors a list of file paths (to files or directories) for changes.
        Parameters:
        fileNames - The file names that are to be monitored.
        Throws:
        OperationFailedException
      • FileDependency

        public FileDependency​(java.lang.String fileName,
                              java.util.Date startAfter)
                       throws OperationFailedException
        Initializes a new instance of the FileExpiration class that monitors a file or directory for changes and indicates when change tracking is to begin.
        Parameters:
        fileName - The filename along with the path that is to be monitored.
        startAfter - The time after which the file will be monitored.
        Throws:
        OperationFailedException
      • FileDependency

        public FileDependency​(java.lang.Iterable<java.lang.String> fileNames,
                              java.util.Date startAfter)
                       throws OperationFailedException
        Initializes a new instance of the FileExpiration class that monitors an list of file paths (to files or directories) for changes and specifies a time when change monitoring begins.
        Parameters:
        fileNames - The file names that are to be monitored.
        startAfter - The time after which the file/files will be monitored.
        Throws:
        OperationFailedException
    • Method Detail

      • getFileNames

        public java.util.Collection<java.lang.String> getFileNames()
        Gets the list of file names.
        Returns:
        The list of file names associated with the dependency.
      • getStartAfterTicks

        public long getStartAfterTicks()
        Gets the time after which dependency is to be started.
        Returns:
        The ticks after which dependency is starated.