Add ShutDown message to RaftActor to transfer leader
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / Shutdown.java
diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/Shutdown.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/Shutdown.java
new file mode 100644 (file)
index 0000000..930a4b0
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.cluster.raft.client.messages;
+
+import java.io.Serializable;
+
+/**
+ * Message sent to a raft actor to shutdown gracefully. If it's the leader it will transfer leadership to a
+ * follower. As its last act, the actor self-destructs via a PoisonPill.
+ *
+ * @author Thomas Pantelis
+ */
+public class Shutdown implements Serializable {
+    private static final long serialVersionUID = 1L;
+}