blob: a79827628dff0ff665f1347dcf502f852ef879f0 [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
Jordan Halterman5a1053e2017-05-19 18:03:47 -070042 public AtomicIdGeneratorBuilder atomicIdGeneratorBuilder() {
43 return TestAtomicIdGenerator.builder();
44 }
45
46 @Override
Ray Milkey35958232015-07-29 11:19:28 -070047 public <V> AtomicValueBuilder<V> atomicValueBuilder() {
48 throw new UnsupportedOperationException("atomicValueBuilder");
49 }
50
51 @Override
52 public TransactionContextBuilder transactionContextBuilder() {
53 throw new UnsupportedOperationException("transactionContextBuilder");
54 }
helenyrwua1c41152016-08-18 16:16:14 -070055
56 @Override
Jordi Ortiz6c847762017-01-30 17:13:05 +010057 public <K, V> ConsistentMultimapBuilder<K, V> consistentMultimapBuilder() {
58 return TestConsistentMultimap.builder();
59 }
60
61 @Override
helenyrwua1c41152016-08-18 16:16:14 -070062 public <T> Topic<T> getTopic(String name, Serializer serializer) {
63 return new TestTopic(name);
64 }
Ray Milkey35958232015-07-29 11:19:28 -070065}