Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.hubspot.singularity;
 
 
 
  private final SingularityRequest request;
  private final RequestState state;
  public static SingularityRequestWithState fromBytes(byte[] bytesObjectMapper objectMapper) {
    try {
      return objectMapper.readValue(bytesSingularityRequestWithState.class);
    } catch (IOException e) {
      throw new SingularityJsonException(e);
    }
  }
  public static String getRequestState(Optional<SingularityRequestWithStatemaybeRequestWithState) {
    if (maybeRequestWithState.isPresent()) {
      return maybeRequestWithState.get().getState().name();
    }
    return "MISSING";
  }
  public static boolean isActive(Optional<SingularityRequestWithStatemaybeRequestWithState) {
    return maybeRequestWithState.isPresent() && maybeRequestWithState.get().getState().isRunnable();
  }
  public SingularityRequestWithState(@JsonProperty("request"SingularityRequest request, @JsonProperty("state"RequestState state) {
    this. = request;
    this. = state;
  }
  public RequestState getState() {
    return ;
  }
    return ;
  }
  public String toString() {
    return "SingularityRequestWithState [request=" +  + ", state=" +  + "]";
  }
New to GrepCode? Check out our FAQ X