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
8 package org.opendaylight.mdsal.dom.store.inmemory;
10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
11 import javax.annotation.processing.Generated;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.immutables.value.Value;
14 import org.immutables.value.Value.Style.ImplementationVisibility;
17 * Holds configuration properties when creating an {@link InMemoryDOMDataStore} instance via the
18 * {@link InMemoryDOMDataStoreFactory}.
20 * @author Thomas Pantelis
21 * @see InMemoryDOMDataStoreFactory
24 @Value.Style(visibility = ImplementationVisibility.PRIVATE, allowedClasspathAnnotations = {
25 SuppressWarnings.class, Generated.class, SuppressFBWarnings.class,
27 public abstract class InMemoryDOMDataStoreConfigProperties {
29 public static final int DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE = 1000;
30 public static final int DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE = 20;
31 public static final int DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE = 1000;
32 public static final int DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE = 5000;
34 private static final @NonNull InMemoryDOMDataStoreConfigProperties DEFAULT = builder().build();
37 * Returns the InMemoryDOMDataStoreConfigProperties instance with default values.
39 * @return the InMemoryDOMDataStoreConfigProperties instance with default values.
41 public static @NonNull InMemoryDOMDataStoreConfigProperties getDefault() {
46 * Returns a new {@link InMemoryDOMDataStoreConfigPropertiesBuilder}.
48 * @return a new {@link InMemoryDOMDataStoreConfigPropertiesBuilder}.
50 public static @NonNull InMemoryDOMDataStoreConfigPropertiesBuilder builder() {
51 return new InMemoryDOMDataStoreConfigPropertiesBuilder();
55 * Returns true if transaction allocation debugging should be enabled.
57 * @return true if transaction allocation debugging should be enabled.
60 public boolean getDebugTransactions() {
65 * Returns the maximum queue size for the data change notification executor.
67 * @return the maximum queue size for the data change notification executor.
70 public int getMaxDataChangeExecutorQueueSize() {
71 return DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE;
75 * Returns the maximum thread pool size for the data change notification executor.
77 * @return the maximum thread pool size for the data change notification executor.
80 public int getMaxDataChangeExecutorPoolSize() {
81 return DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE;
85 * Returns the maximum queue size for the data change listeners.
88 public int getMaxDataChangeListenerQueueSize() {
89 return DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE;
93 * Returns the maximum queue size for the data store executor.
96 public int getMaxDataStoreExecutorQueueSize() {
97 return DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE;