jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <zack.shoy...@RACKSPACE.COM>
Subject Re: Query regarding UNBLOCK swift API's with configurable timeout
Date Mon, 04 Jan 2016 12:34:12 GMT
Try to experiment with the connection variables, documented here:


From: Abhijeet Banerjee <abhijeet.feb@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


I am facing a problem where my application[using JCloud API's] try to DELETE an object from
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(
credentials(envVariables.getidentity(), envVariables.getcredential()).

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");

Abhijeet Banerjee

View raw message