Interface Revision

All Superinterfaces:
Comparable<Revision>
All Known Implementing Classes:
IndexAndTaxonomyRevision, IndexRevision

@Deprecated public interface Revision extends Comparable<Revision>
Deprecated.
use org.apache.lucene.replicator.nrt instead
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 Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(String version)
    Deprecated.
    Compares the revision to the given version string.
    Deprecated.
    Returns the files that comprise this revision, as a mapping from a source to a list of files.
    Deprecated.
    Returns a string representation of the version of this revision.
    open(String source, String fileName)
    Deprecated.
    Returns an IndexInput for the given fileName and source.
    void
    Deprecated.
    Called when this revision can be safely released, i.e.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • compareTo

      int compareTo(String version)
      Deprecated.
      Compares the revision to the given version string. Behaves like Comparable.compareTo(Object).
    • getVersion

      String getVersion()
      Deprecated.
      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.
    • getSourceFiles

      Map<String,List<RevisionFile>> getSourceFiles()
      Deprecated.
      Returns the files that comprise this revision, as a mapping from a source to a list of files.
    • open

      InputStream open(String source, String fileName) throws IOException
      Deprecated.
      Returns an IndexInput for the given fileName and source. It is the caller's responsibility to close the IndexInput when it has been consumed.
      Throws:
      IOException
    • release

      void release() throws IOException
      Deprecated.
      Called when this revision can be safely released, i.e. where there are no more references to it.
      Throws:
      IOException