* start listening on packetIn
*/
public void start() {
- SimpleTaskRetryLooper looper = new SimpleTaskRetryLooper(STARTUP_LOOP_TICK,
+ final SimpleTaskRetryLooper looper = new SimpleTaskRetryLooper(STARTUP_LOOP_TICK,
STARTUP_LOOP_MAX_RETRIES);
try {
notificationRegistration = looper.loopUntilNoException(new Callable<ListenerRegistration<DropTestCommiter>>() {
return notificationService.registerNotificationListener(DropTestCommiter.this);
}
});
- } catch (Exception e) {
+ } catch (final Exception e) {
LOG.warn("DropTest committer notification listener registration fail!");
LOG.debug("DropTest committer notification listener registration fail! ..", e);
throw new IllegalStateException("DropTest startup fail! Try again later.", e);
/**
* @param dataService the dataService to set
*/
- public void setDataService(DataBroker dataService) {
+ public void setDataService(final DataBroker dataService) {
this.dataService = dataService;
}
final FlowBuilder fb = BUILDER.get();
fb.setMatch(match);
fb.setInstructions(instructions);
- fb.setId(new FlowId(String.valueOf(fb.hashCode()) +"."+ ID_COUNTER.getAndIncrement()));
+ fb.setId(new FlowId(String.valueOf(fb.hashCode()) + "." + ID_COUNTER.getAndIncrement()));
// Construct the flow instance id
final InstanceIdentifier<Flow> flowInstanceId =
InstanceIdentifier.builder(Nodes.class)
// A particular node identified by nodeKey
.child(Node.class, node)
- // That is flow capable, only FlowCapableNodes have tables
+ // That is flow capable, only FlowCapableNodes have tables
.augmentation(FlowCapableNode.class)
- // In the table identified by TableKey
+ // In the table identified by TableKey
.child(Table.class, new TableKey((short) 0))
- // A flow identified by flowKey
+ // A flow identified by flowKey
.child(Flow.class, new FlowKey(fb.getId()))
.build();
@Override
public void close() {
+ super.close();
try {
LOG.debug("DropTestProvider stopped.");
if (notificationRegistration != null) {
notificationRegistration.close();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
LOG.warn("unregistration of notification listener failed: {}", e.getMessage());
LOG.debug("unregistration of notification listener failed.. ", e);
}
/**
* @param notificationService
*/
- public void setNotificationService(NotificationService notificationService) {
+ public void setNotificationService(final NotificationService notificationService) {
this.notificationService = notificationService;
}
}