X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dummy-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fdummy%2Fdatastore%2FDummyShardManager.java;h=3112c49d92d41b7823a0805952736af5bc86c30f;hb=HEAD;hp=abc73db9ed741c30e3c8c2d12f53ba963707cee7;hpb=e2d4db3b6fa3be4c1ea40b5227499aedef5dd393;p=controller.git diff --git a/opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/java/org/opendaylight/controller/dummy/datastore/DummyShardManager.java b/opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/java/org/opendaylight/controller/dummy/datastore/DummyShardManager.java index abc73db9ed..3112c49d92 100644 --- a/opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/java/org/opendaylight/controller/dummy/datastore/DummyShardManager.java +++ b/opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/java/org/opendaylight/controller/dummy/datastore/DummyShardManager.java @@ -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 { - - 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;