class InitialFlowWriter implements DataTreeChangeListener<Node> {

    @Override
    public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
        Set<InstanceIdentifier<?>> nodeIds = new HashSet<>();
        for (DataTreeModification<Node> change: changes) {
            DataObjectModification<Node> rootNode = change.getRootNode();
            final InstanceIdentifier<Node> identifier = change.getRootPath().getRootIdentifier();
            switch (rootNode.getModificationType()) {
                case WRITE:
                    if (rootNode.getDataBefore() == null) {
                        nodeIds.add(identifier);
                    }
                    break;
                default:
                    break;
            }
        }

        if (!nodeIds.isEmpty()) {
            initialFlowExecutor.execute(new InitialFlowWriterProcessor(nodeIds));
        }
    }

    public  InitialFlowWriter(SalFlowService salFlowService);

}