import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.mdsal.dom.api.DOMDataBroker;
import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
-import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService;
-import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
-import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration;
-import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
+import org.opendaylight.mdsal.singleton.api.ClusterSingletonService;
+import org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider;
+import org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext;
import org.opendaylight.protocol.bmp.api.BmpDispatcher;
import org.opendaylight.protocol.bmp.impl.spi.BmpMonitoringStation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.monitor.rev200120.bmp.monitor.Monitor;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.monitor.rev200120.routers.Router;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.rfc2385.cfg.rev160324.Rfc2385Key;
+import org.opendaylight.yangtools.concepts.Registration;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
private static final QName MONITOR_ID_QNAME = QName.create(Monitor.QNAME, "monitor-id").intern();
private static final ServiceGroupIdentifier SERVICE_GROUP_IDENTIFIER =
- ServiceGroupIdentifier.create("bmp-monitors-service-group");
+ new ServiceGroupIdentifier("bmp-monitors-service-group");
private final DOMDataBroker domDataBroker;
private final InetSocketAddress address;
private final RouterSessionManager sessionManager;
private final YangInstanceIdentifier yangMonitorId;
private Channel channel;
- private ClusterSingletonServiceRegistration singletonServiceRegistration;
+ private Registration singletonServiceRegistration;
public BmpMonitoringStationImpl(final DOMDataBroker domDataBroker, final BmpDispatcher dispatcher,
final RIBExtensionConsumerContext extensions, final BindingCodecTree codecTree,
sessionManager = new RouterSessionManager(yangMonitorId, this.domDataBroker, extensions, codecTree);
LOG.info("BMP Monitor Singleton Service {} registered, Monitor Id {}",
- getIdentifier().getName(), this.monitorId.getValue());
+ getIdentifier().value(), this.monitorId.getValue());
singletonServiceRegistration = singletonProvider.registerClusterSingletonService(this);
}
@Override
public synchronized void instantiateServiceInstance() {
LOG.info("BMP Monitor Singleton Service {} instantiated, Monitor Id {}",
- getIdentifier().getName(), monitorId.getValue());
+ getIdentifier().value(), monitorId.getValue());
final ChannelFuture channelFuture = dispatcher.createServer(address, sessionManager,
constructKeys(monitoredRouters));
@Override
public synchronized FluentFuture<? extends CommitInfo> closeServiceInstance() {
LOG.info("BMP Monitor Singleton Service {} instance closed, Monitor Id {}",
- getIdentifier().getName(), monitorId.getValue());
+ getIdentifier().value(), monitorId.getValue());
if (channel != null) {
channel.close().addListener((ChannelFutureListener) future -> {
Preconditions.checkArgument(future.isSuccess(),