You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rename asPromise* methods to promise*
- Rename forkAndJoin to bindExec
- Rename forkOnNext to forkEach
Cleaned up implementations, by making ExecControl implicit and orienting API towards Observable.compose().
Copy file name to clipboardExpand all lines: ratpack-manual/src/content/chapters/34-hystrix.md
+6-9Lines changed: 6 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,30 +23,27 @@ want to use these features however, then your application should depend on the `
23
23
24
24
Hystrix provides three types of Command execution, [synchronous](https://github.com/Netflix/Hystrix/wiki/How-To-Use#Synchronous-Execution), [asynchronous](https://github.com/Netflix/Hystrix/wiki/How-To-Use#asynchronous-execution) and [reactive](https://github.com/Netflix/Hystrix/wiki/How-To-Use#reactive-execution).
25
25
Out of the three only reactive is actually non-blocking. Synchronous and asynchronous command execution will work with Ratpack, as is demonstrated in the [integration tests](https://github.com/ratpack/ratpack/blob/master/ratpack-hystrix/src/test/groovy/ratpack/hystrix/HystrixRequestCachingSpec.groovy#L128),
26
-
but for maximum performance only reactive execution is recommended. If you do not wish to use Observables however, then you can convert them to Ratpack Promises instead using [RxRatpack#asPromise](api/ratpack/rx/RxRatpack.html#asPromise-rx.Observable-)
27
-
or [RxRatpack#asPromiseSingle](api/ratpack/rx/RxRatpack.html#asPromiseSingle-rx.Observable-).
26
+
but for maximum performance only reactive execution is recommended. If you do not wish to use Observables however, then you can convert them to Ratpack Promises instead using [RxRatpack#promise](api/ratpack/rx/RxRatpack.html#promise-rx.Observable-)
27
+
or [RxRatpack#promiseSingle](api/ratpack/rx/RxRatpack.html#promiseSingle-rx.Observable-).
Copy file name to clipboardExpand all lines: ratpack-rx/src/main/java/ratpack/rx/RxRatpack.java
+73-85Lines changed: 73 additions & 85 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@
49
49
* When using observables for asynchronous actions, it is generally required to wrap promises created by an {@link ExecControl} in order to integrate with Ratpack's execution model.
50
50
* This typically means using {@link ExecControl#promise(Action)} or {@link ExecControl#blocking(java.util.concurrent.Callable)} to initiate the operation and then wrapping with {@link #observe(Promise)} or similar.
51
51
* <p>
52
-
* To test observable based services that use Ratpack's execution semantics, use the {@code ExecHarness} and convert the observable back to a promise with {@link #asPromise(Observable)}.
52
+
* To test observable based services that use Ratpack's execution semantics, use the {@code ExecHarness} and convert the observable back to a promise with {@link #promise(Observable)}.
53
53
* <p>
54
54
* The methods in this class are also provided as <a href="http://docs.groovy-lang.org/latest/html/documentation/#_extension_modules">Groovy Extensions</a>.
55
55
* When using Groovy, each static method in this class is able to act as an instance-level method against the {@link Observable} type.
* An operator to parallelize an observable stream by forking a new execution for each omitted item.
324
-
* This allows downstream processing to occur in concurrent executions.
325
-
* <p>
326
-
* To be used with the {@link Observable#lift(Observable.Operator)} method.
317
+
* Parallelize an observable by creating a new Ratpack execution for each element.
327
318
* <p>
328
-
* The {@code onCompleted()} or {@code onError()} downstream methods are guaranteed to be called <strong>after</strong> the last item has been given to the downstream {@code onNext()} method.
329
-
* That is, the last invocation of the downstream {@code onNext()} will have returned before {@code onCompleted()} or {@code onError()} are invoked.
330
-
* <p>
331
-
* This is generally a more performant alternative to using plain Rx parallelization due to Ratpack's {@link ratpack.exec.Execution} semantics and use of Netty's event loop to schedule work.
0 commit comments