Merge "BUG-5192: FRM skips reconciliation"
[openflowplugin.git] / applications / statistics-manager / src / main / java / org / opendaylight / openflowplugin / applications / statistics / manager / impl / StatisticsManagerConfig.java
1 /*
2  * Copyright (c) 2015 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
9 package org.opendaylight.openflowplugin.applications.statistics.manager.impl;
10
11 public final class StatisticsManagerConfig {
12     private final int maxNodesForCollector;
13     private final int minRequestNetMonitorInterval;
14
15     private StatisticsManagerConfig(StatisticsManagerConfigBuilder builder) {
16         this.maxNodesForCollector = builder.getMaxNodesForCollector();
17         this.minRequestNetMonitorInterval = builder.getMinRequestNetMonitorInterval();
18     }
19
20     public int getMaxNodesForCollector() {
21         return maxNodesForCollector;
22     }
23
24     public int getMinRequestNetMonitorInterval() {
25         return minRequestNetMonitorInterval;
26     }
27
28     public static StatisticsManagerConfigBuilder builder() {
29         return new StatisticsManagerConfigBuilder();
30     }
31
32     public static class StatisticsManagerConfigBuilder {
33         private int maxNodesForCollector;
34         private int minRequestNetMonitorInterval;
35
36         public int getMaxNodesForCollector() {
37             return maxNodesForCollector;
38         }
39
40         public void setMaxNodesForCollector(int maxNodesForCollector) {
41             this.maxNodesForCollector = maxNodesForCollector;
42         }
43
44         public int getMinRequestNetMonitorInterval() {
45             return minRequestNetMonitorInterval;
46         }
47
48         public void setMinRequestNetMonitorInterval(int minRequestNetMonitorInterval) {
49             this.minRequestNetMonitorInterval = minRequestNetMonitorInterval;
50         }
51
52         public StatisticsManagerConfig build() {
53             return new StatisticsManagerConfig(this);
54         }
55     }
56 }