CDS: Add stress test RPC to the cars model
[controller.git] / opendaylight / config / config-persister-impl / src / test / java / org / opendaylight / controller / config / persist / impl / DummyAdapter.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.config.persist.impl;
9
10 import java.io.IOException;
11 import java.util.Collections;
12 import java.util.List;
13 import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
14 import org.opendaylight.controller.config.persist.api.Persister;
15 import org.opendaylight.controller.config.persist.api.PropertiesProvider;
16 import org.opendaylight.controller.config.persist.api.StorageAdapter;
17
18 public class DummyAdapter implements StorageAdapter, Persister {
19
20     static int persist = 0;
21
22     @Override
23     public void persistConfig(ConfigSnapshotHolder holder) throws IOException {
24         persist++;
25     }
26
27     static int load = 0;
28
29     @Override
30     public List<ConfigSnapshotHolder> loadLastConfigs() throws IOException {
31         load++;
32         return Collections.emptyList();
33     }
34
35     static int props = 0;
36
37     @Override
38     public Persister instantiate(PropertiesProvider propertiesProvider) {
39         props++;
40         return this;
41     }
42
43     @Override
44     public void close() {
45     }
46
47 }