use of org.opendaylight.genius.utils.batching.DefaultBatchHandler in project genius by opendaylight.
the class ITMBatchingUtils method registerWithBatchManager.
public static void registerWithBatchManager(DataBroker broker) {
ITMBatchingUtils.setBroker(broker);
Integer batchSize = Integer.getInteger("batch.size", DEF_BATCH_SIZE);
Integer batchInterval = Integer.getInteger("batch.wait.time", DEF_PERIODICITY);
ResourceBatchingManager resBatchingManager = ResourceBatchingManager.getInstance();
resBatchingManager.registerBatchableResource("ITM-DEFAULT-OPERATIONAL", defaultOperationalShardBufferQ, new DefaultBatchHandler(broker, LogicalDatastoreType.OPERATIONAL, batchSize, batchInterval));
resBatchingManager.registerBatchableResource("ITM-DEFAULT-CONFIG", defaultConfigShardBufferQ, new DefaultBatchHandler(broker, LogicalDatastoreType.CONFIGURATION, batchSize, batchInterval));
}
use of org.opendaylight.genius.utils.batching.DefaultBatchHandler in project netvirt by opendaylight.
the class BgpUtil method init.
@PostConstruct
public void init() {
ResourceBatchingManager resBatchingManager = ResourceBatchingManager.getInstance();
Integer batchSize = Integer.getInteger("batch.size", DEFAULT_BATCH_SIZE);
Integer batchInterval = Integer.getInteger("batch.wait.time", DEFAULT_BATCH_INTERVAL);
resBatchingManager.registerBatchableResource(RESOURCE_TYPE, bgpResourcesBufferQ, new DefaultBatchHandler(dataBroker, LogicalDatastoreType.CONFIGURATION, batchSize, batchInterval));
}
Aggregations