2 * Copyright (c) 2016 Cisco Systems, Inc. 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
9 package org.opendaylight.groupbasedpolicy.base_endpoint;
13 import org.opendaylight.groupbasedpolicy.api.EndpointAugmentor;
14 import org.opendaylight.groupbasedpolicy.api.EndpointAugmentorRegistry;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
18 import com.google.common.collect.Sets;
20 public class EndpointAugmentorRegistryImpl implements EndpointAugmentorRegistry {
22 private final static Logger LOG = LoggerFactory.getLogger(EndpointAugmentorRegistryImpl.class);
23 private final Set<EndpointAugmentor> epAugmentors = Sets.newConcurrentHashSet();
26 public void register(EndpointAugmentor endpointAugmentor) {
27 if (epAugmentors.add(endpointAugmentor)) {
28 LOG.info("Registered EndpointAugmentor - {}", endpointAugmentor.getClass().getSimpleName());
33 public void unregister(EndpointAugmentor endpointAugmentor) {
34 if (epAugmentors.remove(endpointAugmentor)) {
35 LOG.info("Unegistered EndpointAugmentor - {}", endpointAugmentor.getClass().getSimpleName());
39 public Set<EndpointAugmentor> getEndpointAugmentors() {