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 Detail

      • getVersion

        String getVersion()
        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()
        Returns the files that comprise this revision, as a mapping from a source to a list of files.
      • release

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