Class RotatingGCLogFile

  • All Implemented Interfaces:
    DataSource<String>

    public class RotatingGCLogFile
    extends GCLogFile
    A collection of rotating GC log files. The collection will contain only those files that can be considered contiguous. The log file segments are ordered, with the current or newest file first.
    • Constructor Detail

      • RotatingGCLogFile

        public RotatingGCLogFile​(Path path)
        Use the given path to find rotating log files. If the path is a file, the file name is used to match other files in the directory. If the path is a directory, all files in the directory are considered.
        Parameters:
        path - the path to a rotating log file, or to a directory containing rotating log files.
    • Method Detail

      • stream

        public Stream<String> stream()
                              throws IOException
        Description copied from interface: DataSource
        Return a stream of the data.
        Returns:
        A stream of the data.
        Throws:
        IOException - Thrown if the data cannot be streamed, or an IOException is raised while streaming.
      • getOrderedGarbageCollectionLogFiles

        public List<LogFileSegment> getOrderedGarbageCollectionLogFiles()
                                                                 throws IOException
        The GCLogFileSegments in rotating order. Note that only the contiguous log file segments are included. Therefore, the number of log file segments may be less than the files that match the rotating pattern.
        Returns:
        The log file segments in rotating order.
        Throws:
        IOException - when there is an IO exception