Class JavaBinUpdateRequestCodec
java.lang.Object
org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec
Provides methods for marshalling an UpdateRequest to a NamedList which can be serialized in the
javabin format and vice versa.
- Since:
- solr 1.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmarshal(UpdateRequest updateRequest, OutputStream os) Converts an UpdateRequest to a NamedList which can be serialized to the given OutputStream in the javabin formatReads a NamedList from the given InputStream, converts it into a SolrInputDocument and passes it to the given StreamingUpdateHandler
-
Constructor Details
-
JavaBinUpdateRequestCodec
public JavaBinUpdateRequestCodec()
-
-
Method Details
-
marshal
Converts an UpdateRequest to a NamedList which can be serialized to the given OutputStream in the javabin format- Parameters:
updateRequest- the UpdateRequest to be written outos- the OutputStream to which the request is to be written- Throws:
IOException- in case of an exception during marshalling or writing to the stream
-
unmarshal
public UpdateRequest unmarshal(InputStream is, JavaBinUpdateRequestCodec.StreamingUpdateHandler handler) throws IOException Reads a NamedList from the given InputStream, converts it into a SolrInputDocument and passes it to the given StreamingUpdateHandler- Parameters:
is- the InputStream from which to readhandler- an instance of StreamingUpdateHandler to which SolrInputDocuments are streamed one by one- Returns:
- the UpdateRequest
- Throws:
IOException- in case of an exception while reading from the input stream or unmarshalling
-