X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FOSGiDatastoreContextIntrospectorFactory.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FOSGiDatastoreContextIntrospectorFactory.java;h=8332bcf29e12eab8841570b894795296869125fc;hp=0000000000000000000000000000000000000000;hb=b65e66f7b1bafb0d0c5fbe1c569835eb890f672a;hpb=42ec9dc63df7cea0ae3a4d841aa14a21ba948859 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OSGiDatastoreContextIntrospectorFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OSGiDatastoreContextIntrospectorFactory.java new file mode 100644 index 0000000000..8332bcf29e --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/OSGiDatastoreContextIntrospectorFactory.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * 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.cluster.datastore; + +import static com.google.common.base.Verify.verifyNotNull; + +import com.google.common.annotations.Beta; +import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +@Beta +@Component(immediate = true, service = DatastoreContextIntrospectorFactory.class) +public final class OSGiDatastoreContextIntrospectorFactory extends AbstractDatastoreContextIntrospectorFactory { + private static final Logger LOG = LoggerFactory.getLogger(OSGiDatastoreContextIntrospectorFactory.class); + + @Reference + volatile BindingNormalizedNodeSerializer serializer = null; + + @Override + BindingNormalizedNodeSerializer serializer() { + return verifyNotNull(serializer); + } + + @Activate + @SuppressWarnings("static-method") + void activate() { + LOG.info("Datastore Context Introspector activated"); + } + + @Deactivate + @SuppressWarnings("static-method") + void deactivate() { + LOG.info("Datastore Context Introspector deactivated"); + } +}