Package org.apache.lucene.replicator
Class IndexRevision
java.lang.Object
org.apache.lucene.replicator.IndexRevision
- All Implemented Interfaces:
Comparable<Revision>
,Revision
Deprecated.
use org.apache.lucene.replicator.nrt instead
A
Revision
of a single index files which comprises the list of files that are part of the
current IndexCommit
. To ensure the files are not deleted by IndexWriter
for as
long as this revision stays alive (i.e. until release()
), the current commit point is
snapshotted, using SnapshotDeletionPolicy
(this means that the given writer's config
should return SnapshotDeletionPolicy
).
When this revision is released
, it releases the obtained snapshot as well
as calls IndexWriter.deleteUnusedFiles()
so that the snapshotted files are deleted (if
they are no longer needed).
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorDescriptionIndexRevision
(IndexWriter writer) Deprecated.Constructor over the givenIndexWriter
. -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.Compares the revision to the given version string.int
Deprecated.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.Deprecated.Returns anIndexInput
for the given fileName and source.void
release()
Deprecated.Called when this revision can be safely released, i.e.static Map
<String, List<RevisionFile>> revisionFiles
(IndexCommit commit) Deprecated.Returns a singleton map of the revision files from the givenIndexCommit
.static String
revisionVersion
(IndexCommit commit) Deprecated.Returns a String representation of a revision's version from the givenIndexCommit
.toString()
Deprecated.
-
Constructor Details
-
IndexRevision
Deprecated.Constructor over the givenIndexWriter
. Uses the lastIndexCommit
found in theDirectory
managed by the given writer.- Throws:
IOException
-
-
Method Details
-
revisionFiles
Deprecated.Returns a singleton map of the revision files from the givenIndexCommit
.- Throws:
IOException
-
revisionVersion
Deprecated.Returns a String representation of a revision's version from the givenIndexCommit
. -
compareTo
Deprecated.Description copied from interface:Revision
Compares the revision to the given version string. Behaves likeComparable.compareTo(Object)
. -
compareTo
Deprecated.- Specified by:
compareTo
in interfaceComparable<Revision>
-
getVersion
Deprecated.Description copied from interface:Revision
Returns a string representation of the version of this revision. The version is used byRevision.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.- Specified by:
getVersion
in interfaceRevision
-
getSourceFiles
Deprecated.Description copied from interface:Revision
Returns the files that comprise this revision, as a mapping from a source to a list of files.- Specified by:
getSourceFiles
in interfaceRevision
-
open
Deprecated.Description copied from interface:Revision
Returns anIndexInput
for the given fileName and source. It is the caller's responsibility to close theIndexInput
when it has been consumed.- Specified by:
open
in interfaceRevision
- Throws:
IOException
-
release
Deprecated.Description copied from interface:Revision
Called when this revision can be safely released, i.e. where there are no more references to it.- Specified by:
release
in interfaceRevision
- Throws:
IOException
-
toString
Deprecated.
-