Class AwsSegmentArchiveWriter
java.lang.Object
org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveWriter
org.apache.jackrabbit.oak.segment.aws.AwsSegmentArchiveWriter
- All Implemented Interfaces:
SegmentArchiveWriter
-
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveWriter
created, entries, index, ioMonitor, monitor, queue, totalLength, writeAccessController
-
Constructor Summary
ConstructorsConstructorDescriptionAwsSegmentArchiveWriter
(S3Directory directory, String archiveName, IOMonitor ioMonitor, FileStoreMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Hook for executing additional actions after the segment write queue is closed.protected void
Hook for executing additional actions after the segment write queue is flushed.protected Buffer
doReadArchiveEntry
(RemoteSegmentArchiveEntry indexEntry) Reads a segment from remote storage into a buffer.protected void
doWriteArchiveEntry
(RemoteSegmentArchiveEntry indexEntry, byte[] data, int offset, int size) Writes a segment to the remote storage.protected void
doWriteDataFile
(byte[] data, String extension) Writes a data file inside the archive.getName()
Get the name of the archive.Methods inherited from class org.apache.jackrabbit.oak.segment.remote.AbstractRemoteSegmentArchiveWriter
close, containsSegment, flush, getEntryCount, getLength, getMaxEntryCount, isCreated, isRemote, readSegment, writeBinaryReferences, writeDataFile, writeGraph, writeSegment
-
Constructor Details
-
AwsSegmentArchiveWriter
public AwsSegmentArchiveWriter(S3Directory directory, String archiveName, IOMonitor ioMonitor, FileStoreMonitor monitor)
-
-
Method Details
-
getName
Description copied from interface:SegmentArchiveWriter
Get the name of the archive.- Returns:
- archive name
-
doWriteArchiveEntry
protected void doWriteArchiveEntry(RemoteSegmentArchiveEntry indexEntry, byte[] data, int offset, int size) throws IOException Description copied from class:AbstractRemoteSegmentArchiveWriter
Writes a segment to the remote storage.- Specified by:
doWriteArchiveEntry
in classAbstractRemoteSegmentArchiveWriter
- Parameters:
indexEntry
- , the archive index entry to writedata
- , the actual bytes in the entryoffset
- , the start offset in the data.size
- , the number of bytes to write.- Throws:
IOException
-
doReadArchiveEntry
Description copied from class:AbstractRemoteSegmentArchiveWriter
Reads a segment from remote storage into a buffer.- Specified by:
doReadArchiveEntry
in classAbstractRemoteSegmentArchiveWriter
- Parameters:
indexEntry
- , the archive index entry to read- Returns:
- th buffer containing the segment bytes
- Throws:
IOException
-
doWriteDataFile
Description copied from class:AbstractRemoteSegmentArchiveWriter
Writes a data file inside the archive. This entry is not a segment. Its full name is given by archive name + extension.- Specified by:
doWriteDataFile
in classAbstractRemoteSegmentArchiveWriter
- Parameters:
data
- , bytes to writeextension
- , the extension of the data file- Throws:
IOException
-
afterQueueClosed
Description copied from class:AbstractRemoteSegmentArchiveWriter
Hook for executing additional actions after the segment write queue is closed.- Specified by:
afterQueueClosed
in classAbstractRemoteSegmentArchiveWriter
- Throws:
IOException
-
afterQueueFlushed
Description copied from class:AbstractRemoteSegmentArchiveWriter
Hook for executing additional actions after the segment write queue is flushed.- Specified by:
afterQueueFlushed
in classAbstractRemoteSegmentArchiveWriter
- Throws:
IOException
-