Package org.apache.solr.core
Class TrackingBackupRepository
- java.lang.Object
-
- org.apache.solr.core.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 Summary
Constructors Constructor Description TrackingBackupRepository()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.solr.core.backup.Checksum
checksum(org.apache.lucene.store.Directory dir, String fileName)
static void
clear()
Clear all tracking datavoid
close()
static List<URI>
copiedFiles()
void
copyIndexFileFrom(org.apache.lucene.store.Directory sourceDir, String sourceFileName, URI destDir, String destFileName)
void
copyIndexFileTo(URI sourceRepo, String sourceFileName, org.apache.lucene.store.Directory dest, String destFileName)
void
createDirectory(URI path)
URI
createDirectoryURI(String path)
OutputStream
createOutput(URI path)
URI
createURI(String path)
void
delete(URI path, Collection<String> files, boolean ignoreNoSuchFileException)
void
deleteDirectory(URI path)
boolean
exists(URI path)
<T> T
getConfigProperty(String name)
org.apache.solr.core.backup.repository.BackupRepository.PathType
getPathType(URI path)
void
init(org.apache.solr.common.util.NamedList<?> args)
String[]
listAll(URI path)
org.apache.lucene.store.IndexInput
openInput(URI dirPath, String fileName, org.apache.lucene.store.IOContext ctx)
URI
resolve(URI baseUri, String... pathComponents)
URI
resolveDirectory(URI baseUri, String... pathComponents)
-
-
-
Method Detail
-
getConfigProperty
public <T> T getConfigProperty(String name)
- Specified by:
getConfigProperty
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
createURI
public URI createURI(String path)
- Specified by:
createURI
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
createDirectoryURI
public URI createDirectoryURI(String path)
- Specified by:
createDirectoryURI
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
resolve
public URI resolve(URI baseUri, String... pathComponents)
- Specified by:
resolve
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
resolveDirectory
public URI resolveDirectory(URI baseUri, String... pathComponents)
- Specified by:
resolveDirectory
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
exists
public boolean exists(URI path) throws IOException
- Specified by:
exists
in interfaceorg.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 interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
listAll
public String[] listAll(URI path) throws IOException
- Specified by:
listAll
in interfaceorg.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 interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
createOutput
public OutputStream createOutput(URI path) throws IOException
- Specified by:
createOutput
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
createDirectory
public void createDirectory(URI path) throws IOException
- Specified by:
createDirectory
in interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
deleteDirectory
public void deleteDirectory(URI path) throws IOException
- Specified by:
deleteDirectory
in interfaceorg.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 interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
delete
public void delete(URI path, Collection<String> files, boolean ignoreNoSuchFileException) throws IOException
- Specified by:
delete
in interfaceorg.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 interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
- Specified by:
init
in interfaceorg.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 interfaceorg.apache.solr.core.backup.repository.BackupRepository
- Throws:
IOException
-
-