Search in sources :

Example 1 with TaskRetryLooper

use of org.opendaylight.genius.datastoreutils.TaskRetryLooper in project netvirt by opendaylight.

the class ChildListener method registerListener.

private ListenerRegistration<?> registerListener(final LogicalDatastoreType dsType, final InstanceIdentifier wildCard) throws Exception {
    DataTreeIdentifier<P> treeId = new DataTreeIdentifier<>(dsType, wildCard);
    TaskRetryLooper looper = new TaskRetryLooper(STARTUP_LOOP_TICK, STARTUP_LOOP_MAX_RETRIES);
    return looper.loopUntilNoException(() -> dataBroker.registerDataTreeChangeListener(treeId, this));
}
Also used : DataTreeIdentifier(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier) TaskRetryLooper(org.opendaylight.genius.datastoreutils.TaskRetryLooper)

Aggregations

DataTreeIdentifier (org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier)1 TaskRetryLooper (org.opendaylight.genius.datastoreutils.TaskRetryLooper)1