Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 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.store.service; |
| 17 | |
| 18 | import java.util.Collection; |
| 19 | import java.util.Map; |
| 20 | import java.util.Set; |
| 21 | import java.util.function.BiFunction; |
| 22 | import java.util.function.Function; |
| 23 | import java.util.function.Predicate; |
| 24 | |
| 25 | /** |
| 26 | * Testing adapter for the consistent map. |
| 27 | */ |
| 28 | public class ConsistentMapAdapter<K, V> implements ConsistentMap<K, V> { |
Madan Jampani | a090a11 | 2016-01-18 16:38:17 -0800 | [diff] [blame] | 29 | |
| 30 | @Override |
| 31 | public String name() { |
| 32 | return null; |
| 33 | } |
| 34 | |
| 35 | @Override |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 36 | public DistributedPrimitive.Type primitiveType() { |
Madan Jampani | a090a11 | 2016-01-18 16:38:17 -0800 | [diff] [blame] | 37 | return DistributedPrimitive.Type.CONSISTENT_MAP; |
| 38 | } |
| 39 | |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 40 | @Override |
| 41 | public int size() { |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public boolean isEmpty() { |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | @Override |
| 51 | public boolean containsKey(K key) { |
| 52 | return false; |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public boolean containsValue(V value) { |
| 57 | return false; |
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public Versioned<V> get(K key) { |
| 62 | return null; |
| 63 | } |
| 64 | |
| 65 | @Override |
| 66 | public Versioned<V> computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { |
| 67 | return null; |
| 68 | } |
| 69 | |
| 70 | @Override |
| 71 | public Versioned<V> compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 72 | return null; |
| 73 | } |
| 74 | |
| 75 | @Override |
| 76 | public Versioned<V> computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 77 | return null; |
| 78 | } |
| 79 | |
| 80 | @Override |
| 81 | public Versioned<V> computeIf(K key, Predicate<? super V> condition, |
| 82 | BiFunction<? super K, ? super V, ? extends V> remappingFunction) { |
| 83 | return null; |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public Versioned<V> put(K key, V value) { |
| 88 | return null; |
| 89 | } |
| 90 | |
| 91 | @Override |
| 92 | public Versioned<V> putAndGet(K key, V value) { |
| 93 | return null; |
| 94 | } |
| 95 | |
| 96 | @Override |
| 97 | public Versioned<V> remove(K key) { |
| 98 | return null; |
| 99 | } |
| 100 | |
| 101 | @Override |
| 102 | public void clear() { |
| 103 | |
| 104 | } |
| 105 | |
| 106 | @Override |
| 107 | public Set<K> keySet() { |
| 108 | return null; |
| 109 | } |
| 110 | |
| 111 | @Override |
| 112 | public Collection<Versioned<V>> values() { |
| 113 | return null; |
| 114 | } |
| 115 | |
| 116 | @Override |
| 117 | public Set<Map.Entry<K, Versioned<V>>> entrySet() { |
| 118 | return null; |
| 119 | } |
| 120 | |
| 121 | @Override |
| 122 | public Versioned<V> putIfAbsent(K key, V value) { |
| 123 | return null; |
| 124 | } |
| 125 | |
| 126 | @Override |
| 127 | public boolean remove(K key, V value) { |
| 128 | return false; |
| 129 | } |
| 130 | |
| 131 | @Override |
| 132 | public boolean remove(K key, long version) { |
| 133 | return false; |
| 134 | } |
| 135 | |
| 136 | @Override |
Jihwan Kim | 9887ad9 | 2015-12-12 00:23:57 +0900 | [diff] [blame] | 137 | public Versioned<V> replace(K key, V value) { |
| 138 | return null; |
| 139 | } |
| 140 | |
| 141 | @Override |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 142 | public boolean replace(K key, V oldValue, V newValue) { |
| 143 | return false; |
| 144 | } |
| 145 | |
| 146 | @Override |
| 147 | public boolean replace(K key, long oldVersion, V newValue) { |
| 148 | return false; |
| 149 | } |
| 150 | |
| 151 | @Override |
| 152 | public void addListener(MapEventListener<K, V> listener) { |
| 153 | |
| 154 | } |
| 155 | |
| 156 | @Override |
| 157 | public void removeListener(MapEventListener<K, V> listener) { |
| 158 | |
| 159 | } |
Madan Jampani | e106522 | 2015-08-17 16:21:51 -0700 | [diff] [blame] | 160 | |
| 161 | @Override |
| 162 | public Map<K, V> asJavaMap() { |
| 163 | return null; |
| 164 | } |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 165 | } |