Merge "Hotfix for resolving of remote yang schemas."
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DistributedDataStoreProperties.java
1 /*
2  * Copyright (c) 2014 Brocade Communications 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.controller.cluster.datastore;
10
11 /**
12  * Wrapper class for DistributedDataStore configuration properties.
13  *
14  * @author Thomas Pantelis
15  */
16 public class DistributedDataStoreProperties {
17     private final int maxShardDataChangeListenerQueueSize;
18     private final int maxShardDataChangeExecutorQueueSize;
19     private final int maxShardDataChangeExecutorPoolSize;
20     private final int shardTransactionIdleTimeoutInMinutes;
21
22     public DistributedDataStoreProperties() {
23         maxShardDataChangeListenerQueueSize = 1000;
24         maxShardDataChangeExecutorQueueSize = 1000;
25         maxShardDataChangeExecutorPoolSize = 20;
26         shardTransactionIdleTimeoutInMinutes = 10;
27     }
28
29     public DistributedDataStoreProperties(int maxShardDataChangeListenerQueueSize,
30             int maxShardDataChangeExecutorQueueSize, int maxShardDataChangeExecutorPoolSize,
31             int shardTransactionIdleTimeoutInMinutes) {
32         this.maxShardDataChangeListenerQueueSize = maxShardDataChangeListenerQueueSize;
33         this.maxShardDataChangeExecutorQueueSize = maxShardDataChangeExecutorQueueSize;
34         this.maxShardDataChangeExecutorPoolSize = maxShardDataChangeExecutorPoolSize;
35         this.shardTransactionIdleTimeoutInMinutes = shardTransactionIdleTimeoutInMinutes;
36     }
37
38     public int getMaxShardDataChangeListenerQueueSize() {
39         return maxShardDataChangeListenerQueueSize;
40     }
41
42     public int getMaxShardDataChangeExecutorQueueSize() {
43         return maxShardDataChangeExecutorQueueSize;
44     }
45
46     public int getMaxShardDataChangeExecutorPoolSize() {
47         return maxShardDataChangeExecutorPoolSize;
48     }
49
50     public int getShardTransactionIdleTimeoutInMinutes() {
51         return shardTransactionIdleTimeoutInMinutes;
52     }
53 }