it receives control once
 at the end of the batchlet.</li>
 </ol>
 <p>
 Note the collector is not called if the partition
 terminates due to an unhandled exception.
 </p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an Serializable object to pass to the
 PartitionAnalyzer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></cod