- java.lang.Object
-
- com.microsoft.gctoolkit.io.FileDataSource<String>
-
- com.microsoft.gctoolkit.io.GCLogFile
-
- com.microsoft.gctoolkit.io.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.
-
-
Field Summary
-
Fields inherited from class com.microsoft.gctoolkit.io.GCLogFile
END_OF_DATA_SENTINEL
-
Fields inherited from class com.microsoft.gctoolkit.io.FileDataSource
path
-
-
Constructor Summary
Constructors Constructor Description RotatingGCLogFile(Path path)Use the given path to find rotating log files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogFileMetadatagetMetaData()Return meta data about the file.List<LogFileSegment>getOrderedGarbageCollectionLogFiles()TheGCLogFileSegments in rotating order.Stream<String>stream()Return a stream of the data.-
Methods inherited from class com.microsoft.gctoolkit.io.GCLogFile
diary, endOfData, getJavaVirtualMachine, isUnified
-
Methods inherited from class com.microsoft.gctoolkit.io.FileDataSource
getPath, toString
-
-
-
-
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
-
getMetaData
public LogFileMetadata getMetaData() throws IOException
Description copied from class:FileDataSourceReturn meta data about the file.- Specified by:
getMetaDatain classFileDataSource<String>- Returns:
- Meta data about the file.
- Throws:
IOException- when there is an issue generating the diary
-
stream
public Stream<String> stream() throws IOException
Description copied from interface:DataSourceReturn 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
TheGCLogFileSegments 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
-
-