Class AzureSegmentArchiveReader
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveReader
-
- org.apache.jackrabbit.oak.segment.azure.AzureSegmentArchiveReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SegmentArchiveReader
public class AzureSegmentArchiveReader extends AbstractRemoteSegmentArchiveReader
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveReader
hasGraph, index, ioMonitor
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected File
archivePathAsFile()
Returns the decoded file component of this archive.protected long
computeArchiveIndexAndLength()
Populates the archive index, summing up each entry's length.protected Buffer
doReadDataFile(String extension)
Reads a data file inside the archive.protected void
doReadSegmentToBuffer(String segmentFileName, Buffer buffer)
Reads the segment from the remote storage.String
getName()
Get the name of the archive.long
length()
Get the current length of the archive.-
Methods inherited from class org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveReader
close, containsSegment, getBinaryReferences, getEntrySize, getGraph, hasGraph, isRemote, listSegments, readSegment
-
-
-
-
Method Detail
-
length
public long length()
Description copied from interface:SegmentArchiveReader
Get the current length of the archive.- Returns:
- length of the archive, in bytes
-
getName
public String getName()
Description copied from interface:SegmentArchiveReader
Get the name of the archive.- Returns:
- archive name
-
computeArchiveIndexAndLength
protected long computeArchiveIndexAndLength() throws IOException
Description copied from class:AbstractRemoteSegmentArchiveReader
Populates the archive index, summing up each entry's length.- Specified by:
computeArchiveIndexAndLength
in classAbstractRemoteSegmentArchiveReader
- Returns:
- length, the total length of the archive
- Throws:
IOException
-
doReadSegmentToBuffer
protected void doReadSegmentToBuffer(String segmentFileName, Buffer buffer) throws IOException
Description copied from class:AbstractRemoteSegmentArchiveReader
Reads the segment from the remote storage.- Specified by:
doReadSegmentToBuffer
in classAbstractRemoteSegmentArchiveReader
- Parameters:
segmentFileName
- , the name of the segment (msb + lsb) prefixed by its position in the archivebuffer
- , the buffer to which to read- Throws:
IOException
-
doReadDataFile
protected Buffer doReadDataFile(String extension) throws IOException
Description copied from class:AbstractRemoteSegmentArchiveReader
Reads a data file inside the archive. This entry is not a segment. Its full name is given by archive name + extension.- Specified by:
doReadDataFile
in classAbstractRemoteSegmentArchiveReader
- Parameters:
extension
- , extension of the file- Returns:
- the buffer containing the data file bytes
- Throws:
IOException
-
archivePathAsFile
protected File archivePathAsFile()
Description copied from class:AbstractRemoteSegmentArchiveReader
Returns the decoded file component of this archive.- Specified by:
archivePathAsFile
in classAbstractRemoteSegmentArchiveReader
- Returns:
- the decoded file component of this archive.
-
-