Search in sources :

Example 1 with ResourceBatchingManager

use of org.opendaylight.genius.utils.batching.ResourceBatchingManager 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));
}
Also used : ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) DefaultBatchHandler(org.opendaylight.genius.utils.batching.DefaultBatchHandler)

Example 2 with ResourceBatchingManager

use of org.opendaylight.genius.utils.batching.ResourceBatchingManager 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));
}
Also used : ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager) DefaultBatchHandler(org.opendaylight.genius.utils.batching.DefaultBatchHandler) PostConstruct(javax.annotation.PostConstruct)

Example 3 with ResourceBatchingManager

use of org.opendaylight.genius.utils.batching.ResourceBatchingManager in project genius by opendaylight.

the class FlowBatchingUtils method registerWithBatchManager.

public void registerWithBatchManager(ResourceHandler resourceHandler) {
    ResourceBatchingManager resBatchingManager = ResourceBatchingManager.getInstance();
    resBatchingManager.registerBatchableResource("MDSALUTIL-INVENTORY-CONFIG", inventoryConfigShardBufferQ, resourceHandler);
}
Also used : ResourceBatchingManager(org.opendaylight.genius.utils.batching.ResourceBatchingManager)

Aggregations

ResourceBatchingManager (org.opendaylight.genius.utils.batching.ResourceBatchingManager)3 DefaultBatchHandler (org.opendaylight.genius.utils.batching.DefaultBatchHandler)2 PostConstruct (javax.annotation.PostConstruct)1