弹性应用的开发利器Hystrix

同步执行

Hystrix commands能通过execute()方法调用被同步的执行

String s = new CommandHelloWorld("World").execute();

Execution of this form passes the following tests:

@Test
        public void testSynchronous() {
            assertEquals("Hello World!", new CommandHelloWorld("World").execute());
            assertEquals("Hello Bob!", new CommandHelloWorld("Bob").execute());
        }