summaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java')
-rw-r--r--clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java b/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java
new file mode 100644
index 00000000000..9f4ecac84d4
--- /dev/null
+++ b/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/staterestapi/response/SetResponse.java
@@ -0,0 +1,28 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.clustercontroller.utils.staterestapi.response;
+
+/**
+ * The response of a set operation.
+ * @author dybdahl
+ */
+public class SetResponse {
+ private final String reason;
+ private final boolean wasModified;
+
+ public SetResponse(String reason, boolean wasModified) {
+ this.reason = reason;
+ this.wasModified = wasModified;
+ }
+
+ /**
+ * Indicates if data was modified in a set operation.
+ * @return true if modified.
+ */
+ public boolean getWasModified() { return wasModified; }
+
+ /**
+ * Human readable reason.
+ * @return reason as string
+ */
+ public String getReason() { return reason; }
+}