Skip to content

Commit

Permalink
del: use of onWriteResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
elblasco committed Jul 30, 2024
1 parent 5e2097e commit 211c28a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/java/it/unitn/disi/ds1/qtop/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ public Receive createReceive() {
WriteRequest.class,
this::onWriteRequest
).match(
WriteResponse.class,
this::onWriteResponse
WriteValue.class,
this::onWriteValue
).match(
TimeOut.class,
this::onTimeOut
Expand All @@ -417,7 +417,8 @@ public Receive createReceive() {
LogLevel.INFO,
"[NODE-" + this.nodeId + "] received crash ACK from coordinator"
)
).build();
).matchAny(msg -> {})
.build();
}

/**
Expand Down Expand Up @@ -513,7 +514,7 @@ private void onWriteRequest(@NotNull WriteRequest msg) {
*
* @param msg the WriteResponse message
*/
private void onWriteResponse(@NotNull WriteResponse msg) {
private void onWriteValue(@NotNull WriteValue msg) {
this.timeOutManager.resetCountDown(
TimeOutReason.WRITE,
msg.nRequest()
Expand Down Expand Up @@ -977,7 +978,7 @@ private void coordinatorOnWriteRequest(WriteRequest msg) {
}
this.tell(
this.getSender(),
new WriteResponse(msg.nRequest()),
new WriteValue(msg.newValue(), msg.nRequest()),
this.getSelf()
);
int e = this.history.isEmpty() ? 0 : this.history.size() - 1;
Expand Down

0 comments on commit 211c28a

Please sign in to comment.