The SegmentInfos type exposes the following members.

Constructors

  NameDescription
Public methodSegmentInfos
Initializes a new instance of the SegmentInfos class

Methods

  NameDescription
Public methodAdd
Adds an object to the end of the ArrayList.
(Inherited from ArrayList.)
Public methodAddRange
Adds the elements of an ICollection to the end of the ArrayList.
(Inherited from ArrayList.)
Public methodBinarySearch(Object)
Searches the entire sorted ArrayList for an element using the default comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodBinarySearch(Object, IComparer)
Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodBinarySearch(Int32, Int32, Object, IComparer)
Searches a range of elements in the sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
(Inherited from ArrayList.)
Public methodClear
Removes all elements from the ArrayList.
(Inherited from ArrayList.)
Public methodClone
Returns a copy of this instance, also copying each SegmentInfo.
(Overrides ArrayList..::..Clone()()()().)
Public methodCommit
Writes & syncs to the Directory dir, taking care to remove the segments file on exception
Public methodContains
Determines whether an element is in the ArrayList.
(Inherited from ArrayList.)
Public methodCopyTo(Array)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
(Inherited from ArrayList.)
Public methodCopyTo(Array, Int32)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from ArrayList.)
Public methodCopyTo(Int32, Array, Int32, Int32)
Copies a range of elements from the ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
(Inherited from ArrayList.)
Public methodEquals
Simple brute force implementation. If size is equal, compare items one by one.
(Overrides Object..::..Equals(Object).)
Public methodFiles
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped). The returned collection is recomputed on each invocation.
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberGenerationFromSegmentsFileName
Parse the generation off the segments file name and return it.
Public methodGetCurrentSegmentFileName()()()()
Get the segments_N filename in use by this segment infos.
Public methodStatic memberGetCurrentSegmentFileName(array<String>[]()[][])
Get the filename of the current segments_N file from a list of files.
Public methodStatic memberGetCurrentSegmentFileName(Directory)
Get the filename of the current segments_N file in the directory.
Public methodStatic memberGetCurrentSegmentGeneration(array<String>[]()[][])
Get the generation (N) of the current segments_N file from a list of files.
Public methodStatic memberGetCurrentSegmentGeneration(Directory)
Get the generation (N) of the current segments_N file in the directory.
Public methodStatic memberGetDefaultGenFileRetryCount
Public methodStatic memberGetDefaultGenFileRetryPauseMsec
Public methodStatic memberGetDefaultGenLookahedCount
Public methodGetEnumerator()()()()
Returns an enumerator for the entire ArrayList.
(Inherited from ArrayList.)
Public methodGetEnumerator(Int32, Int32)
Returns an enumerator for a range of elements in the ArrayList.
(Inherited from ArrayList.)
Public methodGetGeneration
Public methodGetHashCode
Calculate hash code of SegmentInfos
(Overrides Object..::..GetHashCode()()()().)
Public methodStatic memberGetInfoStream
Public methodGetLastGeneration
Public methodGetNextSegmentFileName
Get the next segments_N filename that will be written.
Public methodGetRange
Returns an ArrayList which represents a subset of the elements in the source ArrayList.
(Inherited from ArrayList.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUserData
Public methodGetVersion
version number when this SegmentInfos was generated.
Public methodHasExternalSegments
Public methodIndexOf(Object)
Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.
(Inherited from ArrayList.)
Public methodIndexOf(Object, Int32)
Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that extends from the specified index to the last element.
(Inherited from ArrayList.)
Public methodIndexOf(Object, Int32, Int32)
Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that starts at the specified index and contains the specified number of elements.
(Inherited from ArrayList.)
Public methodInfo
Public methodInsert
Inserts an element into the ArrayList at the specified index.
(Inherited from ArrayList.)
Public methodInsertRange
Inserts the elements of a collection into the ArrayList at the specified index.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object)
Searches for the specified Object and returns the zero-based index of the last occurrence within the entire ArrayList.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32)
Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that extends from the first element to the specified index.
(Inherited from ArrayList.)
Public methodLastIndexOf(Object, Int32, Int32)
Searches for the specified Object and returns the zero-based index of the last occurrence within the range of elements in the ArrayList that contains the specified number of elements and ends at the specified index.
(Inherited from ArrayList.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRange
Returns a new SegmentInfos containg the SegmentInfo instances in the specified range first (inclusive) to last (exclusive), so total number of segments returned is last-first.
Public methodRead(Directory)
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
Public methodRead(Directory, String)
Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.
Public methodStatic memberReadCurrentUserData
Returns userData from latest segments file
Public methodStatic memberReadCurrentVersion
Current version number from segments file.
Public methodRemove
Removes the first occurrence of a specific object from the ArrayList.
(Inherited from ArrayList.)
Public methodRemoveAt
Removes the element at the specified index of the ArrayList.
(Inherited from ArrayList.)
Public methodRemoveRange
Removes a range of elements from the ArrayList.
(Inherited from ArrayList.)
Public methodReverse()()()()
Reverses the order of the elements in the entire ArrayList.
(Inherited from ArrayList.)
Public methodReverse(Int32, Int32)
Reverses the order of the elements in the specified range.
(Inherited from ArrayList.)
Public methodSegString
Public methodStatic memberSetDefaultGenFileRetryCount
Advanced: set how many times to try loading the segments.gen file contents to determine current segment generation. This file is only referenced when the primary method (listing the directory) fails.
Public methodStatic memberSetDefaultGenFileRetryPauseMsec
Advanced: set how many milliseconds to pause in between attempts to load the segments.gen file.
Public methodStatic memberSetDefaultGenLookaheadCount
Advanced: set how many times to try incrementing the gen when loading the segments file. This only runs if the primary (listing directory) and secondary (opening segments.gen file) methods fail to find the segments file.
Public methodStatic memberSetInfoStream
If non-null, information about retries when loading the segments file will be printed to this.
Public methodSetRange
Copies the elements of a collection over a range of elements in the ArrayList.
(Inherited from ArrayList.)
Public methodSort()()()()
Sorts the elements in the entire ArrayList using the IComparable implementation of each element.
(Inherited from ArrayList.)
Public methodSort(IComparer)
Sorts the elements in the entire ArrayList using the specified comparer.
(Inherited from ArrayList.)
Public methodSort(Int32, Int32, IComparer)
Sorts the elements in a range of elements in ArrayList using the specified comparer.
(Inherited from ArrayList.)
Public methodToArray()()()()
Copies the elements of the ArrayList to a new Object array.
(Inherited from ArrayList.)
Public methodToArray(Type)
Copies the elements of the ArrayList to a new array of the specified element type.
(Inherited from ArrayList.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTrimToSize
Sets the capacity to the actual number of elements in the ArrayList.
(Inherited from ArrayList.)

Fields

  NameDescription
Public fieldcounter
Public fieldStatic memberFORMAT
The file format version, a negative number.
Public fieldStatic memberFORMAT_CHECKSUM
This format adds a checksum at the end of the file to ensure all bytes were successfully written.
Public fieldStatic memberFORMAT_DEL_COUNT
This format adds the deletion count for each segment. This way IndexWriter can efficiently report numDocs().
Public fieldStatic memberFORMAT_DIAGNOSTICS
This format adds optional per-segment String dianostics storage, and switches userData to Map
Public fieldStatic memberFORMAT_HAS_PROX
This format adds the boolean hasProx to record if any fields in the segment store prox information (ie, have omitTermFreqAndPositions==false)
Public fieldStatic memberFORMAT_LOCKLESS
This format adds details used for lockless commits. It differs slightly from the previous format in that file names are never re-used (write once). Instead, each file is written to the next generation. For example, segments_1, segments_2, etc. This allows us to not use a commit lock. See file formats for details.
Public fieldStatic memberFORMAT_SHARED_DOC_STORE
This format allows multiple segments to share a single vectors and stored fields file.
Public fieldStatic memberFORMAT_SINGLE_NORM_FILE
This format adds a "hasSingleNormFile" flag into each segment info. See LUCENE-756 for details.
Public fieldStatic memberFORMAT_USER_DATA
This format adds optional commit userData (String) storage.

Properties

  NameDescription
Public propertyCapacity
Gets or sets the number of elements that the ArrayList can contain.
(Inherited from ArrayList.)
Public propertyCount
Gets the number of elements actually contained in the ArrayList.
(Inherited from ArrayList.)
Public propertyIsFixedSize
Gets a value indicating whether the ArrayList has a fixed size.
(Inherited from ArrayList.)
Public propertyIsReadOnly
Gets a value indicating whether the ArrayList is read-only.
(Inherited from ArrayList.)
Public propertyIsSynchronized
Gets a value indicating whether access to the ArrayList is synchronized (thread safe).
(Inherited from ArrayList.)
Public propertyItem
Gets or sets the element at the specified index.
(Inherited from ArrayList.)
Public propertySyncRoot
Gets an object that can be used to synchronize access to the ArrayList.
(Inherited from ArrayList.)

See Also