You can configure these properties too (in milliseconds) to configure a
global or a per-method timeout:

* jclouds.request-timeout - Configures, globally, the millis to wait for a
request to complete before theowing an exception.

* jclouds.timeouts.object:delete - Configures the millis to wait for a
concrete method. The "object:delete" corresponds to the value of the @Named
annotation of the method you want to configure.

I.
El 4/1/2016 13:34, "Zack Shoylev" <zack.shoy...@rackspace.com> escribió:

> Try to experiment with the connection variables, documented here:
>
>
> https://jclouds.apache.org/reference/configuration/​
> ------------------------------
> *From:* Abhijeet Banerjee <abhijeet....@gmail.com>
> *Sent:* Monday, January 4, 2016 6:16 AM
> *To:* user@jclouds.apache.org
> *Subject:* Query regarding UNBLOCK swift API's with configurable timeout
>
> Hello,
>
> I am facing a problem where my application*[using JCloud API's]* try to
> DELETE an object from swift.
> Now, by any means if swift server is not approachable, DELETE API get
> blocked for certain amount of time (i.e 60 sec)
>
> But, my Container [ Cloud Foundry], where my application is deployed.The
> maximum waiting time for any HTTP request's response is configured as 30Sec.
>
> Due the reason,Client used to get 504 (Bad Gateway Request) Response,
> whereas my code requirement is to send 200 Response (As we don't bother if
> Object was deleted or not, I need to send 200 OK response towards client)
>
> Now, My Question, Is there any way, through which i can configure my
> DELETE should try till (10-20 Second) max after that it return failure to
> my application.
>
> CODE Snippet:
> public class MyClassImpl{
> EnvVariables envVariables = EnvVariables.getInstance();
>
> private SwiftApi getContext(){
>        return ContextBuilder.newBuilder(
> envVariables.getprovider()).
> endpoint(envVariables.getendUrl()).
> credentials(envVariables.getidentity(), envVariables.getcredential()).
> buildApi(SwiftApi.class);
>
>     }
> public void deleteObject(final String objectName) {
>     SwiftApi swiftApi = getContext();
>
>     // Saving the "region" or "Container" where object need to save.
>     ObjectApi objectApi = swiftApi.getObjectApi(envVariables.getregion(),
> "MyContainer");
>      objectApi.delete(objectName + ".wav");
> }
>
>
> --
>
> *Thanks\ *
> *Abhijeet Banerjee +919910512611 <%2B919910512611>*
>
>
>
>
>

Reply via email to