Bug 2187: Timeout the Persist state
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / ServerChangeStatus.java
index 64a0f66fc2643b4d8c0227483ad2be84b22f860b..7616fe6743fd61f3b04f94baa6126ba77e687fce 100644 (file)
@@ -13,11 +13,39 @@ package org.opendaylight.controller.cluster.raft.messages;
  * @author Thomas Pantelis
  */
 public enum ServerChangeStatus {
+    /**
+     * Request successfully completed.
+     */
     OK,
+
+    /**
+     * No leader exists to process the request.
+     */
     NO_LEADER,
+
+    /**
+     * For an AddServer request, the leader timed out trying to install a snapshot on the new server.
+     */
     TIMEOUT,
+
+    /**
+     * For an AddServer request, the server to add already exists.
+     */
     ALREADY_EXISTS,
-    DOES_NOT_EXIST,  // Server with the specified address does not exist
-    NOT_SUPPORTED,   // Some types of RemoveServer for example Removing the current Leader may not be
-                     // supported (at least initially)
+
+    /**
+     * For a RemoveServer request, the server to remove does not exist.
+     */
+    DOES_NOT_EXIST,
+
+    /**
+     * The leader could not process the request due to a prior request that timed out while trying to
+     * achieve replication consensus.
+     */
+    PRIOR_REQUEST_CONSENSUS_TIMEOUT,
+
+    /**
+     * An unsupported request, for example removing the current leader may not be supported (at least initially)
+     */
+    NOT_SUPPORTED,
 }