Enum ActionOnFile

java.lang.Object
java.lang.Enum<ActionOnFile>
org.apache.drill.exec.util.ActionOnFile
All Implemented Interfaces:
Serializable, Comparable<ActionOnFile>

public enum ActionOnFile extends Enum<ActionOnFile>
Defines possible actions on the file and performs the necessary action
  • Enum Constant Details

    • NONE

      public static final ActionOnFile NONE
      No action will be performed
    • RENAME

      public static final ActionOnFile RENAME
      Renames the file by adding current timestamp value with "yyyyMMdd_HHmmss" format before last dot of original file name

      Example:
      Original file name: "storage-plugins-override.conf"
      New file name: "storage-plugins-override-20180703_033354.conf"

    • REMOVE

      public static final ActionOnFile REMOVE
      Removes the file
  • Method Details

    • values

      public static ActionOnFile[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ActionOnFile valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • action

      public abstract void action(URL url)
      Action which should be performed on the file
      Parameters:
      url - the file URL