@Override protected SerializedDOMDataBroker create() { // This Databroker is dedicated for netconf metadata, not expected to be under heavy load ExecutorService listenableFutureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool(1, 100, "commits", getClass()); ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor(100, "WriteTxCommit", getClass()); // TODO HONEYCOMB-164 try to provide more lightweight implementation of DataBroker Map<LogicalDatastoreType, DOMStore> map = new LinkedHashMap<>(); map.put(LogicalDatastoreType.CONFIGURATION, cfgDataStore); map.put(LogicalDatastoreType.OPERATIONAL, operDataStore); return new SerializedDOMDataBroker(map, new DeadlockDetectingListeningExecutorService(commitExecutor, TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, listenableFutureExecutor)); } }
private static ExecutorService createExecutorService(final String name, final InMemoryDOMDataStoreConfigProperties props) { // For DataChangeListener notifications we use an executor that provides the fastest // task execution time to get higher throughput as DataChangeListeners typically provide // much of the business logic for a data model. If the executor queue size limit is reached, // subsequent submitted notifications will block the calling thread. return SpecialExecutors.newBlockingBoundedFastThreadPool( props.getMaxDataChangeExecutorPoolSize(), props.getMaxDataChangeExecutorQueueSize(), name + "-DCL", InMemoryDOMDataStore.class); } }
public ReconciliationManager(final DataBroker db) { this.db = db; reconcilers = SpecialExecutors.newBoundedCachedThreadPool(NO_OF_RECONCILER, RECON_TASK_QUEUE_SIZE, "ovsdb-reconciler"); ThreadFactory threadFact = new ThreadFactoryBuilder() .setNameFormat("ovsdb-recon-task-triager-%d").build(); taskTriager = Executors.newSingleThreadScheduledExecutor(threadFact); bridgeNodeCache = buildBridgeNodeCache(); }
private DOMDataBroker createDataStore(SchemaService schemaService) { final DOMStore operStore = InMemoryDOMDataStoreFactory .create("DOM-OPER", schemaService); final DOMStore configStore = InMemoryDOMDataStoreFactory .create("DOM-CFG", schemaService); ExecutorService listenableFutureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool( 16, 16, "CommitFutures"); final EnumMap<LogicalDatastoreType, DOMStore> datastores = new EnumMap<>(LogicalDatastoreType.class); datastores.put(LogicalDatastoreType.CONFIGURATION, configStore); datastores.put(LogicalDatastoreType.OPERATIONAL, operStore); return new SerializedDOMDataBroker(datastores, MoreExecutors.listeningDecorator(listenableFutureExecutor)); }
private void createConcurrentDOMDataBroker() { this.listenableFutureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool( this.maxDataBrokerFutureCallbackPoolSize, this.maxDataBrokerFutureCallbackQueueSize, "CommitFutures", Logger.class); this.commitStatsTracker = DurationStatisticsTracker.createConcurrent(); final Map<LogicalDatastoreType, DOMStore> datastores = new HashMap<>(); datastores.put(LogicalDatastoreType.CONFIGURATION, this.configDatastore); datastores.put(LogicalDatastoreType.OPERATIONAL, this.operDatastore); this.concurrentDOMDataBroker = new ConcurrentDOMDataBroker(datastores, this.listenableFutureExecutor, this.commitStatsTracker); this.concurrentDOMDataBrokerOld = new LegacyDOMDataBrokerAdapter(this.concurrentDOMDataBroker); }
ExecutorService listenableFutureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool( getMaxDataBrokerFutureCallbackPoolSize(), getMaxDataBrokerFutureCallbackQueueSize(), "CommitFutures"); ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor( getMaxDataBrokerCommitQueueSize(), "WriteTxCommit");
int dclExecutorMaxPoolSize = actualProperties.getMaxDataChangeExecutorPoolSize(); ExecutorService dataChangeListenerExecutor = SpecialExecutors.newBlockingBoundedFastThreadPool( dclExecutorMaxPoolSize, dclExecutorMaxQueueSize, name + "-DCL" );
int dclExecutorMaxPoolSize = actualProperties.getMaxDataChangeExecutorPoolSize(); ExecutorService dataChangeListenerExecutor = SpecialExecutors.newBlockingBoundedFastThreadPool( dclExecutorMaxPoolSize, dclExecutorMaxQueueSize, name + "-DCL", InMemoryDOMDataStore.class);