Package org.apache.solr.client.solrj.io.stream

## Class StreamContext

- java.lang.Object
- - org.apache.solr.client.solrj.io.stream.StreamContext

All Implemented Interfaces:
  `Serializable`

    public class StreamContext
    extends Object
    implements Serializable

The StreamContext is passed to TupleStreams using the TupleStream.setStreamContext() method. The StreamContext is used to pass shared context to concentrically wrapped TupleStreams.

Note: The StreamContext contains the SolrClientCache which is used to cache SolrClients for reuse across multiple TupleStreams.

See Also:
  Serialized Form

### Field Summary

Fields
`int` `numWorkers`
`int` `workerID`

### Constructor Summary

Constructors
`StreamContext()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `containsKey​(Object key)`
`Object` `get​(Object key)`
`Map<String,​Object>` `getEntries()`
`Map<String,​Object>` `getLets()`
`ModelCache` `getModelCache()`
`ConcurrentMap<String,​ConcurrentMap<String,​Object>>` `getObjectCache()`
`SolrParams` `getRequestParams()`
`RequestReplicaListTransformerGenerator` `getRequestReplicaListTransformerGenerator()`
`SolrClientCache` `getSolrClientCache()`
`StreamFactory` `getStreamFactory()`
`Map<String,​String>` `getTupleContext()`
`boolean` `isLocal()`
`void` `put​(String key, Object value)`
`void` `setLocal​(boolean local)`
`void` `setModelCache​(ModelCache modelCache)`
`void` `setObjectCache​(ConcurrentMap<String,​ConcurrentMap<String,​Object>> objectCache)`
`void` `setRequestParams​(SolrParams requestParams)`
`void` `setRequestReplicaListTransformerGenerator​(RequestReplicaListTransformerGenerator requestReplicaListTransformerGenerator)`
`void` `setSolrClientCache​(SolrClientCache clientCache)`
`void` `setStreamFactory​(StreamFactory streamFactory)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### workerID

    public int workerID

#### numWorkers

    public int numWorkers

### Constructor Detail

#### StreamContext

    public StreamContext()

### Method Detail

#### getObjectCache

    public ConcurrentMap<String,​ConcurrentMap<String,​Object>> getObjectCache()

#### setObjectCache

    public void setObjectCache​(ConcurrentMap<String,​ConcurrentMap<String,​Object>> objectCache)

#### getLets

    public Map<String,​Object> getLets()

#### get

    public Object get​(Object key)

#### put

    public void put​(String key,
                    Object value)

#### containsKey

    public boolean containsKey​(Object key)

#### getEntries

    public Map<String,​Object> getEntries()

#### setSolrClientCache

    public void setSolrClientCache​(SolrClientCache clientCache)

#### setModelCache

    public void setModelCache​(ModelCache modelCache)

#### getSolrClientCache

    public SolrClientCache getSolrClientCache()

#### getModelCache

    public ModelCache getModelCache()

#### setStreamFactory

    public void setStreamFactory​(StreamFactory streamFactory)

#### getTupleContext

    public Map<String,​String> getTupleContext()

#### getStreamFactory

    public StreamFactory getStreamFactory()

#### setLocal

    public void setLocal​(boolean local)

#### isLocal

    public boolean isLocal()

#### setRequestParams

    public void setRequestParams​(SolrParams requestParams)

#### getRequestParams

    public SolrParams getRequestParams()

#### setRequestReplicaListTransformerGenerator

    public void setRequestReplicaListTransformerGenerator​(RequestReplicaListTransformerGenerator requestReplicaListTransformerGenerator)

#### getRequestReplicaListTransformerGenerator

    public RequestReplicaListTransformerGenerator getRequestReplicaListTransformerGenerator()