Example Result Processor: MergeSort

This example result processor implementation uses a merge sort algorithm to return sorted results to a client.

The MergeSort processor is designed for use with a single procedure implementation that returns only a single result set and no OUT parameters. The procedure implementation is shown in Procedure Implementation, and the procedure would be configured in GemFire XD using a statement similar to the following.
CREATE PROCEDURE MergeSort ()
LANGUAGE JAVA
PARAMETER STYLE JAVA
READS SQL DATA
DYNAMIC RESULT SETS 1
EXTERNAL NAME 'examples.MergeSortProcedure.mergeSort'

Your own result processor implementations may need to work with the output from multiple procedures, and take into account the possibility of multiple result sets and OUT parameters accordingly.