Some utility classes.
Interface Summary Interface Description AccountableAn object whose RAM usage can be computed. ArrayUtil.ByteArrayComparatorComparator for a fixed number of bytes. AttributeBase interface for attributes. AttributeReflector BitsInterface for Bitset-like structures. BytesRefArray.IndexedBytesRefIteratorAn extension of
BytesRefIteratorthat allows retrieving the index of the current element
BytesRefIteratorA simple iterator interface for
ClassLoaderUtilsHelper class used by ServiceLoader to investigate parent/child relationships of
IOConsumer<T>An IO operation with a single input that may throw an IOException. IOFunction<T,R>A Function that may throw an IOException IOSupplier<T>This is a result supplier that is allowed to throw an IOException. IOUtils.IOConsumer<T> Deprecated, for removal: This API element is subject to removal in a future version.was replaced by
IOUtils.IOFunction<T,R> Deprecated, for removal: This API element is subject to removal in a future version.was replaced by
NamedSPILoader.NamedSPIInterface to support
ResourceLoaderAbstraction for loading resources (streams, files, and classes). ResourceLoaderAwareInterface for a component that needs to be initialized by an implementation of
RollingBuffer.ResettableImplement to reset an instance Unwrappable<T>An object with this interface is a wrapper around another object (e.g., a filter with a delegate).
Class Summary Class Description AccountablesHelper methods for constructing nested resource descriptions and debugging RAM usage. ArrayUtilMethods for manipulating arrays. AttributeFactoryAn AttributeFactory creates instances of
AttributeFactory.StaticImplementationAttributeFactory<A extends AttributeImpl>Expert: AttributeFactory returning an instance of the given
clazzfor the attributes it implements.
AttributeImplBase class for Attributes that can be added to a
AttributeSourceAn AttributeSource contains a list of different
AttributeImpls, and methods to add and get them.
AttributeSource.StateThis class holds the state of an AttributeSource. BitDocIdSet Bits.MatchAllBitsBits impl of the specified length with all bits set. Bits.MatchNoBitsBits impl of the specified length with no bits set. BitSetBase implementation for a bit set. BitSetIteratorA
DocIdSetIteratorwhich iterates over set bits in a bit set.
BitUtilA variety of high efficiency bit twiddling routines and encoders for primitives. ByteBlockPoolClass that Posting and PostingVector use to write byte streams into shared fixed-size byte arrays. ByteBlockPool.AllocatorAbstract class for allocating and freeing byte blocks. ByteBlockPool.DirectAllocatorA simple
ByteBlockPool.Allocatorthat never recycles.
ByteBlockPool.Allocatorthat never recycles, but tracks how much total RAM is in use.
BytesRefRepresents byte, as a slice (offset + length) into an existing byte. BytesRefArray BytesRefArray.SortStateUsed to iterate the elements of an array in a given order. BytesRefBuilderA builder for
SortableBytesRefArray.iterator(Comparator)has optimizations for.
BytesRefHash BytesRefHash.BytesStartArrayManages allocation of the per-term addresses. BytesRefHash.DirectBytesStartArray CharsRefRepresents char, as a slice (offset + length) into an existing char. CharsRefBuilderA builder for
ClasspathResourceLoader CloseableThreadLocal<T>Java's builtin ThreadLocal has a serious flaw: it can take an arbitrarily long amount of time to dereference the things you had stored in it, even once the ThreadLocal instance itself is no longer referenced. CollectionUtilMethods for manipulating (sorting) collections. CommandLineUtilClass containing some useful methods used by command line tools ConstantsSome useful constants. CounterSimple counter class DocBaseBitSetIterator DocIdSetBuilderA builder of
DocIdSetBuilder.BulkAdderUtility class to efficiently add many docs in one go. FilterIterator<T,InnerT extends T>An
Iteratorimplementation that filters elements with a boolean predicate.
FixedBitSet FrequencyTrackingRingBufferA ring buffer that tracks the frequency of the integers that it contains. InfoStream InPlaceMergeSorter
Sorterimplementation based on the merge-sort algorithm that merges in place (no extra memory will be allocated).
IntBlockPoolA pool for int blocks similar to
IntBlockPool.AllocatorAbstract class for allocating and freeing int blocks. IntBlockPool.DirectAllocatorA simple
IntBlockPool.Allocatorthat never recycles.
IntBlockPool.SliceReader IntBlockPool.SliceWriter IntroSelectorAdaptive selection algorithm based on the introspective quick select algorithm. IntroSorter IntsRefRepresents int, as a slice (offset + length) into an existing int. IntsRefBuilderA builder for
IOUtilsUtilities for dealing with
JavaLoggingInfoStreamInfoStream implementation that logs every message using Java Utils Logging (JUL) with the supplied log level. LongBitSetBitSet of fixed length (numBits), backed by accessible (
LongBitSet.getBits()) long, accessed with a long index.
LongHeapA min heap that stores longs; a primitive priority queue that like all priority queues maintains a partial ordering of its elements such that the least element can always be found in constant time. LongsRefRepresents long, as a slice (offset + length) into an existing long. LongValuesAbstraction over an array of longs. LSBRadixSorterA LSB Radix sorter for unsigned int values. MapOfSets<K,V>Helper class for keeping Lists of Objects associated with keys. MathUtilMath static utility methods. MergedIterator<T extends Comparable<T>>Provides a merged sorted view from several sorted iterators. ModuleResourceLoader MSBRadixSorterRadix sorter for variable-length strings. NamedSPILoader<S extends NamedSPILoader.NamedSPI>Helper class for loading named SPIs from classpath (e.g. NamedThreadFactoryA default
ThreadFactoryimplementation that accepts the name prefix of the created threads as a constructor argument.
NotDocIdSet NumericUtilsHelper APIs to encode numeric values as sortable bytes and vice-versa. OfflineSorterOn-disk sorting of byte arrays. OfflineSorter.BufferSizeA bit more descriptive unit for constructors. OfflineSorter.ByteSequencesReaderUtility class to read length-prefixed byte entries from an input. OfflineSorter.ByteSequencesWriterUtility class to emit length-prefixed byte entries to an output stream for sorting. PagedBytesRepresents a logical byte as a series of pages. PagedBytes.ReaderProvides methods to read BytesRefs from a frozen PagedBytes. PrintStreamInfoStreamInfoStream implementation over a
PriorityQueue<T>A priority queue maintains a partial ordering of its elements such that the least element can always be found in constant time. QueryBuilderCreates queries from the
QueryBuilder.TermAndBoostWraps a term and boost RadixSelectorRadix selector. RamUsageEstimatorEstimates the size (memory representation) of Java objects. RecyclingByteBlockAllocator RecyclingIntBlockAllocator RefCount<T>Manages reference counting for a given object. RoaringDocIdSet
DocIdSetimplementation inspired from http://roaringbitmap.org/
RoaringDocIdSet.BuilderA builder of
RollingBuffer<T extends RollingBuffer.Resettable>Acts like forever growing T, but internally uses a circular buffer to reuse instances of T. SameThreadExecutorServiceAn
ExecutorServicethat executes tasks immediately in the calling thread during submit.
SelectorAn implementation of a selection algorithm, ie. SentinelIntSetA native int hash-based set where one value is reserved to mean "EMPTY" internally. SetOnce<T>A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times. SloppyMathMath functions that trade off accuracy for speed. SmallFloatFloating point numbers smaller than 32 bits. SorterBase class for sorting algorithms implementations. SparseFixedBitSetA bit set that only stores longs that have at least one bit which is set. StableMSBRadixSorterStable radix sorter for variable-length strings. StringHelperMethods for manipulating strings. TimSorter ToStringUtilsHelper methods to ease implementing
UnicodeUtilClass to encode java's UTF16 char into UTF8 byte without always allocating a new byte as String.getBytes(StandardCharsets.UTF_8) does. VectorUtilUtilities for computations with numeric arrays VersionUse by certain classes to match version compatibility across releases of Lucene. VirtualMethod<C>A utility for keeping backwards compatibility on previously abstract methods (or similar replacements). WeakIdentityMap<K,V>
Exception Summary Exception Description BytesRefHash.MaxBytesLengthExceededException SetOnce.AlreadySetExceptionThrown when
SetOnce.set(Object)is called more than once.
ThreadInterruptedExceptionThrown by lucene on detecting that Thread.interrupt() had been called.
Annotation Types Summary Annotation Type Description IgnoreRandomChainsAnnotation to not test a class or constructor with
SuppressForbiddenAnnotation to suppress forbidden-apis errors inside a whole class, a method, or a field.