blob: f139664718f8627c0f9ae88b580f58fbe8642575 [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
18public 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 Milkey6f440332015-07-31 10:40:53 -070028 return TestConsistentMap.builder();
Ray Milkey35958232015-07-29 11:19:28 -070029 }
30
31 @Override
32 public <E> DistributedSetBuilder<E> setBuilder() {
Brian Stanke81fe2382016-03-03 15:54:32 -050033 return TestDistributedSet.builder();
Ray Milkey35958232015-07-29 11:19:28 -070034 }
35
36 @Override
Ray Milkey35958232015-07-29 11:19:28 -070037 public AtomicCounterBuilder atomicCounterBuilder() {
Ray Milkey24e60b32015-08-12 11:39:54 -070038 return TestAtomicCounter.builder();
Ray Milkey35958232015-07-29 11:19:28 -070039 }
40
41 @Override
42 public <V> AtomicValueBuilder<V> atomicValueBuilder() {
43 throw new UnsupportedOperationException("atomicValueBuilder");
44 }
45
46 @Override
47 public TransactionContextBuilder transactionContextBuilder() {
48 throw new UnsupportedOperationException("transactionContextBuilder");
49 }
helenyrwua1c41152016-08-18 16:16:14 -070050
51 @Override
Jordi Ortiz6c847762017-01-30 17:13:05 +010052 public <K, V> ConsistentMultimapBuilder<K, V> consistentMultimapBuilder() {
53 return TestConsistentMultimap.builder();
54 }
55
56 @Override
helenyrwua1c41152016-08-18 16:16:14 -070057 public <T> Topic<T> getTopic(String name, Serializer serializer) {
58 return new TestTopic(name);
59 }
Ray Milkey35958232015-07-29 11:19:28 -070060}