Skip to content
Browse files

Add isProtected() getter

  • Loading branch information...
1 parent d92ef6e commit bc9581f9d8a0ab1b3665f551c4095d9058c6df20 @dgomezferro committed Oct 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/com/yahoo/pasc/PascRuntime.java
View
6 src/main/java/com/yahoo/pasc/PascRuntime.java
@@ -172,7 +172,7 @@ public PascRuntime(boolean protection) {
if (protection != protectionReplica) {
throw new VariableCorruptionException("protection", protection, protectionReplica);
}
- if (protection) {
+ if (protection || protectionReplica) {
return invoke(handler, receivedMessage, control);
} else {
return unsafeInvoke(handler, receivedMessage);
@@ -371,4 +371,8 @@ public FailureHandler getFailureHandler() {
public void setFailureHandler(FailureHandler failureHandler) {
this.failureHandler = failureHandler;
}
+
+ public boolean isProtected() {
+ return protection;
+ }
}

0 comments on commit bc9581f

Please sign in to comment.
Something went wrong with that request. Please try again.