|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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 beween 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.
Method Summary | |
---|---|
int |
compareTo(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. |
String |
getVersion()
Returns a string representation of the version of this revision. |
InputStream |
open(String source,
String fileName)
Returns an IndexInput for the given fileName and source. |
void |
release()
Called when this revision can be safely released, i.e. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
int compareTo(String version)
Comparable.compareTo(Object)
.
String getVersion()
compareTo(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.
Map<String,List<RevisionFile>> getSourceFiles()
InputStream open(String source, String fileName) throws IOException
IndexInput
for the given fileName and source. It is the
caller's respnsibility to close the IndexInput
when it has been
consumed.
IOException
void release() throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |