Package com.asakusafw.vocabulary.flow.graph

Examples of com.asakusafw.vocabulary.flow.graph.FlowElementResolver


                    ShuffleKey.Order[]{})));
            builder1.addOutput("joined", ExJoined.class);
            builder1.addOutput("missed", Ex2.class);
            builder1.addAttribute(new OperatorHelper("selector", Arrays.asList(new Class<?>[]{List.class, Ex2.class})));
            builder1.addAttribute(FlowBoundary.SHUFFLE);
            FlowElementResolver resolver1 = builder1.toResolver();
            resolver1.resolveInput("ex1", ex1);
            resolver1.resolveInput("ex2", ex2);
            this.joined = resolver1.resolveOutput("joined");
            this.missed = resolver1.resolveOutput("missed");
        }
View Full Code Here


            builder.declareParameter(int.class);
            builder.addInput("model", Ex1.class);
            builder.addOutput("original", Ex1.class);
            builder.addOutput("out", Ex2.class);
            builder.addParameter("parameter", int.class, parameter);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("model", model);
            this.original = resolver.resolveOutput("original");
            this.out = resolver.resolveOutput("out");
        }
View Full Code Here

            builder.declare(ConvertFlow.class, ConvertFlowImpl.class, "simple");
            builder.declareParameter(Ex1.class);
            builder.addInput("model", Ex1.class);
            builder.addOutput("original", Ex1.class);
            builder.addOutput("out", Ex2.class);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("model", model);
            this.original = resolver.resolveOutput("original");
            this.out = resolver.resolveOutput("out");
        }
View Full Code Here

            OperatorDescription.Builder builder = new OperatorDescription.Builder(Update.class);
            builder.declare(UpdateFlow.class, UpdateFlowImpl.class, "simple");
            builder.declareParameter(Ex1.class);
            builder.addInput("model", Ex1.class);
            builder.addOutput("out", Ex1.class);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("model", model);
            this.out = resolver.resolveOutput("out");
        }
View Full Code Here

            builder.declareParameter(Ex1.class);
            builder.declareParameter(int.class);
            builder.addInput("model", Ex1.class);
            builder.addOutput("out", Ex1.class);
            builder.addParameter("parameter", int.class, parameter);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("model", model);
            this.out = resolver.resolveOutput("out");
        }
View Full Code Here

            builder.addInput("model", Ex1.class, new ShuffleKey(Arrays.asList(new String[]{"string"}), Arrays.asList(new
                    ShuffleKey.Order[]{})));
            builder.addOutput("found", Ex1.class);
            builder.addOutput("missed", Ex1.class);
            builder.addAttribute(FlowBoundary.SHUFFLE);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("master", master);
            resolver.resolveInput("model", model);
            this.found = resolver.resolveOutput("found");
            this.missed = resolver.resolveOutput("missed");
        }
View Full Code Here

                    new ShuffleKey.Order[]{})));
            builder0.addOutput("found", Ex1.class);
            builder0.addOutput("missed", Ex1.class);
            builder0.addAttribute(new OperatorHelper("selector", Arrays.asList(new Class<?>[]{List.class, Ex1.class})));
            builder0.addAttribute(FlowBoundary.SHUFFLE);
            FlowElementResolver resolver0 = builder0.toResolver();
            resolver0.resolveInput("master", master);
            resolver0.resolveInput("model", model);
            this.found = resolver0.resolveOutput("found");
            this.missed = resolver0.resolveOutput("missed");
        }
View Full Code Here

            builder.declareParameter(String.class);
            builder.addInput("model", Ex1.class);
            builder.addOutput("out", Ex1.class);
            builder.addParameter("parameter", String.class, parameter);
            builder.addAttribute(ObservationCount.AT_LEAST_ONCE);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("model", model);
            this.out = resolver.resolveOutput("out");
        }
View Full Code Here

        builder.addAttribute(new TraceSettingAttribute(setting, counter.incrementAndGet()));
        builder.addAttribute(Connectivity.OPTIONAL);
        if (setting.getMode() == Mode.STRICT) {
            builder.addAttribute(ObservationCount.EXACTLY_ONCE);
            port.disconnectAll();
            FlowElementResolver resolver = builder.toResolver();
            FlowElementInput input = resolver.getInput(INPUT_PORT_NAME);
            for (FlowElementOutput upstream : upstreams) {
                PortConnection.connect(upstream, input);
            }
            FlowElementOutput output = resolver.getOutput(OUTPUT_PORT_NAME);
            for (FlowElementInput downstream : downstreams) {
                PortConnection.connect(output, downstream);
            }
        } else if (setting.getMode() == Mode.IN_ORDER) {
            builder.addAttribute(ObservationCount.AT_LEAST_ONCE);
            port.disconnectAll();
            FlowElementResolver resolver = builder.toResolver();
            FlowElementInput input = resolver.getInput(INPUT_PORT_NAME);
            for (FlowElementOutput upstream : upstreams) {
                PortConnection.connect(upstream, input);
            }
            FlowElementOutput output = resolver.getOutput(OUTPUT_PORT_NAME);
            for (FlowElementInput downstream : downstreams) {
                PortConnection.connect(output, downstream);
            }
        } else if (setting.getMode() == Mode.OUT_OF_ORDER) {
            builder.addAttribute(ObservationCount.AT_LEAST_ONCE);
            FlowElementResolver resolver = builder.toResolver();
            FlowElementInput input = resolver.getInput(INPUT_PORT_NAME);
            for (FlowElementOutput upstream : upstreams) {
                PortConnection.connect(upstream, input);
            }
        }
    }
View Full Code Here

                    ShuffleKey.Order[]{})));
            builder.addOutput("high", Ex1.class);
            builder.addOutput("low", Ex1.class);
            builder.addOutput("stop", Ex1.class);
            builder.addAttribute(FlowBoundary.SHUFFLE);
            FlowElementResolver resolver = builder.toResolver();
            resolver.resolveInput("master", master);
            resolver.resolveInput("model", model);
            this.high = resolver.resolveOutput("high");
            this.low = resolver.resolveOutput("low");
            this.stop = resolver.resolveOutput("stop");
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.flow.graph.FlowElementResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.