public class JavaBinUpdateRequestCodec
extends java.lang.Object
JavaBinCodec
Modifier and Type | Class and Description |
---|---|
static interface |
JavaBinUpdateRequestCodec.StreamingUpdateHandler |
Constructor and Description |
---|
JavaBinUpdateRequestCodec() |
Modifier and Type | Method and Description |
---|---|
private SolrInputDocument |
listToSolrInputDocument(java.util.List<NamedList> namedList) |
void |
marshal(UpdateRequest updateRequest,
java.io.OutputStream os)
Converts an UpdateRequest to a NamedList which can be serialized to the given OutputStream in the javabin format
|
private java.util.List<NamedList> |
solrInputDocumentToList(SolrInputDocument doc) |
private NamedList |
solrParamsToNamedList(SolrParams params) |
UpdateRequest |
unmarshal(java.io.InputStream is,
JavaBinUpdateRequestCodec.StreamingUpdateHandler handler)
Reads a NamedList from the given InputStream, converts it into a SolrInputDocument and passes it to the given
StreamingDocumentHandler
|
public void marshal(UpdateRequest updateRequest, java.io.OutputStream os) throws java.io.IOException
updateRequest
- the UpdateRequest to be written outos
- the OutputStream to which the request is to be writtenjava.io.IOException
- in case of an exception during marshalling or writing to the streampublic UpdateRequest unmarshal(java.io.InputStream is, JavaBinUpdateRequestCodec.StreamingUpdateHandler handler) throws java.io.IOException
is
- the InputStream from which to readhandler
- an instance of StreamingDocumentHandler to which SolrInputDocuments are streamed one by onejava.io.IOException
- in case of an exception while reading from the input stream or unmarshallingprivate java.util.List<NamedList> solrInputDocumentToList(SolrInputDocument doc)
private SolrInputDocument listToSolrInputDocument(java.util.List<NamedList> namedList)
private NamedList solrParamsToNamedList(SolrParams params)