93a4876340bf85e5e7fd6b9659aada5865144861
[controller.git] / benchmark / dsbenchmark / src / main / java / org / opendaylight / dsbenchmark / DatastoreAbstractWriter.java
1 /*
2  * Copyright (c) 2015 Cisco Systems 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
9 package org.opendaylight.dsbenchmark;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput;
12
13 public abstract class DatastoreAbstractWriter {
14     protected final int outerListElem;
15     protected final int innerListElem;
16     protected final long writesPerTx;
17     protected final StartTestInput.Operation oper;
18
19     protected int txOk = 0;
20     protected int txError = 0;
21
22
23     public DatastoreAbstractWriter(StartTestInput.Operation oper,
24                                    int outerListElem, int innerListElem, long writesPerTx) {
25         this.outerListElem = outerListElem;
26         this.innerListElem = innerListElem;
27         this.writesPerTx = writesPerTx;
28         this.oper = oper;
29     }
30
31     public abstract void createList();
32     public abstract void executeList();
33
34     public int getTxError() {
35         return txError;
36     }
37
38     public int getTxOk() {
39         return txOk;
40     }
41
42 }