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 org.eclipse.jdt.annotation.NonNull;
11 import org.immutables.value.Value;
12 import org.immutables.value.Value.Style.ImplementationVisibility;
15 * Holds configuration properties when creating an {@link InMemoryDOMDataStore} instance via the
16 * {@link InMemoryDOMDataStoreFactory}.
18 * @author Thomas Pantelis
19 * @see InMemoryDOMDataStoreFactory
22 @Value.Style(visibility = ImplementationVisibility.PRIVATE)
23 public abstract class InMemoryDOMDataStoreConfigProperties {
25 public static final int DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE = 1000;
26 public static final int DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE = 20;
27 public static final int DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE = 1000;
28 public static final int DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE = 5000;
30 private static final @NonNull InMemoryDOMDataStoreConfigProperties DEFAULT = builder().build();
33 * Returns the InMemoryDOMDataStoreConfigProperties instance with default values.
35 * @return the InMemoryDOMDataStoreConfigProperties instance with default values.
37 public static @NonNull InMemoryDOMDataStoreConfigProperties getDefault() {
42 * Returns a new {@link InMemoryDOMDataStoreConfigPropertiesBuilder}.
44 * @return a new {@link InMemoryDOMDataStoreConfigPropertiesBuilder}.
46 public static @NonNull InMemoryDOMDataStoreConfigPropertiesBuilder builder() {
47 return new InMemoryDOMDataStoreConfigPropertiesBuilder();
51 * Returns true if transaction allocation debugging should be enabled.
53 * @return true if transaction allocation debugging should be enabled.
56 public boolean getDebugTransactions() {
61 * Returns the maximum queue size for the data change notification executor.
63 * @return the maximum queue size for the data change notification executor.
66 public int getMaxDataChangeExecutorQueueSize() {
67 return DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE;
71 * Returns the maximum thread pool size for the data change notification executor.
73 * @return the maximum thread pool size for the data change notification executor.
76 public int getMaxDataChangeExecutorPoolSize() {
77 return DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE;
81 * Returns the maximum queue size for the data change listeners.
84 public int getMaxDataChangeListenerQueueSize() {
85 return DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE;
89 * Returns the maximum queue size for the data store executor.
92 public int getMaxDataStoreExecutorQueueSize() {
93 return DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE;