Merge "Bug 1637: Change Rpc actor calls to async"
[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     private final int operationTimeoutInSeconds;
22
23     public DistributedDataStoreProperties() {
24         maxShardDataChangeListenerQueueSize = 1000;
25         maxShardDataChangeExecutorQueueSize = 1000;
26         maxShardDataChangeExecutorPoolSize = 20;
27         shardTransactionIdleTimeoutInMinutes = 10;
28         operationTimeoutInSeconds = 5;
29     }
30
31     public DistributedDataStoreProperties(int maxShardDataChangeListenerQueueSize,
32             int maxShardDataChangeExecutorQueueSize, int maxShardDataChangeExecutorPoolSize,
33             int shardTransactionIdleTimeoutInMinutes, int operationTimeoutInSeconds) {
34         this.maxShardDataChangeListenerQueueSize = maxShardDataChangeListenerQueueSize;
35         this.maxShardDataChangeExecutorQueueSize = maxShardDataChangeExecutorQueueSize;
36         this.maxShardDataChangeExecutorPoolSize = maxShardDataChangeExecutorPoolSize;
37         this.shardTransactionIdleTimeoutInMinutes = shardTransactionIdleTimeoutInMinutes;
38         this.operationTimeoutInSeconds = operationTimeoutInSeconds;
39     }
40
41     public int getMaxShardDataChangeListenerQueueSize() {
42         return maxShardDataChangeListenerQueueSize;
43     }
44
45     public int getMaxShardDataChangeExecutorQueueSize() {
46         return maxShardDataChangeExecutorQueueSize;
47     }
48
49     public int getMaxShardDataChangeExecutorPoolSize() {
50         return maxShardDataChangeExecutorPoolSize;
51     }
52
53     public int getShardTransactionIdleTimeoutInMinutes() {
54         return shardTransactionIdleTimeoutInMinutes;
55     }
56
57     public int getOperationTimeoutInSeconds() {
58         return operationTimeoutInSeconds;
59     }
60 }