public final class LogSegmentPath extends Object
LogSegmentStartEnd with a Path.
This is a value-based class.| 限定符和类型 | 方法和说明 |
|---|---|
static List<LogSegmentPath> |
getLogSegmentPaths(RaftStorage storage)
Get a list of
LogSegmentPath from the given storage. |
Path |
getPath() |
LogSegmentStartEnd |
getStartEnd() |
static LogSegmentPath |
matchLogSegment(Path path)
Match the given path with the
LogSegmentStartEnd.getClosedSegmentPattern()
or the LogSegmentStartEnd.getOpenSegmentPattern(). |
String |
toString() |
public Path getPath()
public LogSegmentStartEnd getStartEnd()
public static List<LogSegmentPath> getLogSegmentPaths(RaftStorage storage) throws IOException
LogSegmentPath from the given storage.IOExceptionpublic static LogSegmentPath matchLogSegment(Path path)
LogSegmentStartEnd.getClosedSegmentPattern()
or the LogSegmentStartEnd.getOpenSegmentPattern().
Note that if the path is a zero size open segment, this method will try to delete it.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.