@Override
    public void failWithReason(final String name, final HealthFailReason reason) {
    """
	Check in the service with a specific status.
	
	@param name   name
	@param reason reason
    """
        logger.error("HealthService::fail() {}", name);


        super.incrementCount("fail");

        final NodeHealthStat nodeHealthStat = getServiceHealthStat(name);

        nodeHealthStat.setStatus(HealthStatus.FAIL);
        nodeHealthStat.setReason(reason);
        nodeHealthStat.setLastCheckIn(super.time);

        onFail.ifPresent(checkIn -> checkIn.accept(BeanUtils.copy(nodeHealthStat)));
    }
@Override
    public void failWithReason(final String name, final HealthFailReason reason) {
        logger.error("HealthService::fail() {}", name);


        super.incrementCount("fail");

        final NodeHealthStat nodeHealthStat = getServiceHealthStat(name);

        nodeHealthStat.setStatus(HealthStatus.FAIL);
        nodeHealthStat.setReason(reason);
        nodeHealthStat.setLastCheckIn(super.time);

        onFail.ifPresent(checkIn -> checkIn.accept(BeanUtils.copy(nodeHealthStat)));
    }
@ Override public void failWithReason ( final String name , final HealthFailReason reason ) { logger . error ( "HealthService::fail() {}" , name ) ; super . incrementCount ( "fail" ) ; final NodeHealthStat nodeHealthStat = getServiceHealthStat ( name ) ; nodeHealthStat . setStatus ( HealthStatus . FAIL ) ; nodeHealthStat . setReason ( reason ) ; nodeHealthStat . setLastCheckIn ( super . time ) ; onFail . ifPresent ( checkIn -> checkIn . accept ( BeanUtils . copy ( nodeHealthStat ) ) ) ; }
Check in the service with a specific status.

@param name   name
@param reason reason
Check in the service with a specific status .