Class PartialResultsWarning

  • All Implemented Interfaces:
    Serializable, Iterable<Throwable>

    public class PartialResultsWarning
    extends SQLWarning
    This warning class is sent when using partial results mode if one or more sources fails. In this case, results will be returned (with 0 rows sent from failing source). This warning can be obtained from the ResultSet to determine which sources failed and provided 0 rows and why they failed.
    See Also:
    Serialized Form
    • Constructor Detail

      • PartialResultsWarning

        public PartialResultsWarning​(String reason,
                                     String SQLstate,
                                     int vendorCode)
        Construct partial results warning.
        Parameters:
        reason - Reason for the exception
        SQLstate - SQL state code
        vendorCode - Vendor code
      • PartialResultsWarning

        public PartialResultsWarning​(String reason,
                                     String SQLstate)
        Construct partial results warning.
        Parameters:
        reason - Reason for the exception
        SQLstate - SQL state code
      • PartialResultsWarning

        public PartialResultsWarning​(String reason)
        Construct partial results warning.
        Parameters:
        reason - Reason for the exception
      • PartialResultsWarning

        public PartialResultsWarning()
        Construct partial results warning.
    • Method Detail

      • addConnectorFailure

        public void addConnectorFailure​(String name,
                                        SQLException exception)
        Add a connector failure to the warning
        Parameters:
        name - Connector name
        exception - Connector exception
      • getFailedConnectors

        public Collection getFailedConnectors()
        Obtain list of connectors that failed.
        Returns:
        List of connectors that failed - List contains String names
      • getConnectorException

        public SQLException getConnectorException​(String connectorName)
        Obtain failure for a particular connector.
        Parameters:
        connectorName - Connector name
        Returns:
        Exception that occurred for this connector or null if the exception was unknown