# Package org.apache.solr.common.util

package org.apache.solr.common.util
Common utility classes reused on both clients & server.

Related Packages
Package
Description
org.apache.solr.common
Common classes reused on both clients & server for dealing with `documents to be indexed` and `result documents`.
org.apache.solr.common.annotation
Annotations mapping to Jackson
org.apache.solr.common.cloud
Common Solr Cloud and ZooKeeper related classes reused on both clients & server.
org.apache.solr.common.luke
Common constants used by the `LukeRequestHandler`.
org.apache.solr.common.params
Parameter constants and enumerations.
Class
Description
ByteArrayUtf8CharSequence
A mutable byte[] backed Utf8CharSequence.
BytesBlock
ByteUtils
Cache<K,V>
CollectionUtil
Methods for creating collections with exact sizes, and other convenience methods
CommandOperation
CommonTestInjection
Allows random faults to be injected in running code during test runs across all solr packages.
CommonTestInjection.Breakpoint
CommonTestInjection.BreakpointSetter
Breakpoints should be set via this `CommonTestInjection.BreakpointSetter` within the test case and close should be invoked as cleanup.
Compressor
ContentStream
Deprecated.
Use `RequestWriter.ContentWriter` instead.
ContentStreamBase
Three concrete implementations for ContentStream - one for File/URL/String
ContentStreamBase.ByteArrayStream
Construct a `ContentStream` from a `File`
ContentStreamBase.FileStream
Construct a `ContentStream` from a `File`
ContentStreamBase.StringStream
Construct a `ContentStream` from a `String`
ContentStreamBase.URLStream
Construct a `ContentStream` from a `URL` This uses a `URLConnection` to get the content stream
DataEntry
This represents a data entry in the payload/stream.
DataEntry.EntryListener
DataEntry.FastDecoder
DataEntry.Type
The types are a superset of json
DataInputInputStream
An abstract DataInput that extends InputStream
DOMUtil
XML DOM utilities
EnvUtils
Provides convenient access to System Properties for Solr.
ExecutorUtil
ExecutorUtil.InheritableThreadLocalProvider
Any class which wants to carry forward the thread local values to the threads run by thread pools must implement this interface and the implementation should be registered here
ExecutorUtil.MDCAwareThreadPoolExecutor
FastInputStream
Single threaded buffered InputStream Internal Solr use only, subject to change.
FastJavaBinDecoder
FastJavaBinDecoder.Tag
FastOutputStream
Single threaded buffered OutputStream Internal Solr use only, subject to change.
FastWriter
Single threaded BufferedWriter Internal Solr use only, subject to change.
GlobPatternUtil
Provides methods for matching glob patterns against input strings.
Hash
Fast, well distributed, cross-platform hash functions.
Hash.LongPair
128 bits of state
IOUtils
JavaBinCodec
Defines a space-efficient serialization/deserialization format for transferring data.
JavaBinCodec.ObjectResolver
Allows extension of `JavaBinCodec` to support serialization of arbitrary data types.
JavaBinCodec.StringCache
JavaBinCodec.WritableDocFields
JsonRecordReader
A Streaming parser for json to emit one record at a time.
JsonRecordReader.Handler
Implement this interface to stream records as and when one is found.
JsonSchemaCreator
Creates a json schema from an annotated Java Object.
JsonSchemaValidator
A very basic and lightweight json schema parsing and data validation tool.
JsonTextWriter
MapBackedCache<K,V>
MurmurHash2
This is a very fast, non-cryptographic hash suitable for general hash-based lookup.
NamedList<T>
A simple container class for modeling an ordered list of name/value pairs.
NamedList.NamedListEntry<T>
Deprecated.
ObjectCache
Simple object cache with a type-safe accessor.
ObjectReleaseTracker
Pair<T1,T2>
PathTrie<T>
A utility class to efficiently parse/store/lookup hierarchical paths which are templatized like /collections/{collection}/shards/{shard}/{replica}
PropertiesUtil
Breaking out some utility methods into a separate class as part of SOLR-4196.
ReflectMapWriter
ResumableInputStream
An `InputStream` that can be resumed when the connection that is driving the input is interrupted.
RetryUtil
Utility class for retrying operations with various strategies.
RetryUtil.BooleanRetryCmd
Interface for commands that return a boolean result indicating success or failure.
RetryUtil.RetryCmd
Interface for commands that can be retried and may throw exceptions.
SimpleOrderedMap<T>
`SimpleOrderedMap` is a `NamedList` where access by key is more important than maintaining order when it comes to representing the held data in other forms, as ResponseWriters normally do.
SolrNamedThreadFactory
A `ThreadFactory` that names threads with the given prefix.
StringBytes
StrUtils
SuppressForbidden
Annotation to suppress forbidden-apis errors inside a whole class, a method, or a field.
Template
TextWriter
Base interface for all text based writers
TimeSource
Source of time.
TimeSource.CurrentTimeSource
Implementation that uses `System.currentTimeMillis()`.
TimeSource.NanoTimeSource
Implementation that uses `System.nanoTime()`.
TimeSource.SimTimeSource
Implementation that uses `TimeSource.NANO_TIME` accelerated by a double multiplier.
URLUtil
Utf8CharSequence
A byte[] backed String
Utils
Utils.BAOS
Utils.DelegateReflectWriter
Utils.InputStreamConsumer<T>
ValidatingJsonMap
ValidatingJsonMap.PredicateWithErrMsg<T>
XML
XML.Writable
XMLErrorLogger
ZLibCompressor