Package alluxio.conf

Class DeprecatedKeyChecker


  • public class DeprecatedKeyChecker
    extends java.lang.Object
    This annotation checker should be used to determine whether a PropertyKey or PropertyKey.Template has a given annotation. The class is mainly useful to check for Deprecated annotations on property keys and return the associated message, if any.
    • Constructor Detail

      • DeprecatedKeyChecker

        public DeprecatedKeyChecker()
        Create a new instance of DeprecatedKeyChecker.
    • Method Detail

      • hasAnnotation

        public boolean hasAnnotation​(PropertyKey key)
        Returns whether or not the given property key is marked by this class' annotation. It first checks if the specific key has the annotation, otherwise it will fall back to checking if the key's name matches any of the PropertyKey templates. If no keys or templates match, it will return false. This will only return true when the key is marked with a Deprecated annotation.
        Parameters:
        key - the property key to check
        Returns:
        if this property key is deprecated
        See Also:
        Deprecated, PropertyKey.getDeprecationMessage(PropertyKey)
      • getAnnotation

        @Nullable
        public Deprecated getAnnotation​(PropertyKey key)
        Returns the annotation attached to the given property key.
        Parameters:
        key - the key to get the annotation for
        Returns:
        the annotation if it exists, null otherwise