Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.hubspot.singularity;
 
 
  private final Optional<IntegerstatusCode;
  private final Optional<LongdurationMillis;
  private final Optional<StringresponseBody;
  private final Optional<StringerrorMessage;
  private final long timestamp;
  public static SingularityTaskHealthcheckResult fromBytes(byte[] bytesObjectMapper objectMapper) {
    try {
      return objectMapper.readValue(bytesSingularityTaskHealthcheckResult.class);
    } catch (IOException e) {
      throw new SingularityJsonException(e);
    }
  }
  public SingularityTaskHealthcheckResult(@JsonProperty("statusCode"Optional<IntegerstatusCode, @JsonProperty("duration"Optional<LongdurationMillis, @JsonProperty("timestamp"long timestamp,
      @JsonProperty("responseBody"Optional<StringresponseBody, @JsonProperty("errorMessage"Optional<StringerrorMessage, @JsonProperty("taskId"SingularityTaskId taskId) {
    super(taskId);
    this. = statusCode;
    this. = errorMessage;
    this. = durationMillis;
    this. = timestamp;
    this. = responseBody;
  }
    return ComparisonChain.start()
        .compare(o.getTimestamp())
        .compare(o.getTaskId().getId(), getTaskId().getId())
        .result();
  }
  public Optional<IntegergetStatusCode() {
    return ;
  }
  public Optional<LonggetDurationMillis() {
    return ;
  }
  public Optional<StringgetErrorMessage() {
    return ;
  }
  public long getTimestamp() {
    return ;
  }
  public Optional<StringgetResponseBody() {
    return ;
  }
  public boolean isFailed() {
    return getErrorMessage().isPresent() || (getStatusCode().isPresent() && !JavaUtils.isHttpSuccess(getStatusCode().get()));
  }
  public String toString() {
    return "SingularityTaskHealthcheckResult [statusCode=" +  + ", durationMillis=" +  + ", timestamp=" +  + ", responseBody=" +  + ", errorMessage=" +  + ", taskId=" + getTaskId() + "]";
  }
New to GrepCode? Check out our FAQ X