Interface IResultsStore


  • public interface IResultsStore
    Loads and saves results that are stored.
    Results are stored in metadata of profiling plugin.
    • Method Detail

      • saveResults

        void saveResults​(List<IProfilingResult> results,
                         Path path)
        Saves results to the specified directory. path should specify an existing directory. If the directory does not exist or path identifies a file, then the exception is thrown.
        If the path identifies an existing directory, then the results are saved in it without clearing the directory.
        If any of passed profiling result is named, then it will be stored in directory with the same name. Otherwise it will be stored in directory with the name being the string representation of result UUID.
        If the name of created directory for any result conflicts with the name of any folders contained in the directory to save result into, then that result will be saved in that folder and the files contained in that folder will remain untouched (unless they are named like the storage files; in that case they will be overwritten).
        Parameters:
        results - List with results to be saved. Cannot be null.
        path - Path specifying a directory to save results to. Cannot be null and should specify an existing directory.
        Throws:
        NullPointerException - if any of arguments is null.
        IllegalArgumentException - if the specified path defines a file instead of directory or directory that does not exist.
      • saveResult

        void saveResult​(IProfilingResult result,
                        Path path)
        Saves a single result to the specified directory. path should specify an existing directory. If the directory does not exist or path identifies a file, then the exception is thrown.
        If the path identifies an existing directory, then the results are saved in it without clearing the directory.
        If result is named, then it will be stored in directory with the same name. Otherwise it will be stored in directory with the name being the string representation of its UUID.
        If the name of created directory conflicts with the name of any folders contained in the directory to save result into, then result will be saved in that folder and the files contained in that folder will remain untouched (unless they are named like the storage files; in that case they will be overwritten).
        Parameters:
        results - Result to be saved. Cannot be null.
        path - Path specifying a directory to save result to. Cannot be null and should specify an existing directory.
        Throws:
        NullPointerException - if any of arguments is null.
        IllegalArgumentException - if the specified path defines a file instead of directory or directory that does not exist.
      • loadResults

        List<IProfilingResult> loadResults​(Path path)
        Loads results from the specified directory. path should specify an existing directory. If the directory does not exist or path identifies a file, then the exception is thrown. Results in returned list are sorted by date of profiling sessions.
        Parameters:
        path - Path specifying a directory to load results from. Cannot be null and should specify an existing directory.
        Returns:
        List with results loaded from the specified path. Never null, but can be empty if no results are found in directory.
        Throws:
        NullPointerException - if specified path is null.
        IllegalArgumentException - if the specified path defines a file instead of directory or directory that does not exist.