Package org.apache.lucene.replicator
Interface Revision
- 
- All Superinterfaces:
- Comparable<Revision>
 - All Known Implementing Classes:
- IndexAndTaxonomyRevision,- IndexRevision
 
 public interface Revision extends Comparable<Revision> A revision comprises lists of files that come from different sources and need to be replicated together to e.g. guarantee that all resources are in sync. In most cases an application will replicate a single index, and so the revision will contain files from a single source. However, some applications may require to treat a collection of indexes as a single entity so that the files from all sources are replicated together, to guarantee consistency between them. For example, an application which indexes facets will need to replicate both the search and taxonomy indexes together, to guarantee that they match at the client side.- WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description intcompareTo(String version)Compares the revision to the given version string.Map<String,List<RevisionFile>>getSourceFiles()Returns the files that comprise this revision, as a mapping from a source to a list of files.StringgetVersion()Returns a string representation of the version of this revision.InputStreamopen(String source, String fileName)Returns anIndexInputfor the given fileName and source.voidrelease()Called when this revision can be safely released, i.e.- 
Methods inherited from interface java.lang.ComparablecompareTo
 
- 
 
- 
- 
- 
Method Detail- 
compareToint compareTo(String version) Compares the revision to the given version string. Behaves likeComparable.compareTo(Object).
 - 
getVersionString getVersion() Returns a string representation of the version of this revision. The version is used bycompareTo(String)as well as to serialize/deserialize revision information. Therefore it must be self descriptive as well as be able to identify one revision from another.
 - 
getSourceFilesMap<String,List<RevisionFile>> getSourceFiles() Returns the files that comprise this revision, as a mapping from a source to a list of files.
 - 
openInputStream open(String source, String fileName) throws IOException Returns anIndexInputfor the given fileName and source. It is the caller's responsibility to close theIndexInputwhen it has been consumed.- Throws:
- IOException
 
 - 
releasevoid release() throws IOExceptionCalled when this revision can be safely released, i.e. where there are no more references to it.- Throws:
- IOException
 
 
- 
 
-