blob: 772337ea223d5a95476f7e7efd659dd125da8bb0 [file] [log] [blame]
Jian Li75642312017-01-19 14:23:05 -08001/*
2 * Copyright 2017-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.mapping.impl;
17
Jian Li92919592017-02-27 17:10:47 +090018import org.apache.felix.scr.annotations.Activate;
19import org.apache.felix.scr.annotations.Component;
20import org.apache.felix.scr.annotations.Deactivate;
21import org.apache.felix.scr.annotations.Service;
22import org.onosproject.mapping.Mapping;
23import org.onosproject.mapping.MappingEvent;
24import org.onosproject.mapping.MappingEntry;
Jian Li75642312017-01-19 14:23:05 -080025import org.onosproject.mapping.MappingStore;
Jian Li95edb592017-01-29 08:42:07 +090026import org.onosproject.mapping.MappingStoreDelegate;
Jian Li92919592017-02-27 17:10:47 +090027import org.onosproject.net.DeviceId;
28import org.onosproject.store.AbstractStore;
29import org.osgi.service.component.ComponentContext;
30import org.slf4j.Logger;
31
32import static org.slf4j.LoggerFactory.getLogger;
Jian Li75642312017-01-19 14:23:05 -080033
34/**
35 * Implementation of a distributed store for managing mapping information.
36 */
Jian Li92919592017-02-27 17:10:47 +090037@Component(immediate = true)
38@Service
39public class DistributedMappingStore
40 extends AbstractStore<MappingEvent, MappingStoreDelegate>
41 implements MappingStore {
42
43 private final Logger log = getLogger(getClass());
44
45 @Activate
46 public void activate(ComponentContext context) {
47 log.info("Started");
48 }
49
50 @Deactivate
51 public void deactivate(ComponentContext context) {
52 log.info("Stopped");
53 }
54
Jian Li95edb592017-01-29 08:42:07 +090055 @Override
56 public void setDelegate(MappingStoreDelegate delegate) {
57
58 }
59
60 @Override
61 public void unsetDelegate(MappingStoreDelegate delegate) {
62
63 }
64
65 @Override
66 public boolean hasDelegate() {
67 return false;
68 }
Jian Li92919592017-02-27 17:10:47 +090069
70 @Override
71 public int getMappingCount(Type type) {
72 return 0;
73 }
74
75 @Override
76 public MappingEntry getMappingEntry(Type type, Mapping mapping) {
77 return null;
78 }
79
80 @Override
81 public Iterable<MappingEntry> getMappingEntries(Type type, DeviceId deviceId) {
82 return null;
83 }
84
85 @Override
86 public void deleteMapping(Type type, Mapping mapping) {
87
88 }
89
90 @Override
91 public MappingEvent addOrUpdateMappingEntry(Type type, MappingEntry entry) {
92 return null;
93 }
94
95 @Override
96 public MappingEvent removeMappingEntry(Type type, MappingEntry entry) {
97 return null;
98 }
99
100 @Override
101 public MappingEvent pendingMappingEntry(Type type, MappingEntry entry) {
102 return null;
103 }
104
105 @Override
106 public void purgeMappingEntries(Type type) {
107
108 }
Jian Li75642312017-01-19 14:23:05 -0800109}