Enum ScanSort

    • Enum Constant Detail

      • NONE

        public static final ScanSort NONE
        Do not sort the results.

        Fast and efficient. Results are emitted in the order they arrive from each partition.

      • ASCENDING

        public static final ScanSort ASCENDING
        Sort the results by document ID in lexicographic order.

        Reasonably efficient. Suitable for large range scans, since it *does not* require buffering the entire result set in memory.

        CAVEAT: When used with a ScanType.samplingScan(long) scan, the behavior is unspecified and may change in a future version. Likely outcomes include:

        • Skewing the results towards "low" document IDs.
        • Not actually sorting.
        If you require sorted results from a sample scan, please use NONE, then collect the results into a list and sort the list.
    • Method Detail

      • values

        public static ScanSort[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ScanSort c : ScanSort.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ScanSort valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null