All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.singularity.SingularityKilledTaskIdRecord Maven / Gradle / Ivy

The newest version!
package com.hubspot.singularity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Optional;

public class SingularityKilledTaskIdRecord {

  private final SingularityTaskId taskId;
  private final long originalTimestamp;
  private final long timestamp;
  private final Optional requestCleanupType;
  private final Optional taskCleanupType;
  private final int retries;

  @JsonCreator
  public SingularityKilledTaskIdRecord(@JsonProperty("taskId") SingularityTaskId taskId, @JsonProperty("timestamp") long timestamp, @JsonProperty("originalTimestamp") long originalTimestamp,
      @JsonProperty("requestCleanupType") Optional requestCleanupType, @JsonProperty("taskCleanupType") Optional taskCleanupType,
      @JsonProperty("retries") int retries) {
    this.taskId = taskId;
    this.timestamp = timestamp;
    this.requestCleanupType = requestCleanupType;
    this.taskCleanupType = taskCleanupType;
    this.retries = retries;
    this.originalTimestamp = originalTimestamp;
  }

  public SingularityTaskId getTaskId() {
    return taskId;
  }

  public long getTimestamp() {
    return timestamp;
  }

  public Optional getRequestCleanupType() {
    return requestCleanupType;
  }

  public Optional getTaskCleanupType() {
    return taskCleanupType;
  }

  public long getOriginalTimestamp() {
    return originalTimestamp;
  }

  public int getRetries() {
    return retries;
  }

  @Override
  public String toString() {
    return "SingularityKilledTaskIdRecord [taskId=" + taskId + ", originalTimestamp=" + originalTimestamp + ", timestamp=" + timestamp + ", requestCleanupType=" + requestCleanupType + ", taskCleanupType=" + taskCleanupType + ", retries="
        + retries + "]";
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy