1 package dst.ass3.messaging;
3 import java.util.Objects;
6 * Message sent by a worker after it is finished processing a request.
8 public class WorkerResponse {
11 * The ID of the original {@link UploadRequest}.
13 private String requestId;
16 * The time it took to process the request (in milliseconds).
18 private Long processingTime;
20 public String getRequestId() {
24 public void setRequestId(String requestId) {
25 this.requestId = requestId;
28 public Long getProcessingTime() {
29 return processingTime;
32 public void setProcessingTime(Long processingTime) {
33 this.processingTime = processingTime;
37 public boolean equals(Object o) {
41 if (o == null || getClass() != o.getClass()) {
44 WorkerResponse that = (WorkerResponse) o;
45 return Objects.equals(requestId, that.requestId) &&
46 Objects.equals(processingTime, that.processingTime);
50 public int hashCode() {
51 return Objects.hash(requestId, processingTime);
55 public String toString() {
56 return "WorkerResponse{" +
57 "requestId='" + requestId + '\'' +
58 ", processingTime=" + processingTime +