Interface IRevision
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.
Inherited Members
Namespace: Lucene.Net.Replicator
Assembly: Lucene.Net.Replicator.dll
Syntax
public interface IRevision : IComparable<IRevision>
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Properties
SourceFiles
Returns the files that comprise this revision, as a mapping from a source to a list of files.
Declaration
IDictionary<string, IList<RevisionFile>> SourceFiles { get; }
Property Value
Type | Description |
---|---|
IDictionary<string, IList<RevisionFile>> |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Version
Returns a string representation of the version of this revision. The version is used by 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.
Declaration
string Version { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Methods
CompareTo(string)
Compares the revision to the given version string. Behaves like CompareTo(T)
Declaration
int CompareTo(string version)
Parameters
Type | Name | Description |
---|---|---|
string | version |
Returns
Type | Description |
---|---|
int |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Open(string, string)
Returns a Stream for the given fileName
and source
. It is the
caller's respnsibility to dispose the Stream when it has been
consumed.
Declaration
Stream Open(string source, string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | source | |
string | fileName |
Returns
Type | Description |
---|---|
Stream |
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
IOException |
Release()
Called when this revision can be safely released, i.e. where there are no more references to it.
Declaration
void Release()
Remarks
Note
This API is experimental and might change in incompatible ways in the next release.
Exceptions
Type | Condition |
---|---|
IOException |