Module org.apache.lucene.core
Package org.apache.lucene.index
Record Class IndexWriter.IndexWriterMergeSource
java.lang.Object
java.lang.Record
org.apache.lucene.index.IndexWriter.IndexWriterMergeSource
- All Implemented Interfaces:
MergeScheduler.MergeSource
- Enclosing class:
IndexWriter
private static record IndexWriter.IndexWriterMergeSource(IndexWriter writer)
extends Record
implements MergeScheduler.MergeSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IndexWriterThe field for thewriterrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIndexWriterMergeSource(IndexWriter writer) Creates an instance of aIndexWriterMergeSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.TheMergeSchedulercalls this method to retrieve the next merge requested by the MergePolicyfinal inthashCode()Returns a hash code value for this object.booleanExpert: returns true if there are merges waiting to be scheduled.voidmerge(MergePolicy.OneMerge merge) Merges the indicated segments, replacing them in the stack with a single segment.voidDoes finishing for a merge.toString()Returns a string representation of this record class.writer()Returns the value of thewriterrecord component.
-
Field Details
-
writer
The field for thewriterrecord component.
-
-
Constructor Details
-
IndexWriterMergeSource
Creates an instance of aIndexWriterMergeSourcerecord class.- Parameters:
writer- the value for thewriterrecord component
-
-
Method Details
-
getNextMerge
Description copied from interface:MergeScheduler.MergeSourceTheMergeSchedulercalls this method to retrieve the next merge requested by the MergePolicy- Specified by:
getNextMergein interfaceMergeScheduler.MergeSource
-
onMergeFinished
Description copied from interface:MergeScheduler.MergeSourceDoes finishing for a merge.- Specified by:
onMergeFinishedin interfaceMergeScheduler.MergeSource
-
hasPendingMerges
public boolean hasPendingMerges()Description copied from interface:MergeScheduler.MergeSourceExpert: returns true if there are merges waiting to be scheduled.- Specified by:
hasPendingMergesin interfaceMergeScheduler.MergeSource
-
merge
Description copied from interface:MergeScheduler.MergeSourceMerges the indicated segments, replacing them in the stack with a single segment.- Specified by:
mergein interfaceMergeScheduler.MergeSource- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
writer
Returns the value of thewriterrecord component.- Returns:
- the value of the
writerrecord component
-