Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix incorrect readResolve signatures
[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
index 930a4b0471f5152b4abe3f08b45b81198c67f675..4261baef2fd22f19c5374139f34f15ba063eb1b5 100644
(file)
--- 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
@@
-11,10
+11,20
@@
import java.io.Serializable;
/**
* Message sent to a raft actor to shutdown gracefully. If it's the leader it will transfer leadership to a
/**
* 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.
+ * follower. As its last act, the actor self-destructs via a PoisonPill. This message should only be used with
+ * Patterns.gracefulStop().
*
* @author Thomas Pantelis
*/
*
* @author Thomas Pantelis
*/
-public class Shutdown implements Serializable {
+public
final
class Shutdown implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
+ public static final Shutdown INSTANCE = new Shutdown();
+
+ private Shutdown() {
+ // Hidden on purpose
+ }
+
+ private Object readResolve() {
+ return INSTANCE;
+ }
}
}