Jordan Halterman | 980a8c1 | 2017-09-22 18:01:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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 | /** |
| 19 | * Atomic value adapter. |
| 20 | */ |
| 21 | public class AtomicValueAdapter<V> implements AtomicValue<V> { |
| 22 | private final String name; |
| 23 | |
| 24 | public AtomicValueAdapter() { |
| 25 | this(null); |
| 26 | } |
| 27 | |
| 28 | public AtomicValueAdapter(String name) { |
| 29 | this.name = name; |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public String name() { |
| 34 | return null; |
| 35 | } |
| 36 | |
| 37 | @Override |
| 38 | public Type primitiveType() { |
| 39 | return null; |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public boolean compareAndSet(V expect, V update) { |
| 44 | return false; |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public V get() { |
| 49 | return null; |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public V getAndSet(V value) { |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | @Override |
| 58 | public void set(V value) { |
| 59 | |
| 60 | } |
| 61 | |
| 62 | @Override |
| 63 | public void addListener(AtomicValueEventListener<V> listener) { |
| 64 | |
| 65 | } |
| 66 | |
| 67 | @Override |
| 68 | public void removeListener(AtomicValueEventListener<V> listener) { |
| 69 | |
| 70 | } |
| 71 | } |