Examples of beginFlow()


Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

        ServiceProfile<ExecutionLockProvider> profile = new ServiceProfile<ExecutionLockProvider>(
                "testing", BasicLockProvider.class, conf, ProfileContext.system(getClass().getClassLoader()));
        ExecutionLockProvider instance = profile.newInstance();
        ExecutionLock lock = instance.newInstance("batch");
        try {
            lock.beginFlow("flow", "exec");
            assertThat(lockDir.list().length, is(greaterThan(start)));
        } finally {
            lock.close();
        }
        assertThat(lockDir.list().length, is(start));
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

        ServiceProfile<ExecutionLockProvider> profile = new ServiceProfile<ExecutionLockProvider>(
                "testing", BasicLockProvider.class, conf, new ProfileContext(getClass().getClassLoader(), var));
        ExecutionLockProvider instance = profile.newInstance();
        ExecutionLock lock = instance.newInstance("batch");
        try {
            lock.beginFlow("flow", "exec");
            assertThat(lockDir.list().length, is(greaterThan(start)));
        } finally {
            lock.close();
        }
        assertThat(lockDir.list().length, is(start));
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

                fail("cannot run any batch");
            } catch (IOException e) {
                // ok.
            }
            // can acquire any flow/exec lock in same
            lock.beginFlow("flow1", "exec1");
            lock.beginFlow("flow2", "exec1");
            try {
                lock.beginFlow("flow1", "exec1");
                fail("cannot reentrant same flow");
            } catch (IOException e) {
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

            } catch (IOException e) {
                // ok.
            }
            // can acquire any flow/exec lock in same
            lock.beginFlow("flow1", "exec1");
            lock.beginFlow("flow2", "exec1");
            try {
                lock.beginFlow("flow1", "exec1");
                fail("cannot reentrant same flow");
            } catch (IOException e) {
                // ok.
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

            }
            // can acquire any flow/exec lock in same
            lock.beginFlow("flow1", "exec1");
            lock.beginFlow("flow2", "exec1");
            try {
                lock.beginFlow("flow1", "exec1");
                fail("cannot reentrant same flow");
            } catch (IOException e) {
                // ok.
            }
        } finally {
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

        ExecutionLockProvider instance1 = profile.newInstance();
        ExecutionLockProvider instance2 = profile.newInstance();

        ExecutionLock lock = instance1.newInstance("batch1");
        try {
            lock.beginFlow("flow1", "exec1");
            try {
                instance2.newInstance("batch1");
                fail("cannot run same batch");
            } catch (IOException e) {
                // ok.
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

                // ok.
            }
            ExecutionLock other = instance2.newInstance("batch2");
            try {
                // can acquire any flow/exec lock
                other.beginFlow("flow2", "exec1");
                other.endFlow("flow2", "exec1");
                other.beginFlow("flow1", "exec2");
                other.endFlow("flow1", "exec2");
                other.beginFlow("flow2", "exec2");
                other.endFlow("flow2", "exec2");
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

            ExecutionLock other = instance2.newInstance("batch2");
            try {
                // can acquire any flow/exec lock
                other.beginFlow("flow2", "exec1");
                other.endFlow("flow2", "exec1");
                other.beginFlow("flow1", "exec2");
                other.endFlow("flow1", "exec2");
                other.beginFlow("flow2", "exec2");
                other.endFlow("flow2", "exec2");
            } finally {
                other.close();
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

                // can acquire any flow/exec lock
                other.beginFlow("flow2", "exec1");
                other.endFlow("flow2", "exec1");
                other.beginFlow("flow1", "exec2");
                other.endFlow("flow1", "exec2");
                other.beginFlow("flow2", "exec2");
                other.endFlow("flow2", "exec2");
            } finally {
                other.close();
            }
        } finally {
View Full Code Here

Examples of com.asakusafw.yaess.core.ExecutionLock.beginFlow()

        ExecutionLockProvider instance1 = profile.newInstance();
        ExecutionLockProvider instance2 = profile.newInstance();

        ExecutionLock lock = instance1.newInstance("batch1");
        try {
            lock.beginFlow("flow1", "exec1");
            ExecutionLock other = instance2.newInstance("batch1");
            try {
                // can acquire other flow lock
                other.beginFlow("flow2", "exec1");
                other.endFlow("flow2", "exec1");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.