X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2Fregistry%2FRpcRegistry.java;h=c2ff0456f7cd04b5da3289a70a4fdf29bce84bc3;hp=1dcc4e140595250a0414eba706eada3e776f4ece;hb=refs%2Fchanges%2F62%2F27562%2F9;hpb=cf434f30a13bde72c33799e33de39fae5e62a773 diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java index 1dcc4e1405..c2ff0456f7 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/RpcRegistry.java @@ -15,6 +15,7 @@ import akka.japi.Pair; import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; +import org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig; import org.opendaylight.controller.remote.rpc.registry.RpcRegistry.Messages.AddOrUpdateRoutes; import org.opendaylight.controller.remote.rpc.registry.RpcRegistry.Messages.FindRouters; import org.opendaylight.controller.remote.rpc.registry.RpcRegistry.Messages.RemoveRoutes; @@ -34,12 +35,13 @@ import org.opendaylight.controller.sal.connector.api.RpcRouter.RouteIdentifier; */ public class RpcRegistry extends BucketStore { - public RpcRegistry() { + public RpcRegistry(RemoteRpcProviderConfig config) { + super(config); getLocalBucket().setData(new RoutingTable()); } - public static Props props() { - return Props.create(new RpcRegistryCreator()); + public static Props props(RemoteRpcProviderConfig config) { + return Props.create(new RpcRegistryCreator(config)); } @Override @@ -231,10 +233,15 @@ public class RpcRegistry extends BucketStore { private static class RpcRegistryCreator implements Creator { private static final long serialVersionUID = 1L; + private final RemoteRpcProviderConfig config; + + private RpcRegistryCreator(RemoteRpcProviderConfig config) { + this.config = config; + } @Override public RpcRegistry create() throws Exception { - RpcRegistry registry = new RpcRegistry(); + RpcRegistry registry = new RpcRegistry(config); RemoteRpcRegistryMXBean mxBean = new RemoteRpcRegistryMXBeanImpl(registry); return registry; }