Class JdbcConnectivityDetector

    • Constructor Detail

      • JdbcConnectivityDetector

        public JdbcConnectivityDetector​(DataSource ds,
                                        int timeout)
        Constructs a new instance.
        Parameters:
        ds - Data source.
        timeout - Timeout in seconds (see Connection.isValid(int)).
    • Method Detail

      • datasource

        public DataSource datasource()
        Datasource to check.
        Returns:
        Datasource to check.
      • timeout

        public int timeout()
        Check timeout in seconds.
        Returns:
        Timeout in seconds.
      • isValid

        public boolean isValid​(ClusterNode localNode)
        Description copied from interface: SplitBrainDetector
        Performs a split-brain check and returns true if local node can reach other members of the cluster.

        If this method returns false then HekateFatalErrorPolicy will be applied with ClusterSplitBrainException as a cause.

        Specified by:
        isValid in interface SplitBrainDetector
        Parameters:
        localNode - Local node (where the check is performed).
        Returns:
        true if local node can reach other members of the cluster.