# Package org.apache.solr.common.util

Common utility classes reused on both clients & server.

Interface Summary
Cache<K,​V>
CommonTestInjection.Breakpoint
Compressor
ContentStream: Deprecated. Use `RequestWriter.ContentWriter` instead.
DataEntry: This represents a data entry in the payload/stream.
DataEntry.EntryListener
DataEntry.FastDecoder
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
JavaBinCodec.ObjectResolver: Allows extension of `JavaBinCodec` to support serialization of arbitrary data types.
JavaBinCodec.WritableDocFields
JsonRecordReader.Handler: Implement this interface to stream records as and when one is found.
JsonTextWriter
ReflectMapWriter
RetryUtil.BooleanRetryCmd
RetryUtil.RetryCmd
TextWriter
Utf8CharSequence: A byte[] backed String
Utils.InputStreamConsumer<T>
ValidatingJsonMap.PredicateWithErrMsg<T>
XML.Writable

Class Summary
ByteArrayUtf8CharSequence: A mutable byte[] backed Utf8CharSequence.
BytesBlock
BytesOutputStream
BytesOutputStream.Bytes
ByteUtils
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.BreakpointSetter: Breakpoints should be set via this `CommonTestInjection.BreakpointSetter` within the test case and close should be invoked as cleanup.
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
DataInputInputStream: An abstract DataInput that extends InputStream
DOMUtil
EnvUtils: Provides convenient access to System Properties for Solr.
ExecutorUtil
ExecutorUtil.MDCAwareThreadPoolExecutor
FastInputStream: Single threaded buffered InputStream Internal Solr use only, subject to change.
FastJavaBinDecoder
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.StringCache
JsonRecordReader: A Streaming parser for json to emit one record at a time.
JsonSchemaCreator: Creates a json schema from an annotated Java Object.
JsonSchemaValidator: A very basic and lightweight json schema parsing and data validation tool.
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>: Helper class implementing Map.Entry<String, T> to store the key-value relationship in NamedList (the keys of which are String-s)
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.
RetryUtil
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.
SolrJSONWriter: Use this to serialize an object into Json.
SolrNamedThreadFactory: A `ThreadFactory` that names threads with the given prefix.
StringBytes
StrUtils
Template
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
Utils
Utils.BAOS
Utils.DelegateReflectWriter
ValidatingJsonMap
WrappedSimpleMap<T>: Deprecated.
XML
XMLErrorLogger
ZLibCompressor

Enum Summary
DataEntry.Type: The types are a superset of json
FastJavaBinDecoder.Tag

Annotation Types Summary
SuppressForbidden: Annotation to suppress forbidden-apis errors inside a whole class, a method, or a field.