Class FilesystemMetadataResolver

    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
      • metadataFile

        @Nonnull
        private File metadataFile
        The metadata file.
    • Constructor Detail

      • FilesystemMetadataResolver

        public FilesystemMetadataResolver​(@Nonnull
                                          File metadata)
                                   throws ResolverException
        Constructor.
        Parameters:
        metadata - the metadata file
        Throws:
        ResolverException - this exception is no longer thrown
      • FilesystemMetadataResolver

        public FilesystemMetadataResolver​(@Nullable
                                          Timer backgroundTaskTimer,
                                          @Nonnull
                                          File metadata)
                                   throws ResolverException
        Constructor.
        Parameters:
        metadata - the metadata file
        backgroundTaskTimer - timer used to refresh metadata in the background
        Throws:
        ResolverException - this exception is no longer thrown
    • Method Detail

      • setMetadataFile

        protected void setMetadataFile​(@Nonnull
                                       File file)
                                throws ResolverException
        Sets the file from which metadata is read.
        Parameters:
        file - path to the metadata file
        Throws:
        ResolverException - this exception is no longer thrown
      • getMetadataIdentifier

        protected String getMetadataIdentifier()
        Gets an identifier which may be used to distinguish this metadata in logging statements.
        Specified by:
        getMetadataIdentifier in class AbstractReloadingMetadataResolver
        Returns:
        identifier which may be used to distinguish this metadata in logging statements
      • validateMetadataFile

        protected void validateMetadataFile​(@Nonnull
                                            File file)
                                     throws ResolverException
        Validate the basic properties of the specified metadata file, for example that it exists; that it is a file; and that it is readable.
        Parameters:
        file - the file to evaluate
        Throws:
        ResolverException - if file does not pass basic properties required of a metadata file