[ONOS-3163] Implementation of Storage service adapter
Change-Id: If5213354b94a47cfcfdef03aa24b1ec0f45be27b
Showing
2 changed files
with
90 additions
and
0 deletions
| 1 | +/* | ||
| 2 | + * Copyright 2015 Open Networking Laboratory | ||
| 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.vtnrsc.util; | ||
| 17 | + | ||
| 18 | +import org.onosproject.store.service.EventuallyConsistentMapBuilder; | ||
| 19 | +import org.onosproject.store.service.ConsistentMapBuilder; | ||
| 20 | +import org.onosproject.store.service.DistributedSetBuilder; | ||
| 21 | +import org.onosproject.store.service.DistributedQueueBuilder; | ||
| 22 | +import org.onosproject.store.service.AtomicCounterBuilder; | ||
| 23 | +import org.onosproject.store.service.AtomicValueBuilder; | ||
| 24 | +import org.onosproject.store.service.TransactionContextBuilder; | ||
| 25 | +import org.onosproject.store.service.StorageService; | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + * Adapter for the storage service. | ||
| 29 | + */ | ||
| 30 | +public class VtnStorageServiceAdapter implements StorageService { | ||
| 31 | + @Override | ||
| 32 | + public <K, V> EventuallyConsistentMapBuilder<K, V> eventuallyConsistentMapBuilder() { | ||
| 33 | + return null; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public <K, V> ConsistentMapBuilder<K, V> consistentMapBuilder() { | ||
| 38 | + return null; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @Override | ||
| 42 | + public <E> DistributedSetBuilder<E> setBuilder() { | ||
| 43 | + return null; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + public <E> DistributedQueueBuilder<E> queueBuilder() { | ||
| 48 | + return null; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @Override | ||
| 52 | + public AtomicCounterBuilder atomicCounterBuilder() { | ||
| 53 | + return null; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @Override | ||
| 57 | + public <V> AtomicValueBuilder<V> atomicValueBuilder() { | ||
| 58 | + return null; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + @Override | ||
| 62 | + public TransactionContextBuilder transactionContextBuilder() { | ||
| 63 | + return null; | ||
| 64 | + } | ||
| 65 | +} |
| 1 | +/* | ||
| 2 | + * Copyright 2015 Open Networking Laboratory | ||
| 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.vtnrsc.util; | ||
| 17 | + | ||
| 18 | +import org.onosproject.store.service.EventuallyConsistentMapBuilder; | ||
| 19 | + | ||
| 20 | +public class VtnStorageServiceTest extends VtnStorageServiceAdapter { | ||
| 21 | + @Override | ||
| 22 | + public <K, V> EventuallyConsistentMapBuilder<K, V> eventuallyConsistentMapBuilder() { | ||
| 23 | + return VtnEventuallyConsistentMapTest.builder(); | ||
| 24 | + } | ||
| 25 | +} |
-
Please register or login to post a comment