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.Checksumchecksum(org.apache.lucene.store.Directory dir, String fileName)static voidclear()Clear all tracking datavoidclose()static List<URI>copiedFiles()voidcopyIndexFileFrom(org.apache.lucene.store.Directory sourceDir, String sourceFileName, URI destDir, String destFileName)voidcopyIndexFileTo(URI sourceRepo, String sourceFileName, org.apache.lucene.store.Directory dest, String destFileName)voidcreateDirectory(URI path)URIcreateDirectoryURI(String path)OutputStreamcreateOutput(URI path)URIcreateURI(String path)voiddelete(URI path, Collection<String> files)voiddeleteDirectory(URI path)static List<URI>directoriesCreated()booleanexists(URI path)<T> TgetConfigProperty(String name)org.apache.solr.core.backup.repository.BackupRepository.PathTypegetPathType(URI path)voidinit(org.apache.solr.common.util.NamedList<?> args)String[]listAll(URI path)org.apache.lucene.store.IndexInputopenInput(URI dirPath, String fileName, org.apache.lucene.store.IOContext ctx)static List<URI>outputsCreated()URIresolve(URI baseUri, String... pathComponents)URIresolveDirectory(URI baseUri, String... pathComponents)
-
-
-
Method Detail
-
getConfigProperty
public <T> T getConfigProperty(String name)
- Specified by:
getConfigPropertyin interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
createURI
public URI createURI(String path)
- Specified by:
createURIin interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
createDirectoryURI
public URI createDirectoryURI(String path)
- Specified by:
createDirectoryURIin interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
resolve
public URI resolve(URI baseUri, String... pathComponents)
- Specified by:
resolvein interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
resolveDirectory
public URI resolveDirectory(URI baseUri, String... pathComponents)
- Specified by:
resolveDirectoryin interfaceorg.apache.solr.core.backup.repository.BackupRepository
-
exists
public boolean exists(URI path) throws IOException
- Specified by:
existsin 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:
getPathTypein interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
listAll
public String[] listAll(URI path) throws IOException
- Specified by:
listAllin 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:
openInputin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
createOutput
public OutputStream createOutput(URI path) throws IOException
- Specified by:
createOutputin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
createDirectory
public void createDirectory(URI path) throws IOException
- Specified by:
createDirectoryin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
deleteDirectory
public void deleteDirectory(URI path) throws IOException
- Specified by:
deleteDirectoryin 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:
copyIndexFileFromin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
delete
public void delete(URI path, Collection<String> files) throws IOException
- Specified by:
deletein 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:
checksumin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
- Specified by:
initin 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:
copyIndexFileToin interfaceorg.apache.solr.core.backup.repository.BackupRepository- Throws:
IOException
-
-