/** * Creates a ServiceType. * * @param type The type of the service dependency. * @param criticality The criticality of the required service for the operation of this service. * @param disasterImpact Short description of the impact of outages: what would happen if the system is not operational? * * @return ServiceType */ public static ServiceType serviceType(final String type, final Criticality criticality, final String disasterImpact) { return new ServiceType(type, criticality, disasterImpact); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ServiceSpec that = (ServiceSpec) o; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (url != null ? !url.equals(that.url) : that.url != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; return !(expectations != null ? !expectations.equals(that.expectations) : that.expectations != null); }
@Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (url != null ? url.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (expectations != null ? expectations.hashCode() : 0); return result; }
public static ServiceSpec serviceSpec(final String name, final String url) { return new ServiceSpec(name, url, unspecifiedService(), unspecifiedExpectations()); }
/** * Creates a ServiceType. * * @param type The type of the service dependency. * @param criticality The criticality of the required service for the operation of this service. * @param disasterImpact Short description of the impact of outages: what would happen if the system is not operational? * * @return ServiceType */ public static ServiceType serviceType(final String type, final Criticality criticality, final String disasterImpact) { return new ServiceType(type, criticality, disasterImpact); }
public static ServiceType unspecifiedService() { return new ServiceType("not specified", NOT_SPECIFIED, "not specified"); }
public static ServiceType unspecifiedService() { return new ServiceType("not specified", NOT_SPECIFIED, "not specified"); }