Bump versions 9.0.4-SNAPSHOT
[controller.git] / opendaylight / md-sal / sal-dummy-distributed-datastore / src / main / java / org / opendaylight / controller / dummy / datastore / DummyShardManager.java
index abc73db9ed741c30e3c8c2d12f53ba963707cee7..3112c49d92d41b7823a0805952736af5bc86c30f 100644 (file)
@@ -5,47 +5,25 @@
  * 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.dummy.datastore;
 
-import akka.actor.ActorContext;
 import akka.actor.Props;
-import akka.actor.UntypedActor;
-import akka.japi.Creator;
+import akka.actor.UntypedAbstractActor;
 
-public class DummyShardManager extends UntypedActor {
-    public DummyShardManager(Configuration configuration, String memberName, String[] shardNames,
-            String type) throws Exception {
-        new DummyShardsCreator(configuration, context(), memberName, shardNames, type).create();
+public final class DummyShardManager extends UntypedAbstractActor {
+    public DummyShardManager(final Configuration configuration, final String memberName, final String[] shardNames,
+            final String type) {
+        new DummyShardsCreator(configuration, getContext(), memberName, shardNames, type).create();
     }
 
     @Override
-    public void onReceive(Object message) throws Exception {
-
-    }
+    public void onReceive(final Object message) {
 
-    public static Props props(Configuration configuration, String memberName, String[] shardNames, String type) {
-        return Props.create(new DummyShardManagerCreator(configuration, memberName, shardNames, type));
     }
 
-    private static class DummyShardManagerCreator implements Creator<DummyShardManager> {
-
-        private final Configuration configuration;
-        private final String memberName;
-        private final String[] shardNames;
-        private final String type;
-
-        DummyShardManagerCreator(Configuration configuration, String memberName, String[] shardNames, String type) {
-            this.configuration = configuration;
-            this.memberName = memberName;
-            this.shardNames = shardNames;
-            this.type = type;
-        }
-
-        @Override
-        public DummyShardManager create() throws Exception {
-            return new DummyShardManager(configuration, memberName, shardNames, type);
-        }
+    public static Props props(final Configuration configuration, final String memberName, final String[] shardNames,
+            final String type) {
+        return Props.create(DummyShardManager.class, configuration, memberName, shardNames, type);
     }
 
     private static class DummyShardsCreator {
@@ -55,8 +33,8 @@ public class DummyShardManager extends UntypedActor {
         private final String[] shardNames;
         private final String type;
 
-        DummyShardsCreator(Configuration configuration, ActorContext actorSystem, String memberName,
-                String[] shardNames, String type) {
+        DummyShardsCreator(final Configuration configuration, final ActorContext actorSystem, final String memberName,
+                final String[] shardNames, final String type) {
             this.configuration = configuration;
             this.actorSystem = actorSystem;
             this.memberName = memberName;