2 * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.cluster.datastore;
12 * Wrapper class for DistributedDataStore configuration properties.
14 * @author Thomas Pantelis
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;
23 public DistributedDataStoreProperties() {
24 maxShardDataChangeListenerQueueSize = 1000;
25 maxShardDataChangeExecutorQueueSize = 1000;
26 maxShardDataChangeExecutorPoolSize = 20;
27 shardTransactionIdleTimeoutInMinutes = 10;
28 operationTimeoutInSeconds = 5;
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;
41 public int getMaxShardDataChangeListenerQueueSize() {
42 return maxShardDataChangeListenerQueueSize;
45 public int getMaxShardDataChangeExecutorQueueSize() {
46 return maxShardDataChangeExecutorQueueSize;
49 public int getMaxShardDataChangeExecutorPoolSize() {
50 return maxShardDataChangeExecutorPoolSize;
53 public int getShardTransactionIdleTimeoutInMinutes() {
54 return shardTransactionIdleTimeoutInMinutes;
57 public int getOperationTimeoutInSeconds() {
58 return operationTimeoutInSeconds;