Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver


     * エクスポーターが複数存在する。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void multiple_exporter() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "a", LockType.ROW));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "a", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("a"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("b"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here


     * 補助インポーターが昇格する。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void upgrade_secondary() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "a", LockType.ROW));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.SECONDARY, "a", LockType.UNUSED));
        Out<Ex1> out1 = flow.createOut("out1", new Export("a"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("a"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * With cache.
     * @throws Exception if failed
     */
    @Test
    public void cached() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * With cache but search condition was set.
     * @throws Exception if failed
     */
    @Test
    public void cached_conditional() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, "SID > 0", DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

     * With cache but model is not supported.
     * @throws Exception if failed
     */
    @Test
    public void cached_unsupported() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, null, DataSize.UNKNOWN, Ex1.class));
        Out<Cached> out = flow.createOut("out1", new Export("default", Ex1.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

     * With cache and table lock is requested (ok).
     * @throws Exception if failed
     */
    @Test
    public void cached_tablelock() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.TABLE, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
    }
View Full Code Here

     * With cache and row check is requested (ok).
     * @throws Exception if failed
     */
    @Test
    public void cached_rowcheck() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.CHECK, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
    }
View Full Code Here

     * With cache but row lock is requested.
     * @throws Exception if failed
     */
    @Test
    public void cached_rowlock() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.ROW, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

     * With cache but row skip is requested.
     * @throws Exception if failed
     */
    @Test
    public void cached_rowskip() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.ROW_OR_SKIP, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

     * With cache whose datasize is tiny.
     * @throws Exception if failed
     */
    @Test
    public void cached_tiny() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, null, DataSize.TINY));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.FlowDescriptionDriver

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.