class JobWatcher extends Watcher<V1Job> implements WatchListener<V1Job> {

  static boolean isFailed(V1Job job) {
    if (job == null) {
      return false;
    }

    V1JobStatus status = job.getStatus();
    if (status != null) {
      if (status.getFailed() != null && status.getFailed() > 0) {
        LOGGER.severe(MessageKeys.JOB_IS_FAILED, job.getMetadata().getName());
        return true;
      }
    }
    return false;
  }

  private  JobWatcher(
      String namespace,
      String initialResourceVersion,
      WatchTuning tuning,
      AtomicBoolean isStopping);

}