Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check more often, use time triggered as a factor in disasters
- Loading branch information
Showing
9 changed files
with
196 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
SingularityBase/src/main/java/com/hubspot/singularity/SingularityDisasterDataPoints.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.hubspot.singularity; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.common.base.Objects; | ||
|
||
public class SingularityDisasterDataPoints { | ||
private final List<SingularityDisasterDataPoint> dataPoints; | ||
|
||
@JsonCreator | ||
public SingularityDisasterDataPoints(@JsonProperty("dataPoints") List<SingularityDisasterDataPoint> dataPoints) { | ||
this.dataPoints = dataPoints; | ||
} | ||
|
||
public static SingularityDisasterDataPoints empty() { | ||
return new SingularityDisasterDataPoints(new ArrayList<SingularityDisasterDataPoint>()); | ||
} | ||
|
||
public List<SingularityDisasterDataPoint> getDataPoints() { | ||
return dataPoints; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
SingularityDisasterDataPoints that = (SingularityDisasterDataPoints) o; | ||
return Objects.equal(dataPoints, that.dataPoints); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hashCode(dataPoints); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return Objects.toStringHelper(this) | ||
.add("dataPoints", dataPoints) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.