Class FileSizeChange

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class FileSizeChange
    extends AbstractFileUseCheck
    Checks the file size before and after the specified wait interval. If the sizes differ, then the file is considered to be in use.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -min-size <long> (property: minSize)
        The minimum size that the file must have; below is considered in use.
        default: 1
        minimum: 1
     
    -interval <int> (property: interval)
        The wait interval in msec between before/after file size checks.
        default: 100
        minimum: 1
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_MinSize

        protected long m_MinSize
        the minimum file size.
      • m_Interval

        protected int m_Interval
        the interval in msec to wait.
    • Constructor Detail

      • FileSizeChange

        public FileSizeChange()
    • Method Detail

      • setMinSize

        public void setMinSize​(long value)
        Sets the minimum file size in bytes.
        Parameters:
        value - the size
      • getMinSize

        public long getMinSize()
        Returns the wait interval in msec.
        Returns:
        the size
      • minSizeTipText

        public String minSizeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setInterval

        public void setInterval​(int value)
        Sets the wait interval in msec.
        Parameters:
        value - the interval
      • getInterval

        public int getInterval()
        Returns the wait interval in msec.
        Returns:
        the interval
      • intervalTipText

        public String intervalTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • isInUse

        public boolean isInUse​(File file)
        Checks whether the file is in use.
        Specified by:
        isInUse in class AbstractFileUseCheck
        Parameters:
        file - the file to check
        Returns:
        true if in use