*/
package org.opendaylight.controller.cluster.datastore.admin;
-import com.google.common.annotations.Beta;
import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface;
import org.opendaylight.controller.eos.akka.DataCenterControl;
import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ClusterAdminService;
-import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.concepts.Registration;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@Beta
-@Component(immediate = true)
+@Component(service = { })
public final class OSGiClusterAdmin {
private static final Logger LOG = LoggerFactory.getLogger(OSGiClusterAdmin.class);
- @Reference(target = "(type=distributed-config)")
- DistributedDataStoreInterface configDatastore = null;
- @Reference(target = "(type=distributed-operational)")
- DistributedDataStoreInterface operDatastore = null;
- @Reference
- BindingNormalizedNodeSerializer serializer = null;
- @Reference
- RpcProviderService rpcProviderService = null;
- @Reference
- DataCenterControl dataCenterControl = null;
-
- private ObjectRegistration<?> reg;
+ private final Registration reg;
@Activate
- void activate() {
+ public OSGiClusterAdmin(
+ @Reference(target = "(type=distributed-config)") final DistributedDataStoreInterface configDatastore,
+ @Reference(target = "(type=distributed-operational)") final DistributedDataStoreInterface operDatastore,
+ @Reference final BindingNormalizedNodeSerializer serializer,
+ @Reference final RpcProviderService rpcProviderService,
+ @Reference final DataCenterControl dataCenterControls,
+ @Reference final DataCenterControl dataCenterControl) {
reg = rpcProviderService.registerRpcImplementation(ClusterAdminService.class,
new ClusterAdminRpcService(configDatastore, operDatastore, serializer, dataCenterControl));
LOG.info("Cluster Admin services started");