boolean detectAndHandleTimeout(long heartbeatTimeoutMillis) {
        if (skipTimeoutDetection())  {
            return false;
        }

        HeartbeatTimeout heartbeatTimeout = detectTimeout(heartbeatTimeoutMillis);

        if (heartbeatTimeout == TIMEOUT) {
            complete(HEARTBEAT_TIMEOUT);
            return true;
        } else {
            return false;
        }
    }
boolean detectAndHandleTimeout ( long heartbeatTimeoutMillis ) { if ( skipTimeoutDetection ( ) ) { return false ; } HeartbeatTimeout heartbeatTimeout = detectTimeout ( heartbeatTimeoutMillis ) ; if ( heartbeatTimeout == TIMEOUT ) { complete ( HEARTBEAT_TIMEOUT ) ; return true ; } else { return false ; } }
Checks if this Invocation has received a heartbeat in time.

If the response is already set, or if a heartbeat has been received in time, then {@code false} is returned.
If no heartbeat has been received, then the future.set is called with HEARTBEAT_TIMEOUT and {@code true} is returned.

Gets called from the monitor-thread.

@return {@code true} if there is a timeout detected, {@code false} otherwise.