Class PostgresSqlQueryExceptionHandler


  • public class PostgresSqlQueryExceptionHandler
    extends QueryExceptionHandler
    A specific implementation of QueryExceptionHandler for PostgreSQL engine.
    Since:
    2.5.1
    Author:
    José Fidalgo (jose.fidalgo@feedzai.com)
    • Constructor Detail

      • PostgresSqlQueryExceptionHandler

        public PostgresSqlQueryExceptionHandler()
    • Method Detail

      • isTimeoutException

        public boolean isTimeoutException​(SQLException exception)
        Description copied from class: QueryExceptionHandler
        Indicates if a given exception is a timeout. Logic for this may be driver-specific, so drivers that support query timeouts may have to override this method. A timeout exception can also be considered retryable.
        Overrides:
        isTimeoutException in class QueryExceptionHandler
        Parameters:
        exception - The exception to check.
        Returns:
        true if the exception is a timeout, false otherwise.
      • isRetryableException

        public boolean isRetryableException​(SQLException exception)
        Description copied from class: QueryExceptionHandler
        Checks if an Exception occurred due to serialization failures in concurrent transactions and may be retried on the client-side.
        Overrides:
        isRetryableException in class QueryExceptionHandler
        Parameters:
        exception - The exception to check.
        Returns:
        true if the exception is retryable, false otherwise.