Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -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 | public class TestStorageService extends StorageServiceAdapter { |
| 19 | |
| 20 | |
| 21 | @Override |
| 22 | public <K, V> EventuallyConsistentMapBuilder<K, V> eventuallyConsistentMapBuilder() { |
| 23 | return TestEventuallyConsistentMap.builder(); |
| 24 | } |
| 25 | |
| 26 | @Override |
| 27 | public <K, V> ConsistentMapBuilder<K, V> consistentMapBuilder() { |
Ray Milkey | 6f44033 | 2015-07-31 10:40:53 -0700 | [diff] [blame] | 28 | return TestConsistentMap.builder(); |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | @Override |
| 32 | public <E> DistributedSetBuilder<E> setBuilder() { |
Brian Stanke | 81fe238 | 2016-03-03 15:54:32 -0500 | [diff] [blame] | 33 | return TestDistributedSet.builder(); |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | @Override |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 37 | public AtomicCounterBuilder atomicCounterBuilder() { |
Ray Milkey | 24e60b3 | 2015-08-12 11:39:54 -0700 | [diff] [blame] | 38 | return TestAtomicCounter.builder(); |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | @Override |
Jordan Halterman | 5a1053e | 2017-05-19 18:03:47 -0700 | [diff] [blame] | 42 | public AtomicIdGeneratorBuilder atomicIdGeneratorBuilder() { |
| 43 | return TestAtomicIdGenerator.builder(); |
| 44 | } |
| 45 | |
| 46 | @Override |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 47 | public <V> AtomicValueBuilder<V> atomicValueBuilder() { |
| 48 | throw new UnsupportedOperationException("atomicValueBuilder"); |
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public TransactionContextBuilder transactionContextBuilder() { |
| 53 | throw new UnsupportedOperationException("transactionContextBuilder"); |
| 54 | } |
helenyrwu | a1c4115 | 2016-08-18 16:16:14 -0700 | [diff] [blame] | 55 | |
| 56 | @Override |
Jordi Ortiz | 6c84776 | 2017-01-30 17:13:05 +0100 | [diff] [blame] | 57 | public <K, V> ConsistentMultimapBuilder<K, V> consistentMultimapBuilder() { |
| 58 | return TestConsistentMultimap.builder(); |
| 59 | } |
| 60 | |
| 61 | @Override |
helenyrwu | a1c4115 | 2016-08-18 16:16:14 -0700 | [diff] [blame] | 62 | public <T> Topic<T> getTopic(String name, Serializer serializer) { |
| 63 | return new TestTopic(name); |
| 64 | } |
Pier Luigi | f094c61 | 2017-10-14 12:15:02 +0200 | [diff] [blame] | 65 | |
| 66 | @Override |
| 67 | public <K> AtomicCounterMapBuilder<K> atomicCounterMapBuilder() { |
| 68 | return TestAtomicCounterMap.builder(); |
| 69 | } |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 70 | } |