Search in sources :

Example 1 with ActionableResourceImpl

use of org.opendaylight.genius.utils.batching.ActionableResourceImpl in project netvirt by opendaylight.

the class BgpUtil method delete.

public <T extends DataObject> void delete(final InstanceIdentifier<T> path) {
    ActionableResource actResource = new ActionableResourceImpl(path.toString());
    actResource.setAction(ActionableResource.DELETE);
    actResource.setInstanceIdentifier(path);
    actResource.setInstance(null);
    bgpResourcesBufferQ.add(actResource);
}
Also used : ActionableResource(org.opendaylight.genius.utils.batching.ActionableResource) ActionableResourceImpl(org.opendaylight.genius.utils.batching.ActionableResourceImpl)

Example 2 with ActionableResourceImpl

use of org.opendaylight.genius.utils.batching.ActionableResourceImpl in project netvirt by opendaylight.

the class BgpRouteVrfEntryHandler method createFlows.

@Override
public void createFlows(InstanceIdentifier<VrfEntry> identifier, VrfEntry vrfEntry, String rd) {
    ActionableResource actResource = new ActionableResourceImpl(rd + vrfEntry.getDestPrefix());
    actResource.setAction(ActionableResource.CREATE);
    actResource.setInstanceIdentifier(identifier);
    actResource.setInstance(vrfEntry);
    vrfEntryBufferQ.add(actResource);
}
Also used : ActionableResource(org.opendaylight.genius.utils.batching.ActionableResource) ActionableResourceImpl(org.opendaylight.genius.utils.batching.ActionableResourceImpl)

Example 3 with ActionableResourceImpl

use of org.opendaylight.genius.utils.batching.ActionableResourceImpl in project netvirt by opendaylight.

the class BgpRouteVrfEntryHandler method updateFlows.

@Override
public void updateFlows(InstanceIdentifier<VrfEntry> identifier, VrfEntry original, VrfEntry update, String rd) {
    ActionableResource actResource = new ActionableResourceImpl(rd + update.getDestPrefix());
    actResource.setAction(ActionableResource.UPDATE);
    actResource.setInstanceIdentifier(identifier);
    actResource.setInstance(update);
    actResource.setOldInstance(original);
    vrfEntryBufferQ.add(actResource);
}
Also used : ActionableResource(org.opendaylight.genius.utils.batching.ActionableResource) ActionableResourceImpl(org.opendaylight.genius.utils.batching.ActionableResourceImpl)

Example 4 with ActionableResourceImpl

use of org.opendaylight.genius.utils.batching.ActionableResourceImpl in project netvirt by opendaylight.

the class BgpRouteVrfEntryHandler method removeFlows.

@Override
public void removeFlows(InstanceIdentifier<VrfEntry> identifier, VrfEntry vrfEntry, String rd) {
    ActionableResource actResource = new ActionableResourceImpl(rd + vrfEntry.getDestPrefix());
    actResource.setAction(ActionableResource.DELETE);
    actResource.setInstanceIdentifier(identifier);
    actResource.setInstance(vrfEntry);
    vrfEntryBufferQ.add(actResource);
}
Also used : ActionableResource(org.opendaylight.genius.utils.batching.ActionableResource) ActionableResourceImpl(org.opendaylight.genius.utils.batching.ActionableResourceImpl)

Example 5 with ActionableResourceImpl

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

the class ITMBatchingUtils method write.

public static <T extends DataObject> void write(InstanceIdentifier<T> path, T data, EntityType entityType) {
    ActionableResourceImpl actResource = new ActionableResourceImpl(path.toString());
    actResource.setAction(ActionableResource.CREATE);
    actResource.setInstanceIdentifier(path);
    actResource.setInstance(data);
    LOG.debug("Adding to the Queue to batch the write DS Operation - Id {} data {}", path, data);
    getQueue(entityType).add(actResource);
}
Also used : ActionableResourceImpl(org.opendaylight.genius.utils.batching.ActionableResourceImpl)

Aggregations

ActionableResourceImpl (org.opendaylight.genius.utils.batching.ActionableResourceImpl)15 ActionableResource (org.opendaylight.genius.utils.batching.ActionableResource)6