public abstract class AbstractRemoteSegmentArchiveReader extends Object implements org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReader
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
hasGraph |
protected Map<UUID,RemoteSegmentArchiveEntry> |
index |
protected org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor |
ioMonitor |
| Constructor and Description |
|---|
AbstractRemoteSegmentArchiveReader(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract File |
archivePathAsFile()
Returns the decoded file component of this archive.
|
void |
close() |
protected abstract long |
computeArchiveIndexAndLength()
Populates the archive index, summing up each entry's length.
|
boolean |
containsSegment(long msb,
long lsb) |
protected abstract org.apache.jackrabbit.oak.commons.Buffer |
doReadDataFile(String extension)
Reads a data file inside the archive.
|
protected abstract void |
doReadSegmentToBuffer(String segmentFileName,
org.apache.jackrabbit.oak.commons.Buffer buffer)
Reads the segment from the remote storage.
|
org.apache.jackrabbit.oak.commons.Buffer |
getBinaryReferences() |
int |
getEntrySize(int size) |
org.apache.jackrabbit.oak.commons.Buffer |
getGraph() |
boolean |
hasGraph() |
List<org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveEntry> |
listSegments() |
org.apache.jackrabbit.oak.commons.Buffer |
readSegment(long msb,
long lsb) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, lengthprotected final org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor
protected final Map<UUID,RemoteSegmentArchiveEntry> index
protected Boolean hasGraph
public AbstractRemoteSegmentArchiveReader(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor) throws IOException
IOExceptionpublic org.apache.jackrabbit.oak.commons.Buffer readSegment(long msb, long lsb) throws IOException
readSegment in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderIOExceptionpublic boolean containsSegment(long msb,
long lsb)
containsSegment in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderpublic List<org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveEntry> listSegments()
listSegments in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderpublic org.apache.jackrabbit.oak.commons.Buffer getGraph() throws IOException
getGraph in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderIOExceptionpublic boolean hasGraph()
hasGraph in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderpublic org.apache.jackrabbit.oak.commons.Buffer getBinaryReferences() throws IOException
getBinaryReferences in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderpublic int getEntrySize(int size)
getEntrySize in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReaderprotected abstract long computeArchiveIndexAndLength()
throws IOException
IOExceptionprotected abstract void doReadSegmentToBuffer(String segmentFileName, org.apache.jackrabbit.oak.commons.Buffer buffer) throws IOException
segmentFileName, - the name of the segment (msb + lsb) prefixed by its position in the archivebuffer, - the buffer to which to readIOExceptionprotected abstract org.apache.jackrabbit.oak.commons.Buffer doReadDataFile(String extension) throws IOException
extension, - extension of the fileIOExceptionprotected abstract File archivePathAsFile()
Copyright © 2012–2021 The Apache Software Foundation. All rights reserved.