From 0b6b9dabd692229ee836547bdfb25581b94c7bc3 Mon Sep 17 00:00:00 2001 From: "bessani@gmail.com" Date: Mon, 16 May 2011 17:22:40 +0000 Subject: [PATCH] --- src/navigators/smart/tom/ServiceReplica.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/navigators/smart/tom/ServiceReplica.java b/src/navigators/smart/tom/ServiceReplica.java index 6055ef04..dc2f2f2d 100644 --- a/src/navigators/smart/tom/ServiceReplica.java +++ b/src/navigators/smart/tom/ServiceReplica.java @@ -210,7 +210,7 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable { // Deliver the message to the application, and get the response byte[] response = executeCommand(msg.getSender(), msg.timestamp, - msg.nonces, msg.getContent(), msg.getDebugInfo()); + msg.nonces, msg.getContent(), msg.isReadOnlyRequest(), msg.getDebugInfo()); /** ISTO E CODIGO DO JOAO, PARA TRATAR DOS CHECKPOINTS */ requestsLock.lock(); @@ -306,6 +306,7 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable { requestsLock.unlock(); } + @Override public void waitForProcessingRequests() { requestsLock.lock(); while (!isQueueEmpty) { @@ -333,7 +334,10 @@ public abstract class ServiceReplica extends TOMReceiver implements Runnable { * @param timestamp A timestamp to be used by the application, in case it needs it * @param nonces Random values to be used by the application, in case it needs them * @param command The command issue by the client + * @param readOnly a flag indicating if the command need to be read-only (because + * it was not delivered through total order) or not + * @param info ? * @return the reply for the request issued by the client */ - public abstract byte[] executeCommand(int clientId, long timestamp, byte[] nonces, byte[] command, DebugInfo info); + public abstract byte[] executeCommand(int clientId, long timestamp, byte[] nonces, byte[] command, boolean readOnly, DebugInfo info); } -- GitLab