Class AzureArchiveManagerV8

java.lang.Object
org.apache.jackrabbit.oak.segment.azure.v8.AzureArchiveManagerV8
All Implemented Interfaces:
org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager

public class AzureArchiveManagerV8 extends Object implements org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.microsoft.azure.storage.blob.CloudBlobDirectory
     
    protected final org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor
     
    protected final org.apache.jackrabbit.oak.segment.spi.monitor.FileStoreMonitor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AzureArchiveManagerV8(com.microsoft.azure.storage.blob.CloudBlobDirectory segmentstoreDirectory, org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor, org.apache.jackrabbit.oak.segment.spi.monitor.FileStoreMonitor fileStoreMonitor, org.apache.jackrabbit.oak.segment.remote.WriteAccessController writeAccessController)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    backup(@NotNull String archiveName, @NotNull String backupArchiveName, @NotNull Set<UUID> recoveredEntries)
    Method is not deleting segments from the directory given with archiveName, if they are in the set of recovered segments.
    void
    copyFile(String from, String to)
     
    org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveWriter
    create(String archiveName)
     
    boolean
    delete(String archiveName)
     
    boolean
    exists(String archiveName)
     
    org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReader
    forceOpen(String archiveName)
     
    protected com.microsoft.azure.storage.blob.CloudBlobDirectory
    getDirectory(String archiveName)
     
     
    org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReader
    open(String archiveName)
     
    void
    recoverEntries(String archiveName, LinkedHashMap<UUID,byte[]> entries)
     
    boolean
    renameTo(String from, String to)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cloudBlobDirectory

      protected final com.microsoft.azure.storage.blob.CloudBlobDirectory cloudBlobDirectory
    • ioMonitor

      protected final org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor
    • monitor

      protected final org.apache.jackrabbit.oak.segment.spi.monitor.FileStoreMonitor monitor
  • Constructor Details

    • AzureArchiveManagerV8

      public AzureArchiveManagerV8(com.microsoft.azure.storage.blob.CloudBlobDirectory segmentstoreDirectory, org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor ioMonitor, org.apache.jackrabbit.oak.segment.spi.monitor.FileStoreMonitor fileStoreMonitor, org.apache.jackrabbit.oak.segment.remote.WriteAccessController writeAccessController)
  • Method Details

    • listArchives

      public List<String> listArchives() throws IOException
      Specified by:
      listArchives in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • open

      public org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReader open(String archiveName) throws IOException
      Specified by:
      open in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • forceOpen

      public org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveReader forceOpen(String archiveName) throws IOException
      Specified by:
      forceOpen in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • create

      public org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveWriter create(String archiveName) throws IOException
      Specified by:
      create in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • delete

      public boolean delete(String archiveName)
      Specified by:
      delete in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
    • renameTo

      public boolean renameTo(String from, String to)
      Specified by:
      renameTo in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
    • copyFile

      public void copyFile(String from, String to) throws IOException
      Specified by:
      copyFile in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • exists

      public boolean exists(String archiveName)
      Specified by:
      exists in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
    • recoverEntries

      public void recoverEntries(String archiveName, LinkedHashMap<UUID,byte[]> entries) throws IOException
      Specified by:
      recoverEntries in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • backup

      public void backup(@NotNull @NotNull String archiveName, @NotNull @NotNull String backupArchiveName, @NotNull @NotNull Set<UUID> recoveredEntries) throws IOException
      Method is not deleting segments from the directory given with archiveName, if they are in the set of recovered segments. Reason for that is because during execution of this method, remote repository can be accessed by another application, and deleting a valid segment can cause consistency issues there.
      Specified by:
      backup in interface org.apache.jackrabbit.oak.segment.spi.persistence.SegmentArchiveManager
      Throws:
      IOException
    • getDirectory

      protected com.microsoft.azure.storage.blob.CloudBlobDirectory getDirectory(String archiveName) throws IOException
      Throws:
      IOException