Make Shutdown message a proper singleton
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / utils / ActorContext.java
index e7ab144a5a034dfd0b868d33f34bd81c9aeafbb5..37726d201b1a80de0e03643b2e2ccabbf7639c39 100644 (file)
@@ -381,7 +381,7 @@ public class ActorContext {
     public void shutdown() {
         FiniteDuration duration = datastoreContext.getShardRaftConfig().getElectionTimeOutInterval().$times(3);
         try {
-            Await.ready(Patterns.gracefulStop(shardManager, duration, new Shutdown()), duration);
+            Await.ready(Patterns.gracefulStop(shardManager, duration, Shutdown.INSTANCE), duration);
         } catch(Exception e) {
             LOG.warn("ShardManager for {} data store did not shutdown gracefully", getDataStoreName(), e);
         }