Skip to content
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

Beta3: Unable to use async methods for resources #1217

Closed
dtretyakov opened this issue Oct 20, 2016 · 3 comments
Closed

Beta3: Unable to use async methods for resources #1217

dtretyakov opened this issue Oct 20, 2016 · 3 comments

Comments

@dtretyakov
Copy link
Contributor

Currently we're unable to use most of async methods from underlining *inner resource implementation.

Azure azure = Azure.authenticate(credFile).withDefaultSubscription();
azure.virtualMachines().list()

But actually VirtualMachinesInner provides lots of *async methods hidden by VirtualMachinesImpl.

@dtretyakov
Copy link
Contributor Author

We need a following methods in sdk classes.

com.microsoft.azure.management.resources
SupportsListing#listAsync(ListOperationCallback serviceCallback)
GroupableResourcesImpl#getByGroupAsync(String groupName, String name, ServiceCallback serviceCallback)
SubscriptionImpl#listLocationsAsync(String subscriptionId, ServiceCallback<List> serviceCallback)

com.microsoft.azure.management.compute
VirtualMachineSizesImpl#listByRegionAsync(String regionName, ListOperationCallback serviceCallback)
VirtualMachineImpl#startAsync(ServiceCallback serviceCallback)
VirtualMachineImpl#restartAsync(ServiceCallback serviceCallback)
VirtualMachineImpl#stopAsync(ServiceCallback serviceCallback)

@anuchandy
Copy link
Member

Following async methods (that return ServiceFuture and takes callback) are supported

VM::startAsync

VM::restartAsync

VM:: stopAsync() a.k.a.s VM::poweroffAsync

GroupableResourcesImpl#getByGroupAsync()

Support for fluent list method that takes call-back is something that needs to be discussed in the team.

SupportsListing#listAsync(ListOperationCallback serviceCallback)
SubscriptionImpl#listLocationsAsync(String subscriptionId, ServiceCallback<List> serviceCallback)

@martinsawicki
Copy link

async is supported as per above, that's the scope of the SDK's coverage for async.

sima-zhu pushed a commit to sima-zhu/azure-sdk-for-java that referenced this issue Mar 21, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants