Committed by
Gerrit Code Review
[ONOS-3163] VTN Eventually Consistent Map Adapter
Change-Id: I14ae4d09ed6761f56417525d76e8f291460ada03
Showing
1 changed file
with
114 additions
and
0 deletions
apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapAdapter.java
0 → 100644
| 1 | +/* | ||
| 2 | + * Copyright 2015 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 | + */ | ||
| 16 | +package org.onosproject.vtnrsc.util; | ||
| 17 | + | ||
| 18 | +import java.util.Collection; | ||
| 19 | +import java.util.Map; | ||
| 20 | +import java.util.Set; | ||
| 21 | +import java.util.function.BiFunction; | ||
| 22 | + | ||
| 23 | +import org.onosproject.store.service.EventuallyConsistentMap; | ||
| 24 | +import org.onosproject.store.service.EventuallyConsistentMapListener; | ||
| 25 | + | ||
| 26 | +/** | ||
| 27 | + * Testing adapter for EventuallyConsistentMap. | ||
| 28 | + */ | ||
| 29 | +public class VtnEventuallyConsistentMapAdapter<K, V> implements EventuallyConsistentMap<K, V> { | ||
| 30 | + @Override | ||
| 31 | + public int size() { | ||
| 32 | + return 0; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public boolean isEmpty() { | ||
| 37 | + return false; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @Override | ||
| 41 | + public boolean containsKey(K key) { | ||
| 42 | + return false; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @Override | ||
| 46 | + public boolean containsValue(V value) { | ||
| 47 | + return false; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + @Override | ||
| 51 | + public V get(K key) { | ||
| 52 | + return null; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + @Override | ||
| 56 | + public void put(K key, V value) { | ||
| 57 | + | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @Override | ||
| 61 | + public V remove(K key) { | ||
| 62 | + return null; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @Override | ||
| 66 | + public void remove(K key, V value) { | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + @Override | ||
| 71 | + public V compute(K key, BiFunction<K, V, V> recomputeFunction) { | ||
| 72 | + return null; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @Override | ||
| 76 | + public void putAll(Map<? extends K, ? extends V> m) { | ||
| 77 | + | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + @Override | ||
| 81 | + public void clear() { | ||
| 82 | + | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + @Override | ||
| 86 | + public Set<K> keySet() { | ||
| 87 | + return null; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + @Override | ||
| 91 | + public Collection<V> values() { | ||
| 92 | + return null; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + @Override | ||
| 96 | + public Set<Map.Entry<K, V>> entrySet() { | ||
| 97 | + return null; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + @Override | ||
| 101 | + public void addListener(EventuallyConsistentMapListener<K, V> listener) { | ||
| 102 | + | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + @Override | ||
| 106 | + public void removeListener(EventuallyConsistentMapListener<K, V> listener) { | ||
| 107 | + | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + @Override | ||
| 111 | + public void destroy() { | ||
| 112 | + | ||
| 113 | + } | ||
| 114 | +} |
-
Please register or login to post a comment