-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Ready for review] Support for streaming created resources #1300
Conversation
what is the boolean param needed for, if |
@martinsawicki you are right, will remove the flag |
if @jianghaolu signs off on this PR, I'm set. Thanks |
btw, is the Observable from createAsync any more useful than Future? If not, should we consider reverting to returning Future from createAsync, and dedicate cerateAsyncStreaming to the full power of observables? |
another thought wrt naming: i'm wondering now if |
We heavily depend on the Now that I think about it a little more, I feel a little more comfortable about replacing our current version of |
yes - Observable<VirtualMachine> vmObservable = vmCreatable
.CreateAsync().last()
.map(new Func1<Indexable, VirtualMachine>() {
public VirtualMachine call(Indexable r) {
return r;
}
});
vmObservable.flatMap(new Func<VirtualMachine, Observable<?>>() {
public ? call(VirtualMachine vm) {
// use vm
// return an observable<?> represents next async op
}
}) |
yeah, i'd be for the simpler/more aggressive approach (just one |
@martinsawicki @jianghaolu please review when you get a chance. |
[Ready for review] Support for streaming created resources
[Ready for review] Support for streaming created resources
Today the Observable from
createAsync
emits only the root resource not any of the dependent resources that gets created.A new method
createAsyncStreaming
with following signature has been added to address thisif enableStreaming is true then caller will receive the resources as they gets created otherwise only the root resource will be emitted. The an example usage is:
Why not streaming as
Resource
: There are couple of types those are creatable but not Resource, the same applicable withHasId
as wellsome resources that belongs to this category are:
azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/User.java
azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java