blob: d78b633a52383cd5b90b6b3a007f7434acdf65bf [file] [log] [blame]
Ray Milkey35958232015-07-29 11:19:28 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Ray Milkey35958232015-07-29 11:19:28 -07003 *
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.store.service;
17
18import java.util.Collection;
19import java.util.Map;
20import java.util.Set;
Madan Jampanifa242182016-01-22 13:42:54 -080021import java.util.concurrent.CompletableFuture;
Ray Milkey35958232015-07-29 11:19:28 -070022import java.util.function.BiFunction;
23
Madan Jampania090a112016-01-18 16:38:17 -080024import org.onosproject.store.service.DistributedPrimitive.Type;
25
Ray Milkey35958232015-07-29 11:19:28 -070026/**
27 * Testing adapter for EventuallyConsistentMap.
28 */
29public class EventuallyConsistentMapAdapter<K, V> implements EventuallyConsistentMap<K, V> {
Madan Jampania090a112016-01-18 16:38:17 -080030
31 @Override
32 public String name() {
33 return null;
34 }
35
36 @Override
Madan Jampani39fff102016-02-14 13:17:28 -080037 public Type primitiveType() {
Madan Jampania090a112016-01-18 16:38:17 -080038 return Type.EVENTUALLY_CONSISTENT_MAP;
39 }
40
Ray Milkey35958232015-07-29 11:19:28 -070041 @Override
42 public int size() {
43 return 0;
44 }
45
46 @Override
47 public boolean isEmpty() {
48 return false;
49 }
50
51 @Override
52 public boolean containsKey(K key) {
53 return false;
54 }
55
56 @Override
57 public boolean containsValue(V value) {
58 return false;
59 }
60
61 @Override
62 public V get(K key) {
63 return null;
64 }
65
66 @Override
67 public void put(K key, V value) {
68
69 }
70
71 @Override
72 public V remove(K key) {
73 return null;
74 }
75
76 @Override
77 public void remove(K key, V value) {
78
79 }
80
81 @Override
82 public V compute(K key, BiFunction<K, V, V> recomputeFunction) {
83 return null;
84 }
85
86 @Override
87 public void putAll(Map<? extends K, ? extends V> m) {
88
89 }
90
91 @Override
92 public void clear() {
93
94 }
95
96 @Override
97 public Set<K> keySet() {
98 return null;
99 }
100
101 @Override
102 public Collection<V> values() {
103 return null;
104 }
105
106 @Override
107 public Set<Map.Entry<K, V>> entrySet() {
108 return null;
109 }
110
111 @Override
112 public void addListener(EventuallyConsistentMapListener<K, V> listener) {
113
114 }
115
116 @Override
117 public void removeListener(EventuallyConsistentMapListener<K, V> listener) {
118
119 }
120
121 @Override
Madan Jampanifa242182016-01-22 13:42:54 -0800122 public CompletableFuture<Void> destroy() {
123 return CompletableFuture.completedFuture(null);
Ray Milkey35958232015-07-29 11:19:28 -0700124 }
125}