Class FileDataSource<T>

  • Type Parameters:
    T - The type of data returned from the DataSource
    All Implemented Interfaces:
    DataSource<T>
    Direct Known Subclasses:
    GCLogFile

    public abstract class FileDataSource<T>
    extends Object
    implements DataSource<T>
    A DataSource rooted in a file system.
    • Field Detail

      • path

        protected final Path path
    • Constructor Detail

      • FileDataSource

        protected FileDataSource​(Path path)
        Subclass only.
        Parameters:
        path - The path to the file in the file system.
    • Method Detail

      • diary

        public abstract Diary diary()
                             throws IOException
        The Diary contains a summary of important properties of the log that will be used in orchestrating the setup and configuration of the internal components of GCToolkit.
        Specified by:
        diary in interface DataSource<T>
        Returns:
        a diary.
        Throws:
        IOException - if there is an issue generating the diary
      • getPath

        public Path getPath()
        Return the path to the file in the file system.
        Returns:
        The path to the file in the file system.
      • getMetaData

        public abstract LogFileMetadata getMetaData()
                                             throws IOException
        Return meta data about the file.
        Returns:
        Meta data about the file.
        Throws:
        IOException - when there is an issue generating the diary
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        Returns this.getPath().toString();