2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore;
10 import static com.google.common.base.Verify.verifyNotNull;
12 import com.google.common.annotations.Beta;
13 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
14 import org.osgi.service.component.annotations.Activate;
15 import org.osgi.service.component.annotations.Component;
16 import org.osgi.service.component.annotations.Deactivate;
17 import org.osgi.service.component.annotations.Reference;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
22 @Component(immediate = true, service = DatastoreContextIntrospectorFactory.class)
23 public final class OSGiDatastoreContextIntrospectorFactory extends AbstractDatastoreContextIntrospectorFactory {
24 private static final Logger LOG = LoggerFactory.getLogger(OSGiDatastoreContextIntrospectorFactory.class);
27 volatile BindingNormalizedNodeSerializer serializer = null;
30 BindingNormalizedNodeSerializer serializer() {
31 return verifyNotNull(serializer);
35 @SuppressWarnings("static-method")
37 LOG.info("Datastore Context Introspector activated");
41 @SuppressWarnings("static-method")
43 LOG.info("Datastore Context Introspector deactivated");