Class AzureSegmentArchiveReaderV8
java.lang.Object
org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveReader
org.apache.jackrabbit.oak.segment.azure.v8.AzureSegmentArchiveReaderV8
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SegmentArchiveReader
-
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveReader
hasGraph, index, ioMonitor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AzureSegmentArchiveReaderV8
(com.microsoft.azure.storage.blob.CloudBlobDirectory archiveDirectory, IOMonitor ioMonitor) -
Method Summary
Modifier and TypeMethodDescriptionprotected File
Returns the decoded file component of this archive.protected long
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.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
-
Constructor Details
-
AzureSegmentArchiveReaderV8
protected AzureSegmentArchiveReaderV8(com.microsoft.azure.storage.blob.CloudBlobDirectory archiveDirectory, IOMonitor ioMonitor) throws IOException - Throws:
IOException
-
-
Method Details
-
length
public long length()Description copied from interface:SegmentArchiveReader
Get the current length of the archive.- Returns:
- length of the archive, in bytes
-
getName
Description copied from interface:SegmentArchiveReader
Get the name of the archive.- Returns:
- archive name
-
computeArchiveIndexAndLength
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
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
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
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.
-