Class TrackingBackupRepository

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.solr.core.backup.repository.BackupRepository, org.apache.solr.util.plugin.NamedListInitializedPlugin

    public class TrackingBackupRepository
    extends Object
    implements org.apache.solr.core.backup.repository.BackupRepository
    • Constructor Detail

      • TrackingBackupRepository

        public TrackingBackupRepository()
    • Method Detail

      • getConfigProperty

        public <T> T getConfigProperty​(String name)
        Specified by:
        getConfigProperty in interface org.apache.solr.core.backup.repository.BackupRepository
      • createURI

        public URI createURI​(String path)
        Specified by:
        createURI in interface org.apache.solr.core.backup.repository.BackupRepository
      • createDirectoryURI

        public URI createDirectoryURI​(String path)
        Specified by:
        createDirectoryURI in interface org.apache.solr.core.backup.repository.BackupRepository
      • resolve

        public URI resolve​(URI baseUri,
                           String... pathComponents)
        Specified by:
        resolve in interface org.apache.solr.core.backup.repository.BackupRepository
      • resolveDirectory

        public URI resolveDirectory​(URI baseUri,
                                    String... pathComponents)
        Specified by:
        resolveDirectory in interface org.apache.solr.core.backup.repository.BackupRepository
      • exists

        public boolean exists​(URI path)
                       throws IOException
        Specified by:
        exists in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • getPathType

        public org.apache.solr.core.backup.repository.BackupRepository.PathType getPathType​(URI path)
                                                                                     throws IOException
        Specified by:
        getPathType in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • listAll

        public String[] listAll​(URI path)
                         throws IOException
        Specified by:
        listAll in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • openInput

        public org.apache.lucene.store.IndexInput openInput​(URI dirPath,
                                                            String fileName,
                                                            org.apache.lucene.store.IOContext ctx)
                                                     throws IOException
        Specified by:
        openInput in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • createOutput

        public OutputStream createOutput​(URI path)
                                  throws IOException
        Specified by:
        createOutput in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • createDirectory

        public void createDirectory​(URI path)
                             throws IOException
        Specified by:
        createDirectory in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • deleteDirectory

        public void deleteDirectory​(URI path)
                             throws IOException
        Specified by:
        deleteDirectory in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • copyIndexFileFrom

        public void copyIndexFileFrom​(org.apache.lucene.store.Directory sourceDir,
                                      String sourceFileName,
                                      URI destDir,
                                      String destFileName)
                               throws IOException
        Specified by:
        copyIndexFileFrom in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • delete

        public void delete​(URI path,
                           Collection<String> files,
                           boolean ignoreNoSuchFileException)
                    throws IOException
        Specified by:
        delete in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • checksum

        public org.apache.solr.core.backup.Checksum checksum​(org.apache.lucene.store.Directory dir,
                                                             String fileName)
                                                      throws IOException
        Specified by:
        checksum in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException
      • init

        public void init​(org.apache.solr.common.util.NamedList<?> args)
        Specified by:
        init in interface org.apache.solr.util.plugin.NamedListInitializedPlugin
      • copiedFiles

        public static List<URI> copiedFiles()
        Returns:
        list of files were copied by using BackupRepository.copyFileFrom(Directory, String, URI)
      • clear

        public static void clear()
        Clear all tracking data
      • copyIndexFileTo

        public void copyIndexFileTo​(URI sourceRepo,
                                    String sourceFileName,
                                    org.apache.lucene.store.Directory dest,
                                    String destFileName)
                             throws IOException
        Specified by:
        copyIndexFileTo in interface org.apache.solr.core.backup.repository.BackupRepository
        Throws:
        IOException