diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java index cc4a8ae371..bf21273f3b 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.atmos; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; @@ -67,6 +69,10 @@ public class AtmosApiMetadata extends BaseRestApiMetadata { Properties properties = BaseRestApiMetadata.defaultProperties(); properties.setProperty(PROPERTY_REGIONS, "DEFAULT"); properties.setProperty(PROPERTY_USER_METADATA_PREFIX, "X-Object-Meta-"); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(5) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AtmosClient.createFile", MINUTES.toMillis(10) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AtmosClient.updateFile", MINUTES.toMillis(10) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AtmosClient.readFile", MINUTES.toMillis(10) + ""); return properties; } diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java index 6cb50a8e82..13a3ee5a26 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/AtmosClient.java @@ -19,8 +19,6 @@ package org.jclouds.atmos; import java.net.URI; -import java.util.concurrent.TimeUnit; - import org.jclouds.atmos.domain.AtmosObject; import org.jclouds.atmos.domain.BoundedSet; import org.jclouds.atmos.domain.DirectoryEntry; @@ -28,7 +26,6 @@ import org.jclouds.atmos.domain.SystemMetadata; import org.jclouds.atmos.domain.UserMetadata; import org.jclouds.atmos.options.ListOptions; import org.jclouds.atmos.options.PutOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.options.GetOptions; import com.google.inject.Provides; @@ -41,7 +38,6 @@ import com.google.inject.Provides; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface AtmosClient { /** * Creates a default implementation of AtmosObject @@ -55,13 +51,10 @@ public interface AtmosClient { URI createDirectory(String directoryName, PutOptions... options); - @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) URI createFile(String parent, AtmosObject object, PutOptions... options); - @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) void updateFile(String parent, AtmosObject object, PutOptions... options); - @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) AtmosObject readFile(String path, GetOptions... options); AtmosObject headFile(String path); diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java index deca935df9..05b4f60fba 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.cloudfiles; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -65,6 +68,7 @@ public class CloudFilesApiMetadata extends SwiftApiMetadata { public static Properties defaultProperties() { Properties properties = SwiftApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "OpenStackAuthClient.authenticate", SECONDS.toMillis(30) + ""); return properties; } diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java index 4d314c88cd..b8f466fa59 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesClient.java @@ -20,11 +20,8 @@ package org.jclouds.cloudfiles; import java.net.URI; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudfiles.domain.ContainerCDNMetadata; import org.jclouds.cloudfiles.options.ListCdnContainerOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.swift.CommonSwiftClient; /** @@ -36,7 +33,6 @@ import org.jclouds.openstack.swift.CommonSwiftClient; * @author Adrian Cole * @see */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface CloudFilesClient extends CommonSwiftClient { /** @@ -99,7 +95,7 @@ public interface CloudFilesClient extends CommonSwiftClient { */ boolean setCDNStaticWebsiteIndex(String container, String index); - /* + /** * http://docs.rackspace.com/files/api/v1/cf-devguide/content/Set_Error_Pages_for_Static_Website-dle4005.html */ boolean setCDNStaticWebsiteError(String container, String error); diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java index 98ea02ca8a..4515af818b 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersApiMetadata.java @@ -18,6 +18,10 @@ */ package org.jclouds.cloudservers; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -57,6 +61,8 @@ public class CloudServersApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "OpenStackAuthClient.authenticate", SECONDS.toMillis(30) + ""); return properties; } diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java index 3cea2d72bf..3ccf92662c 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/CloudServersClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudservers; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.PathParam; import org.jclouds.cloudservers.domain.Addresses; @@ -35,7 +33,6 @@ import org.jclouds.cloudservers.options.CreateServerOptions; import org.jclouds.cloudservers.options.CreateSharedIpGroupOptions; import org.jclouds.cloudservers.options.ListOptions; import org.jclouds.cloudservers.options.RebuildServerOptions; -import org.jclouds.concurrent.Timeout; /** * Provides access to Cloud Servers via their REST API. @@ -47,7 +44,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudServersClient { /** * All accounts, by default, have a preconfigured set of thresholds (or limits) to manage diff --git a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java index dd26f28663..63a073a62b 100644 --- a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java +++ b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.cloudsigma; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.cloudsigma.reference.CloudSigmaConstants.PROPERTY_VNC_PASSWORD; import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE; @@ -60,6 +62,8 @@ public class CloudSigmaApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "CloudSigmaClient.cloneDrive", MINUTES.toMillis(5) + ""); properties.setProperty(PROPERTY_VNC_PASSWORD, "IL9vs34d"); // passwords are set post-boot, so auth failures are possible // from a race condition applying the password set script diff --git a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaClient.java b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaClient.java index 72c34c4a82..47d3f72a38 100644 --- a/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaClient.java +++ b/apis/cloudsigma/src/main/java/org/jclouds/cloudsigma/CloudSigmaClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudsigma; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudsigma.domain.Drive; import org.jclouds.cloudsigma.domain.DriveData; import org.jclouds.cloudsigma.domain.DriveInfo; @@ -30,7 +28,6 @@ import org.jclouds.cloudsigma.domain.ServerInfo; import org.jclouds.cloudsigma.domain.StaticIPInfo; import org.jclouds.cloudsigma.domain.VLANInfo; import org.jclouds.cloudsigma.options.CloneDriveOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudSigma. @@ -40,7 +37,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudSigmaClient { /** @@ -219,7 +215,6 @@ public interface CloudSigmaClient { * options to control size * @return new drive */ - @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) DriveInfo cloneDrive(String sourceUuid, String newName, CloneDriveOptions... options); /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java index 5017037524..52dff5ef67 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.cloudstack; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -69,6 +72,9 @@ public class CloudStackApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AddressClient.disassociateIPAddress", MINUTES.toMillis(2) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "NATClient.enableStaticNATForVirtualMachine", MINUTES.toMillis(2) + ""); properties.setProperty("jclouds.ssh.max-retries", "7"); properties.setProperty("jclouds.ssh.retry-auth", "true"); return properties; diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java index 969ef8c96c..a02e5317c8 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackClient.java @@ -18,8 +18,6 @@ */ package org.jclouds.cloudstack; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.features.AccountClient; import org.jclouds.cloudstack.features.AddressClient; import org.jclouds.cloudstack.features.AsyncJobClient; @@ -43,7 +41,6 @@ import org.jclouds.cloudstack.features.VMGroupClient; import org.jclouds.cloudstack.features.VirtualMachineClient; import org.jclouds.cloudstack.features.VolumeClient; import org.jclouds.cloudstack.features.ZoneClient; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; /** @@ -54,7 +51,6 @@ import org.jclouds.rest.annotations.Delegate; * @see CloudStackAsyncClient * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudStackClient { /** * Provides synchronous access to Zone features. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java index 10537a505c..b00ef90267 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackDomainClient.java @@ -18,13 +18,10 @@ */ package org.jclouds.cloudstack; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.features.DomainAccountClient; import org.jclouds.cloudstack.features.DomainDomainClient; import org.jclouds.cloudstack.features.DomainLimitClient; import org.jclouds.cloudstack.features.DomainUserClient; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; /** @@ -37,7 +34,6 @@ import org.jclouds.rest.annotations.Delegate; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudStackDomainClient extends CloudStackClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java index 4ed21766a2..7af8556127 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/CloudStackGlobalClient.java @@ -18,8 +18,6 @@ */ package org.jclouds.cloudstack; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.features.GlobalAccountClient; import org.jclouds.cloudstack.features.GlobalAlertClient; import org.jclouds.cloudstack.features.GlobalCapacityClient; @@ -33,7 +31,6 @@ import org.jclouds.cloudstack.features.GlobalUsageClient; import org.jclouds.cloudstack.features.GlobalUserClient; import org.jclouds.cloudstack.features.GlobalVlanClient; import org.jclouds.cloudstack.features.GlobalZoneClient; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; /** @@ -46,7 +43,6 @@ import org.jclouds.rest.annotations.Delegate; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudStackGlobalClient extends CloudStackDomainClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AccountClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AccountClient.java index 2985a22d11..ed99fa86a5 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AccountClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AccountClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Account; import org.jclouds.cloudstack.options.ListAccountsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Account features. @@ -32,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface AccountClient { /** * Lists Accounts diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AddressClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AddressClient.java index f70762daca..026b6b8ed4 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AddressClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AddressClient.java @@ -19,13 +19,10 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.PublicIPAddress; import org.jclouds.cloudstack.options.AssociateIPAddressOptions; import org.jclouds.cloudstack.options.ListPublicIPAddressesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack IPAddress features. @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface AddressClient { /** * Lists IPAddresses @@ -72,6 +68,5 @@ public interface AddressClient { * @param id * the id of the public ip address to disassociate */ - @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) void disassociateIPAddress(String id); } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AsyncJobClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AsyncJobClient.java index 6ccd75c0d4..3768cdc604 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AsyncJobClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/AsyncJobClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncJob; import org.jclouds.cloudstack.options.ListAsyncJobsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack asyncJob features. @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface AsyncJobClient { /** * Lists asyncJobs diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ConfigurationClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ConfigurationClient.java index 7535d52364..82c34e558e 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ConfigurationClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ConfigurationClient.java @@ -18,10 +18,7 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Capabilities; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Configuration features. @@ -31,7 +28,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ConfigurationClient { /** * Lists capabilities diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainAccountClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainAccountClient.java index 60865f828e..f2d9f10f2c 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainAccountClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainAccountClient.java @@ -18,11 +18,8 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Account; import org.jclouds.cloudstack.domain.AsyncCreateResponse; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Account features available to Domain @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DomainAccountClient extends AccountClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainDomainClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainDomainClient.java index f1fac8c171..4d24db7b88 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainDomainClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainDomainClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Domain; import org.jclouds.cloudstack.options.ListDomainChildrenOptions; import org.jclouds.cloudstack.options.ListDomainsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Domain features available to Domain @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DomainDomainClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainLimitClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainLimitClient.java index d406fc1ae0..6c4f3e3854 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainLimitClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainLimitClient.java @@ -18,10 +18,7 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.ResourceLimit; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Limit features available to Domain @@ -32,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DomainLimitClient extends LimitClient { /** * Updates resource limits for an account in a domain. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainUserClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainUserClient.java index b15a7be9ae..f574d606f5 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainUserClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/DomainUserClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.User; import org.jclouds.cloudstack.options.ListUsersOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack User features available to Domain @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Domain_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DomainUserClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/EventClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/EventClient.java index d75004fd1b..9edc15c514 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/EventClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/EventClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Event; import org.jclouds.cloudstack.options.ListEventsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Event features. @@ -32,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * @author Vijay Kiran * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface EventClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/FirewallClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/FirewallClient.java index 3e530a6376..74596ba436 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/FirewallClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/FirewallClient.java @@ -19,15 +19,12 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.FirewallRule; import org.jclouds.cloudstack.domain.PortForwardingRule; import org.jclouds.cloudstack.options.CreateFirewallRuleOptions; import org.jclouds.cloudstack.options.ListFirewallRulesOptions; import org.jclouds.cloudstack.options.ListPortForwardingRulesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack PortForwardingRule features. @@ -37,7 +34,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface FirewallClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAccountClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAccountClient.java index b50146b352..b547240991 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAccountClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAccountClient.java @@ -18,12 +18,9 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Account; import org.jclouds.cloudstack.options.CreateAccountOptions; import org.jclouds.cloudstack.options.UpdateAccountOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Account features available to Global @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalAccountClient extends DomainAccountClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAlertClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAlertClient.java index 629d00ee64..e21be5e8c5 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAlertClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalAlertClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Alert; import org.jclouds.cloudstack.options.ListAlertsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Alerts features available to Global @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalAlertClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityClient.java index 75127a95b4..3c39bfaced 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Capacity; import org.jclouds.cloudstack.options.ListCapacityOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Capacities features available to Global @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalCapacityClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationClient.java index ae03bfed2b..4dd26d5b0e 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.ConfigurationEntry; import org.jclouds.cloudstack.options.ListConfigurationEntriesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Configuration features available to Global @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalConfigurationClient extends ConfigurationClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalDomainClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalDomainClient.java index 8f30c466f0..a681dc3967 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalDomainClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalDomainClient.java @@ -18,12 +18,9 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Domain; import org.jclouds.cloudstack.options.CreateDomainOptions; import org.jclouds.cloudstack.options.UpdateDomainOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Domain features available to Global @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalDomainClient extends DomainDomainClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalHostClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalHostClient.java index bdb42532d7..87ebdda631 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalHostClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalHostClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Cluster; import org.jclouds.cloudstack.domain.Host; import org.jclouds.cloudstack.options.AddClusterOptions; @@ -31,7 +29,6 @@ import org.jclouds.cloudstack.options.ListClustersOptions; import org.jclouds.cloudstack.options.ListHostsOptions; import org.jclouds.cloudstack.options.UpdateClusterOptions; import org.jclouds.cloudstack.options.UpdateHostOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack host features. @@ -41,7 +38,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Andrei Savu */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalHostClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingClient.java index 0c052f95fe..8748d451fb 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingClient.java @@ -18,8 +18,6 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.DiskOffering; import org.jclouds.cloudstack.domain.NetworkOffering; import org.jclouds.cloudstack.domain.ServiceOffering; @@ -28,7 +26,6 @@ import org.jclouds.cloudstack.options.CreateServiceOfferingOptions; import org.jclouds.cloudstack.options.UpdateDiskOfferingOptions; import org.jclouds.cloudstack.options.UpdateNetworkOfferingOptions; import org.jclouds.cloudstack.options.UpdateServiceOfferingOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack zone features. @@ -38,7 +35,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Andrei Savu */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalOfferingClient extends OfferingClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalPodClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalPodClient.java index cba4ad64f6..c132cfafde 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalPodClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalPodClient.java @@ -19,13 +19,10 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Pod; import org.jclouds.cloudstack.options.CreatePodOptions; import org.jclouds.cloudstack.options.ListPodsOptions; import org.jclouds.cloudstack.options.UpdatePodOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Pod features available to Global @@ -36,7 +33,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalPodClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java index 70b7e973f3..e85c39c542 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.StoragePool; import org.jclouds.cloudstack.options.ListStoragePoolsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack storage pool features. @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Richard Downer */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalStoragePoolClient { Set listStoragePools(ListStoragePoolsOptions... options); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java index e7da353465..11704cc634 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java @@ -20,13 +20,10 @@ package org.jclouds.cloudstack.features; import java.util.Date; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.JobResult; import org.jclouds.cloudstack.domain.UsageRecord; import org.jclouds.cloudstack.options.GenerateUsageRecordsOptions; import org.jclouds.cloudstack.options.ListUsageRecordsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack usage features. @@ -36,7 +33,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Richard Downer */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalUsageClient { JobResult generateUsageRecords(Date start, Date end, GenerateUsageRecordsOptions... options); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java index 452861876b..caec745d12 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java @@ -18,13 +18,10 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.ApiKeyPair; import org.jclouds.cloudstack.domain.User; import org.jclouds.cloudstack.options.CreateUserOptions; import org.jclouds.cloudstack.options.UpdateUserOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack User features available to Global @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalUserClient extends DomainUserClient { diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java index 0223adcd84..913393245f 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.VlanIPRange; import org.jclouds.cloudstack.options.CreateVlanIPRangeOptions; import org.jclouds.cloudstack.options.ListVlanIPRangesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack VLAN features. @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Richard Downer */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalVlanClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java index 3bac5d1fb1..f0bf39138b 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java @@ -18,13 +18,10 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.NetworkType; import org.jclouds.cloudstack.domain.Zone; import org.jclouds.cloudstack.options.CreateZoneOptions; import org.jclouds.cloudstack.options.UpdateZoneOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Zone features available to Global @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlobalZoneClient extends ZoneClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java index 18e18a09c7..c5a1648c31 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java @@ -20,11 +20,8 @@ package org.jclouds.cloudstack.features; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.OSType; import org.jclouds.cloudstack.options.ListOSTypesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Operating System features. @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GuestOSClient { /** * Lists all supported OS types for this cloud. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java index 2eef7231c3..c0408bc7b4 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java @@ -19,10 +19,6 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Provides synchronous access to CloudStack Operating System features. *

@@ -31,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface HypervisorClient { /** * Lists all supported hypervisors for this cloud. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java index e9b9a6050e..517999a7dd 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.ExtractMode; import org.jclouds.cloudstack.domain.ISO; @@ -32,7 +30,6 @@ import org.jclouds.cloudstack.options.ListISOsOptions; import org.jclouds.cloudstack.options.RegisterISOOptions; import org.jclouds.cloudstack.options.UpdateISOOptions; import org.jclouds.cloudstack.options.UpdateISOPermissionsOptions; -import org.jclouds.concurrent.Timeout; /** * @@ -42,7 +39,6 @@ import org.jclouds.concurrent.Timeout; * @see http://download.cloud.com/releases/2.2.12/api/TOC_User.html * @author Richard Downer */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ISOClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java index 4f2e398534..39ca80b8ba 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.ResourceLimit; import org.jclouds.cloudstack.options.ListResourceLimitsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack resource limit API. @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface LimitClient { /** * List the resource limits. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java index 91bf037862..00e99f946a 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java @@ -19,15 +19,12 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.LoadBalancerRule; import org.jclouds.cloudstack.domain.VirtualMachine; import org.jclouds.cloudstack.domain.LoadBalancerRule.Algorithm; import org.jclouds.cloudstack.options.CreateLoadBalancerRuleOptions; import org.jclouds.cloudstack.options.ListLoadBalancerRulesOptions; import org.jclouds.cloudstack.options.UpdateLoadBalancerRuleOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack LoadBalancer features. @@ -37,7 +34,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface LoadBalancerClient { /** * List the load balancer rules diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java index b9b8a029b4..1fcb7d9405 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java @@ -19,13 +19,10 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.IPForwardingRule; import org.jclouds.cloudstack.options.CreateIPForwardingRuleOptions; import org.jclouds.cloudstack.options.ListIPForwardingRulesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack IPForwardingRule features. @@ -37,7 +34,6 @@ import org.jclouds.concurrent.Timeout; * /> * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface NATClient { /** * List the ip forwarding rules @@ -99,7 +95,6 @@ public interface NATClient { */ String deleteIPForwardingRule(String id); - @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) void enableStaticNATForVirtualMachine(String virtualMachineId, String IPAddressId); /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java index 6e299fa4bb..7a2007f006 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Network; import org.jclouds.cloudstack.options.CreateNetworkOptions; import org.jclouds.cloudstack.options.ListNetworksOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack network features. @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface NetworkClient { /** * Lists networks diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java index a923bb5ced..3b1f64551d 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java @@ -19,15 +19,12 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.DiskOffering; import org.jclouds.cloudstack.domain.NetworkOffering; import org.jclouds.cloudstack.domain.ServiceOffering; import org.jclouds.cloudstack.options.ListDiskOfferingsOptions; import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions; import org.jclouds.cloudstack.options.ListServiceOfferingsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack zone features. @@ -37,7 +34,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface OfferingClient { /** * Lists service offerings diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java index ab1883cc7c..a560f7dec2 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java @@ -20,11 +20,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.SshKeyPair; import org.jclouds.cloudstack.options.ListSSHKeyPairsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack SSHKeyPair features. @@ -34,7 +31,6 @@ import org.jclouds.concurrent.Timeout; * href="http://download.cloud.com/releases/2.2.0/api_2.2.8/TOC_User.html" * /> */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SSHKeyPairClient { /** * Returns a list of {@link SshKeyPair}s registered by current user. diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SecurityGroupClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SecurityGroupClient.java index 1ccfa93668..f8eb44384f 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SecurityGroupClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SecurityGroupClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.SecurityGroup; import org.jclouds.cloudstack.options.AccountInDomainOptions; import org.jclouds.cloudstack.options.ListSecurityGroupsOptions; -import org.jclouds.concurrent.Timeout; import com.google.common.collect.Multimap; @@ -36,7 +33,6 @@ import com.google.common.collect.Multimap; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SecurityGroupClient { /** * Lists security groups diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SessionClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SessionClient.java index 6d72b46fbf..21d0e39400 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SessionClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SessionClient.java @@ -18,10 +18,7 @@ */ package org.jclouds.cloudstack.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.LoginResponse; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Sessions @@ -30,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Andrei Savu */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface SessionClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SnapshotClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SnapshotClient.java index 76b5cffb7b..17e3e0c6d1 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SnapshotClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SnapshotClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.Snapshot; import org.jclouds.cloudstack.domain.SnapshotPolicy; @@ -28,7 +26,6 @@ import org.jclouds.cloudstack.domain.SnapshotPolicySchedule; import org.jclouds.cloudstack.options.CreateSnapshotOptions; import org.jclouds.cloudstack.options.ListSnapshotPoliciesOptions; import org.jclouds.cloudstack.options.ListSnapshotsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Snapshot features. @@ -38,7 +35,6 @@ import org.jclouds.concurrent.Timeout; * @see http://download.cloud.com/releases/2.2.0/api/TOC_User.html * @author Richard Downer */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SnapshotClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateClient.java index 671c018adf..350b76ffc8 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateClient.java @@ -19,8 +19,6 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.ExtractMode; import org.jclouds.cloudstack.domain.Template; @@ -34,7 +32,6 @@ import org.jclouds.cloudstack.options.ListTemplatesOptions; import org.jclouds.cloudstack.options.RegisterTemplateOptions; import org.jclouds.cloudstack.options.UpdateTemplateOptions; import org.jclouds.cloudstack.options.UpdateTemplatePermissionsOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack template features. @@ -46,7 +43,6 @@ import org.jclouds.concurrent.Timeout; * /> * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface TemplateClient { /** * Creates a template of a virtual machine. The virtual machine must be in a diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VMGroupClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VMGroupClient.java index 368c249ce7..25e673ee78 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VMGroupClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VMGroupClient.java @@ -19,13 +19,10 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.VMGroup; import org.jclouds.cloudstack.options.CreateVMGroupOptions; import org.jclouds.cloudstack.options.ListVMGroupsOptions; import org.jclouds.cloudstack.options.UpdateVMGroupOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack VM group features. @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * @see VMGroupAsyncClient * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VMGroupClient { /** * Lists VM groups diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VirtualMachineClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VirtualMachineClient.java index c214d2fc97..92f86b8988 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VirtualMachineClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VirtualMachineClient.java @@ -19,14 +19,11 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.VirtualMachine; import org.jclouds.cloudstack.options.AssignVirtualMachineOptions; import org.jclouds.cloudstack.options.DeployVirtualMachineOptions; import org.jclouds.cloudstack.options.ListVirtualMachinesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack VirtualMachine features. @@ -36,7 +33,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualMachineClient { /** * Lists VirtualMachines diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VolumeClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VolumeClient.java index a1923427ad..73d845a73a 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VolumeClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/VolumeClient.java @@ -19,12 +19,9 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.AsyncCreateResponse; import org.jclouds.cloudstack.domain.Volume; import org.jclouds.cloudstack.options.ListVolumesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack Event features. @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * @author Vijay Kiran * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VolumeClient { /** diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ZoneClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ZoneClient.java index f2a7716cfe..38b798f706 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ZoneClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ZoneClient.java @@ -19,11 +19,8 @@ package org.jclouds.cloudstack.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudstack.domain.Zone; import org.jclouds.cloudstack.options.ListZonesOptions; -import org.jclouds.concurrent.Timeout; /** * Provides synchronous access to CloudStack zone features. @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ZoneClient { /** * Lists zones diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApi.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApi.java index 7bd5897f7b..e8ca3145af 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApi.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApi.java @@ -23,7 +23,6 @@ import org.jclouds.cloudwatch.domain.Datapoint; import org.jclouds.cloudwatch.domain.Statistics; import org.jclouds.cloudwatch.features.MetricApi; import org.jclouds.cloudwatch.options.GetMetricStatisticsOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Region; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; @@ -32,8 +31,6 @@ import org.jclouds.rest.annotations.EndpointParam; import java.util.Date; import java.util.Set; -import java.util.concurrent.TimeUnit; - /** * Provides access to Amazon CloudWatch via the Query API *

@@ -43,7 +40,6 @@ import java.util.concurrent.TimeUnit; * /> * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface CloudWatchApi { /** * diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApiMetadata.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApiMetadata.java index 1e8fc756a0..5b692193ce 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApiMetadata.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.cloudwatch; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; @@ -56,6 +58,7 @@ public class CloudWatchApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, "amz"); return properties; diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/features/MetricApi.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/features/MetricApi.java index a573656440..5392560278 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/features/MetricApi.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/features/MetricApi.java @@ -18,8 +18,6 @@ */ package org.jclouds.cloudwatch.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.cloudwatch.domain.GetMetricStatistics; import org.jclouds.cloudwatch.domain.GetMetricStatisticsResponse; import org.jclouds.cloudwatch.domain.Metric; @@ -28,7 +26,6 @@ import org.jclouds.cloudwatch.options.GetMetricStatisticsOptions; import org.jclouds.cloudwatch.options.ListMetricsOptions; import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; /** * Provides access to Amazon CloudWatch via the Query API @@ -38,7 +35,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author Jeremy Whitlock */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface MetricApi { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Api.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Api.java index 5dec171de4..cf42fe4b0c 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Api.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Api.java @@ -19,9 +19,6 @@ package org.jclouds.ec2; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.features.TagApi; import org.jclouds.ec2.features.WindowsApi; import org.jclouds.javax.annotation.Nullable; @@ -52,7 +49,6 @@ import com.google.inject.Provides; * @author Adrian Cole * @see EC2AsyncApi */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface EC2Api { /** * diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java index 1f958db28c..9d946659a1 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.ec2; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.jclouds.compute.config.ComputeServiceProperties.RESOURCENAME_DELIMITER; @@ -77,6 +79,8 @@ public class EC2ApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AMIClient.describeImagesInRegion", MINUTES.toMillis(5) + ""); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, "amz"); properties.setProperty(PROPERTY_EC2_AMI_OWNERS, "*"); diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java index 5d410c2c79..7f02069a56 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Client.java @@ -18,9 +18,6 @@ */ package org.jclouds.ec2; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.services.AMIClient; import org.jclouds.ec2.services.AvailabilityZoneAndRegionClient; import org.jclouds.ec2.services.ElasticBlockStoreClient; @@ -36,7 +33,6 @@ import org.jclouds.rest.annotations.Delegate; * * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface EC2Client extends EC2Api { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/features/TagApi.java b/apis/ec2/src/main/java/org/jclouds/ec2/features/TagApi.java index 6918943526..0590129b5f 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/features/TagApi.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/features/TagApi.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.Tag; import org.jclouds.ec2.util.TagFilterBuilder; import org.jclouds.rest.annotations.SinceApiVersion; @@ -41,7 +38,6 @@ import com.google.common.collect.Multimap; * @author Adrian Cole */ @SinceApiVersion("2010-08-31") -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface TagApi { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/features/WindowsApi.java b/apis/ec2/src/main/java/org/jclouds/ec2/features/WindowsApi.java index f34a6ce4e2..4bb36f0940 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/features/WindowsApi.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/features/WindowsApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.ec2.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.PasswordData; import org.jclouds.rest.annotations.SinceApiVersion; @@ -34,7 +31,6 @@ import com.google.common.annotations.Beta; * @see WindowsAsyncApi * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) @Beta @SinceApiVersion("2008-08-08") public interface WindowsApi { diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java index fe2d2cb208..21bd59493a 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AMIClient.java @@ -20,9 +20,6 @@ package org.jclouds.ec2.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.Image; import org.jclouds.ec2.domain.Image.EbsBlockDevice; import org.jclouds.ec2.domain.Permission; @@ -38,7 +35,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface AMIClient { /** @@ -55,7 +51,6 @@ public interface AMIClient { * /> * @see DescribeImagesOptions */ - @Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) Set describeImagesInRegion(@Nullable String region, DescribeImagesOptions... options); /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java index 3d1eff334d..eed8a7c8e0 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/AvailabilityZoneAndRegionClient.java @@ -21,9 +21,6 @@ package org.jclouds.ec2.services; import java.net.URI; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.AvailabilityZoneInfo; import org.jclouds.ec2.options.DescribeAvailabilityZonesOptions; import org.jclouds.ec2.options.DescribeRegionsOptions; @@ -35,7 +32,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface AvailabilityZoneAndRegionClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java index ffb1f865d5..60e0705353 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticBlockStoreClient.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.Attachment; import org.jclouds.ec2.domain.Permission; import org.jclouds.ec2.domain.Snapshot; @@ -37,7 +34,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface ElasticBlockStoreClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java index 1cfb7d2ba6..52212c1e5d 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/ElasticIPAddressClient.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.PublicIpInstanceIdPair; import org.jclouds.javax.annotation.Nullable; @@ -31,7 +28,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface ElasticIPAddressClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java index 6c49f3815b..c8646ead50 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/InstanceClient.java @@ -20,9 +20,6 @@ package org.jclouds.ec2.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.BlockDevice; import org.jclouds.ec2.domain.InstanceStateChange; import org.jclouds.ec2.domain.Reservation; @@ -37,7 +34,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface InstanceClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java index b2aea7747d..ce2ad83667 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/KeyPairClient.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.KeyPair; import org.jclouds.javax.annotation.Nullable; @@ -31,7 +28,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface KeyPairClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java index dcf5f94d2f..240e604eb3 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/SecurityGroupClient.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.IpProtocol; import org.jclouds.ec2.domain.SecurityGroup; import org.jclouds.ec2.domain.UserIdGroupPair; @@ -33,7 +30,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface SecurityGroupClient { /** diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java index acb371ab58..778ea112fb 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/services/WindowsClient.java @@ -19,9 +19,6 @@ package org.jclouds.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.BundleTask; import org.jclouds.ec2.domain.PasswordData; import org.jclouds.ec2.options.BundleInstanceS3StorageOptions; @@ -34,7 +31,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface WindowsClient { /** * Bundles the Windows instance. This procedure is not applicable for Linux diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java index adec917d9c..8980bbd875 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.elasticstack; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.elasticstack.reference.ElasticStackConstants.PROPERTY_VNC_PASSWORD; import java.net.URI; @@ -59,6 +61,10 @@ public class ElasticStackApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ElasticStackClient.startServer", MINUTES.toMillis(2) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ElasticStackClient.createDrive", MINUTES.toMillis(2) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ElasticStackClient.createAndStartServer", MINUTES.toMillis(2) + ""); properties.setProperty(PROPERTY_VNC_PASSWORD, "IL9vs34d"); // passwords are set post-boot, so auth failures are possible // from a race condition applying the password set script diff --git a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackClient.java b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackClient.java index 1fbd28e470..db3119a123 100644 --- a/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackClient.java +++ b/apis/elasticstack/src/main/java/org/jclouds/elasticstack/ElasticStackClient.java @@ -19,9 +19,6 @@ package org.jclouds.elasticstack; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.elasticstack.domain.Drive; import org.jclouds.elasticstack.domain.DriveData; import org.jclouds.elasticstack.domain.DriveInfo; @@ -38,7 +35,6 @@ import org.jclouds.io.Payload; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ElasticStackClient { /** * list of server uuids in your account @@ -94,7 +90,6 @@ public interface ElasticStackClient { * @param uuid * what to start */ - @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) void startServer(String uuid); /** @@ -157,7 +152,6 @@ public interface ElasticStackClient { * required parameters: name, size * @return newly created drive */ - @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) DriveInfo createDrive(Drive createDrive); /** @@ -185,7 +179,6 @@ public interface ElasticStackClient { * @param server * @return newly created server */ - @Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) ServerInfo createAndStartServer(Server server); /** diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApi.java index bc2bd5069f..688d02e7d6 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.cinder.v1; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Zone; import org.jclouds.location.functions.ZoneToEndpoint; @@ -41,7 +38,6 @@ import com.google.inject.Provides; * @see API Doc * @author Everett Toews */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CinderApi { /** * @return the Zone codes configured diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApiMetadata.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApiMetadata.java index a533142bc4..0b16ad8c0a 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApiMetadata.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/CinderApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.openstack.cinder.v1; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -63,10 +65,9 @@ public class CinderApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); - + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); properties.setProperty(SERVICE_TYPE, ServiceType.BLOCK_STORAGE); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); - return properties; } diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotApi.java index 9b2cc2edbb..8fb7544a8f 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotApi.java @@ -1,8 +1,5 @@ package org.jclouds.openstack.cinder.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.cinder.v1.domain.Snapshot; import org.jclouds.openstack.cinder.v1.options.CreateSnapshotOptions; @@ -15,7 +12,6 @@ import com.google.common.collect.FluentIterable; * @see API Doc * @author Everett Toews */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface SnapshotApi { /** * Returns a summary list of Snapshots. diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeApi.java index 53cf852abb..e4e1649f85 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeApi.java @@ -1,8 +1,5 @@ package org.jclouds.openstack.cinder.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.cinder.v1.domain.Volume; import org.jclouds.openstack.cinder.v1.options.CreateVolumeOptions; @@ -18,7 +15,6 @@ import com.google.common.collect.FluentIterable; * @see API Doc * @author Everett Toews */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VolumeApi { /** * Returns a summary list of Volumes. diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApi.java index 7e8f8efb15..821205dccf 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApi.java @@ -1,8 +1,5 @@ package org.jclouds.openstack.cinder.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.cinder.v1.domain.VolumeType; import com.google.common.collect.FluentIterable; @@ -14,7 +11,6 @@ import com.google.common.collect.FluentIterable; * @see API Doc * @author Everett Toews */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VolumeTypeApi { /** * Returns a summary list of VolumeTypes. diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/AuthenticationApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/AuthenticationApi.java index eac02574cc..d62bc67788 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/AuthenticationApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/AuthenticationApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.keystone.v2_0; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.openstack.keystone.v2_0.domain.Access; import org.jclouds.openstack.keystone.v2_0.domain.ApiAccessKeyCredentials; @@ -35,7 +32,6 @@ import org.jclouds.openstack.keystone.v2_0.domain.PasswordCredentials; * /> * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface AuthenticationApi { /** diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApi.java index 4f9570031e..259e8bff0a 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.keystone.v2_0; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.ApiMetadata; import org.jclouds.openstack.keystone.v2_0.features.ServiceApi; import org.jclouds.openstack.keystone.v2_0.features.TenantApi; @@ -39,7 +36,6 @@ import com.google.common.base.Optional; * @see * @see KeystoneAsyncApi */ -@Timeout(duration = 10, timeUnit = TimeUnit.SECONDS) public interface KeystoneApi { /** diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java index 24bce70f0f..2b00cc1332 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.openstack.keystone.v2_0; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -63,6 +66,8 @@ public class KeystoneApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ExtensionApi", MINUTES.toMillis(3) + ""); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); properties.setProperty(SERVICE_TYPE, ServiceType.IDENTITY); return properties; diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceApi.java index 3a42c4d31c..e8edca65e7 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.Tenant; /** @@ -34,7 +31,6 @@ import org.jclouds.openstack.keystone.v2_0.domain.Tenant; * "http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Api_Operations.html" * /> */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface ServiceApi { /** diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantApi.java index 813826155c..c76530dd6c 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantApi.java @@ -18,10 +18,7 @@ */ package org.jclouds.openstack.keystone.v2_0.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; import org.jclouds.openstack.keystone.v2_0.domain.Tenant; import org.jclouds.openstack.v2_0.options.PaginationOptions; @@ -36,7 +33,6 @@ import org.jclouds.openstack.v2_0.options.PaginationOptions; * "http://docs.openstack.org/api/openstack-identity-service/2.0/content/Tenant_Operations.html" * /> */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface TenantApi { /** diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenApi.java index 9b14b2a9f4..9d17771260 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.Endpoint; import org.jclouds.openstack.keystone.v2_0.domain.Token; import org.jclouds.openstack.keystone.v2_0.domain.User; @@ -39,7 +36,6 @@ import com.google.common.annotations.Beta; * /> */ @Beta -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface TokenApi { diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserApi.java index ff7499914d..7417154359 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserApi.java @@ -19,10 +19,7 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; import org.jclouds.openstack.keystone.v2_0.domain.Role; import org.jclouds.openstack.keystone.v2_0.domain.User; @@ -41,7 +38,6 @@ import com.google.common.annotations.Beta; * /> */ @Beta -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface UserApi { /** diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionApi.java index 7705ca498e..d61f7e9519 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.v2_0.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.v2_0.domain.Extension; /** @@ -34,7 +31,6 @@ import org.jclouds.openstack.v2_0.domain.Extension; * /> * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ExtensionApi { /** diff --git a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2Client.java b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2Client.java index ab9bab86b0..cd56b13f5a 100644 --- a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2Client.java +++ b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2Client.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.ec2; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.EC2Client; import org.jclouds.openstack.nova.ec2.services.NovaEC2KeyPairClient; import org.jclouds.rest.annotations.Delegate; @@ -30,7 +27,6 @@ import org.jclouds.rest.annotations.Delegate; * * @author Adam Lowe */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface NovaEC2Client extends EC2Client { /** diff --git a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairClient.java b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairClient.java index ef4e88b714..bf759448d1 100644 --- a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairClient.java +++ b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.ec2.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.KeyPair; import org.jclouds.ec2.services.KeyPairClient; import org.jclouds.javax.annotation.Nullable; @@ -29,7 +26,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface NovaEC2KeyPairClient extends KeyPairClient { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApi.java index f92dd3c889..aa92a83f02 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.nova.v2_0; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Zone; import org.jclouds.location.functions.ZoneToEndpoint; @@ -59,7 +56,6 @@ import com.google.inject.Provides; * /> * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface NovaApi { /** * diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApiMetadata.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApiMetadata.java index 087e94522d..00e2cfe84a 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApiMetadata.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/NovaApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.openstack.nova.v2_0; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; import static org.jclouds.openstack.nova.v2_0.config.NovaProperties.AUTO_ALLOCATE_FLOATING_IPS; @@ -68,13 +70,13 @@ public class NovaApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ServerApi.create", MINUTES.toMillis(10) + ""); // auth fail can happen while cloud-init applies keypair updates properties.setProperty("jclouds.ssh.max-retries", "7"); properties.setProperty("jclouds.ssh.retry-auth", "true"); - properties.setProperty(SERVICE_TYPE, ServiceType.COMPUTE); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); - properties.setProperty(AUTO_ALLOCATE_FLOATING_IPS, "false"); properties.setProperty(AUTO_GENERATE_KEYPAIRS, "false"); properties.setProperty(TIMEOUT_SECURITYGROUP_PRESENT, "500"); diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApi.java index 1274c69ce4..3dc2c10d2b 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -37,7 +34,6 @@ import com.google.common.annotations.Beta; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.FLAVOR_EXTRA_SPECS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface FlavorExtraSpecsApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApi.java index 33987cf9a7..d0a26334a5 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.FloatingIP; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -37,7 +34,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.FLOATING_IPS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface FloatingIPApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApi.java index 1a9c594baf..83df990507 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.Host; import org.jclouds.openstack.nova.v2_0.domain.HostResourceUsage; import org.jclouds.openstack.v2_0.ServiceType; @@ -38,7 +35,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.HOSTS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface HostAdministrationApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApi.java index 0d8ecd06f1..8fd40e43b2 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.HostAggregate; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -39,7 +36,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.AGGREGATES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface HostAggregateApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairApi.java index a2769399c4..5de2e1ffd3 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.KeyPair; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -37,7 +34,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.KEYPAIRS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface KeyPairApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaApi.java index af313b9e90..41ff9a8e46 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.Quota; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -40,7 +37,6 @@ import com.google.common.annotations.Beta; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.QUOTAS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface QuotaApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassApi.java index aed2b37986..18c6083c3d 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.QuotaClass; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -39,7 +36,6 @@ import com.google.common.annotations.Beta; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.QUOTA_CLASSES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface QuotaClassApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java index f3811319f0..838e34c1ec 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.Ingress; import org.jclouds.openstack.nova.v2_0.domain.SecurityGroup; import org.jclouds.openstack.nova.v2_0.domain.SecurityGroupRule; @@ -39,7 +36,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SECURITY_GROUPS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface SecurityGroupApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java index 351bb783f8..60860a77ca 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.BackupType; import org.jclouds.openstack.nova.v2_0.options.CreateBackupOfServerOptions; import org.jclouds.openstack.v2_0.ServiceType; @@ -38,7 +35,6 @@ import com.google.common.annotations.Beta; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.ADMIN_ACTIONS) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ServerAdminApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java index c14138c658..938c31f99d 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.ServerWithSecurityGroups; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -41,7 +38,6 @@ import com.google.common.annotations.Beta; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.CREATESERVEREXT) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ServerWithSecurityGroupsApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java index a28c4ec727..7a319e47cd 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.SimpleTenantUsage; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -37,7 +34,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.SIMPLE_TENANT_USAGE) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface SimpleTenantUsageApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java index b3c1027cc2..156714233b 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.VirtualInterface; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -36,7 +33,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VIRTUAL_INTERFACES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VirtualInterfaceApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java index 126c1ff7ec..ed74cc26cb 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.Volume; import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment; import org.jclouds.openstack.nova.v2_0.domain.VolumeSnapshot; @@ -42,7 +39,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VolumeApi { /** * Returns a summary list of snapshots. diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java index de67d983e9..cefa3a6283 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.VolumeAttachment; import org.jclouds.openstack.v2_0.ServiceType; import org.jclouds.openstack.v2_0.services.Extension; @@ -47,7 +44,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUMES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VolumeAttachmentApi { /** * List Volume Attachments for a given Server. diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java index 16d2950785..19c1ad5115 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.nova.v2_0.domain.VolumeType; import org.jclouds.openstack.nova.v2_0.options.CreateVolumeTypeOptions; import org.jclouds.openstack.v2_0.ServiceType; @@ -41,7 +38,6 @@ import com.google.common.collect.FluentIterable; */ @Beta @Extension(of = ServiceType.COMPUTE, namespace = ExtensionNamespaces.VOLUME_TYPES) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VolumeTypeApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java index bfda028a9d..2043de3d6c 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorApi.java @@ -18,10 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; import org.jclouds.openstack.nova.v2_0.domain.Flavor; import org.jclouds.openstack.v2_0.domain.Resource; @@ -37,7 +34,6 @@ import org.jclouds.openstack.v2_0.options.PaginationOptions; * /> * @author Jeremy Daggett */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface FlavorApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java index 5afb755fee..f7b65636e0 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageApi.java @@ -19,10 +19,7 @@ package org.jclouds.openstack.nova.v2_0.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; import org.jclouds.openstack.nova.v2_0.domain.Image; @@ -39,7 +36,6 @@ import org.jclouds.openstack.v2_0.options.PaginationOptions; * /> * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ImageApi { /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerApi.java index dfefcd1e25..d03fa3f0a9 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerApi.java @@ -20,10 +20,7 @@ package org.jclouds.openstack.nova.v2_0.features; import com.google.common.base.Optional; import java.util.Map; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; import org.jclouds.openstack.nova.v2_0.domain.RebootType; @@ -44,7 +41,6 @@ import org.jclouds.openstack.v2_0.options.PaginationOptions; * /> * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ServerApi { /** @@ -88,8 +84,6 @@ public interface ServerApi { * request * @return the newly created server */ - // blocking call - @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) ServerCreated create(String name, String imageRef, String flavorRef, CreateServerOptions... options); /** diff --git a/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityAuthenticationApi.java b/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityAuthenticationApi.java index 92e3937d6e..ed3d03eedd 100644 --- a/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityAuthenticationApi.java +++ b/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityAuthenticationApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.rackspace.cloudidentity.v2_0; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.openstack.keystone.v2_0.AuthenticationApi; import org.jclouds.openstack.keystone.v2_0.domain.Access; @@ -35,7 +32,6 @@ import org.jclouds.rackspace.cloudidentity.v2_0.domain.ApiKeyCredentials; * /> * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface CloudIdentityAuthenticationApi extends AuthenticationApi { /** diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApi.java index c0d2d5f847..ac5b63be5d 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApi.java @@ -19,12 +19,9 @@ package org.jclouds.rackspace.cloudloadbalancers; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Zone; import org.jclouds.location.functions.ZoneToEndpoint; @@ -42,7 +39,6 @@ import com.google.inject.Provides; * @see CloudLoadBalancersAsyncApi * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CloudLoadBalancersApi { /** * @return the Zone codes configured diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApiMetadata.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApiMetadata.java index 503ff587c6..17b01edc34 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApiMetadata.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/CloudLoadBalancersApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.rackspace.cloudloadbalancers; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -65,10 +67,9 @@ public class CloudLoadBalancersApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); - + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); properties.setProperty(SERVICE_TYPE, ServiceType.LOAD_BALANCERS); properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS); - return properties; } diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java index 340c218f7e..bd6e092bba 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.rackspace.cloudloadbalancers.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.HttpResponseException; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancer; @@ -36,7 +33,6 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerRequest; * @see LoadBalancerAsyncApi * @author Everett Toews */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface LoadBalancerApi { /** * Create a new load balancer with the configuration defined by the request. diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java index 5dc1ffea7a..22f65e87ae 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java @@ -19,11 +19,8 @@ package org.jclouds.rackspace.cloudloadbalancers.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.HttpResponseException; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerAttributes; @@ -38,7 +35,6 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.NodeRequest; * @see NodeAsyncApi * @author Everett Toews */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface NodeApi { /** * Create a new node with the configuration defined by the request. diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java index cc05de4944..d693934463 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java @@ -18,8 +18,11 @@ */ package org.jclouds.s3; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_RELAX_HOSTNAME; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.jclouds.blobstore.reference.BlobStoreConstants.DIRECTORY_SUFFIX_FOLDER; @@ -80,6 +83,12 @@ public class S3ApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(90) + ""); + // 512KB/s for max size of 5GB + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "S3Client.getObject", SECONDS.toMillis(5242880 / 512) + ""); + // 128KB/s for max size of 5GB + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "S3Client.putObject", SECONDS.toMillis(5242880 / 128) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "S3Client.copyObject", MINUTES.toMillis(10) + ""); properties.setProperty(PROPERTY_API_VERSION, S3AsyncClient.VERSION); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, S3Headers.DEFAULT_AMAZON_HEADERTAG); diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3Client.java b/apis/s3/src/main/java/org/jclouds/s3/S3Client.java index 7cef327a4c..60d7c11769 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3Client.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3Client.java @@ -19,9 +19,6 @@ package org.jclouds.s3; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.http.options.GetOptions; import org.jclouds.javax.annotation.Nullable; import org.jclouds.s3.domain.AccessControlList; @@ -49,7 +46,6 @@ import com.google.inject.Provides; * @author James Murty * @see */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface S3Client { /** @@ -76,11 +72,6 @@ public interface S3Client { *

  • {@link GetObjectOptions#tail}
  • * * - *

    Timeout

    - * The maximum size of an object in S3 is 5GB. We've set the timeout according to a rate of - * 512kb/s for the maximum size. If you wish a shorter timeout, please use the - * {@link S3AsyncClient} interface}. - * * @param bucketName * namespace of the object you are retrieving * @param key @@ -93,7 +84,6 @@ public interface S3Client { * @see #getObject(String, String) * @see GetObjectOptions */ - @Timeout(duration = 5 * 1024 * 1024 / 512, timeUnit = TimeUnit.SECONDS) S3Object getObject(String bucketName, String key, GetOptions... options); /** @@ -150,10 +140,6 @@ public interface S3Client { *

    * This returns a byte[] of the eTag hash of what Amazon S3 received *

    - *

    Timeout

    - * The maximum size of an object in S3 is 5GB. We've set the timeout according to a rate of - * 128kb/s for the maximum size. If you wish a shorter timeout, please use the - * {@link S3AsyncClient} interface}. * * @param bucketName * namespace of the object you are storing @@ -169,7 +155,6 @@ public interface S3Client { * href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?RESTObjectPUT.html" * /> */ - @Timeout(duration = 5 * 1024 * 1024 / 128, timeUnit = TimeUnit.SECONDS) String putObject(String bucketName, S3Object object, PutObjectOptions... options); /** @@ -193,7 +178,6 @@ public interface S3Client { * /> * */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) boolean putBucketInRegion(@Nullable String region, @Bucket String bucketName, PutBucketOptions... options); /** @@ -273,7 +257,6 @@ public interface S3Client { * @see CopyObjectOptions * @see org.jclouds.s3.domain.CannedAccessPolicy */ - @Timeout(duration = 10, timeUnit = TimeUnit.MINUTES) ObjectMetadata copyObject(String sourceBucket, String sourceObject, String destinationBucket, String destinationObject, CopyObjectOptions... options); diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/SQSApi.java b/apis/sqs/src/main/java/org/jclouds/sqs/SQSApi.java index 8804e24904..dc67d6db0b 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/SQSApi.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/SQSApi.java @@ -20,9 +20,6 @@ package org.jclouds.sqs; import java.net.URI; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Region; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; @@ -43,7 +40,6 @@ import com.google.inject.Provides; * @see SQSAsyncApi */ @Beta -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface SQSApi { /** diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/SQSApiMetadata.java b/apis/sqs/src/main/java/org/jclouds/sqs/SQSApiMetadata.java index d6cb541605..78ec205c5e 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/SQSApiMetadata.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/SQSApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.sqs; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; import static org.jclouds.sqs.config.SQSProperties.CREATE_QUEUE_MAX_RETRIES; @@ -57,9 +59,12 @@ public class SQSApiMetadata extends BaseRestApiMetadata { protected SQSApiMetadata(Builder builder) { super(builder); } - + public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); + // this will gracefully attempt to resolve name issues + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "QueueApi.create", SECONDS.toMillis(61) + ""); properties.setProperty(CREATE_QUEUE_MAX_RETRIES, "60"); properties.setProperty(CREATE_QUEUE_RETRY_INTERVAL, "1000"); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/features/MessageApi.java b/apis/sqs/src/main/java/org/jclouds/sqs/features/MessageApi.java index b90a53a86a..afc74ee6fb 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/features/MessageApi.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/features/MessageApi.java @@ -19,9 +19,6 @@ package org.jclouds.sqs.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.sqs.domain.BatchResult; import org.jclouds.sqs.domain.Message; import org.jclouds.sqs.domain.MessageIdAndMD5; @@ -38,7 +35,6 @@ import com.google.common.collect.Table; * @see MessageAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface MessageApi { /** diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/features/PermissionApi.java b/apis/sqs/src/main/java/org/jclouds/sqs/features/PermissionApi.java index 2f2498e1a3..04470f57b2 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/features/PermissionApi.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/features/PermissionApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.sqs.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.sqs.domain.Action; /** @@ -30,7 +27,6 @@ import org.jclouds.sqs.domain.Action; * @see PermissionAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface PermissionApi { /** diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/features/QueueApi.java b/apis/sqs/src/main/java/org/jclouds/sqs/features/QueueApi.java index 206bd23d86..339ce7654c 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/features/QueueApi.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/features/QueueApi.java @@ -20,9 +20,6 @@ package org.jclouds.sqs.features; import java.net.URI; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.sqs.domain.QueueAttributes; import org.jclouds.sqs.options.CreateQueueOptions; import org.jclouds.sqs.options.ListQueuesOptions; @@ -36,7 +33,6 @@ import com.google.common.collect.FluentIterable; * @see QueueAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface QueueApi { /** @@ -90,8 +86,7 @@ public interface QueueApi { * *

    Note

    * - * If you delete a queue, you must wait at least 60 seconds before creating a - * queue with the same name. + * This method will gracefully retry in case the queue name was recently taken. * * If you provide the name of an existing queue, along with the exact names * and values of all the queue's attributes, CreateQueue returns the queue @@ -111,8 +106,6 @@ public interface QueueApi { * characters; alphanumeric characters, hyphens (-), and * underscores (_) are allowed. */ - // this will gracefully attempt to resolve name issues - @Timeout(duration = 61, timeUnit = TimeUnit.SECONDS) URI create(String queueName); /** @@ -123,7 +116,6 @@ public interface QueueApi { * options such as delay seconds * @see #create(String, String) */ - @Timeout(duration = 61, timeUnit = TimeUnit.SECONDS) URI create(String queueName, CreateQueueOptions options); /** diff --git a/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java b/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java index 07deb5f006..568606858a 100644 --- a/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java +++ b/apis/sqs/src/test/java/org/jclouds/sqs/features/PermissionApiLiveTest.java @@ -24,13 +24,10 @@ import static org.jclouds.sqs.reference.SQSParameters.ACTION; import static org.testng.Assert.assertEquals; import java.net.URI; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.POST; import javax.ws.rs.Path; import org.jclouds.ContextBuilder; -import org.jclouds.concurrent.Timeout; import org.jclouds.concurrent.config.ExecutorServiceModule; import org.jclouds.rest.annotations.FormParams; import org.jclouds.rest.annotations.XMLResponseParser; @@ -64,8 +61,7 @@ public class PermissionApiLiveTest extends BaseSQSApiLiveTest { recreateQueueInRegion(prefix, null); } - @Timeout(duration = 5, timeUnit = TimeUnit.SECONDS) - static interface AnonymousAttributesApi { + static interface AnonymousAttributesApi { String getQueueArn(); } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java index feef2c3e10..6c632ecd33 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftClient.java @@ -20,10 +20,7 @@ package org.jclouds.openstack.swift; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.blobstore.domain.PageSet; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.options.GetOptions; import org.jclouds.openstack.swift.domain.AccountMetadata; import org.jclouds.openstack.swift.domain.ContainerMetadata; @@ -41,7 +38,6 @@ import com.google.inject.Provides; * @see
    * @author Adrian Cole */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface CommonSwiftClient { @Provides SwiftObject newSwiftObject(); @@ -103,14 +99,12 @@ public interface CommonSwiftClient { PageSet listObjects(String container, ListContainerOptions... options); - @Timeout(duration = 5 * 1024 * 1024 / 512, timeUnit = TimeUnit.SECONDS) SwiftObject getObject(String container, String name, GetOptions... options); boolean setObjectInfo(String container, String name, Map userMetadata); MutableObjectInfoWithMetadata getObjectInfo(String container, String name); - @Timeout(duration = 5 * 1024 * 1024 / 128, timeUnit = TimeUnit.SECONDS) String putObject(String container, SwiftObject object); /** diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java index c7eda20b90..60891bb658 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.openstack.swift; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX; import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGIONS; @@ -62,6 +65,12 @@ public class SwiftApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(2) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "OpenStackAuthClient.authenticate", SECONDS.toMillis(10) + ""); + // TODO: value was randomly copied from S3: 512KB/s for max size of 5GB + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "CommonSwiftClient.getObject", SECONDS.toMillis(5242880 / 512) + ""); + // TODO: value was randomly copied from S3: 128KB/s for max size of 5GB + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "CommonSwiftClient.putObject", SECONDS.toMillis(5242880 / 128) + ""); properties.setProperty(PROPERTY_USER_METADATA_PREFIX, "X-Object-Meta-"); properties.setProperty(PROPERTY_REGIONS, "DEFAULT"); return properties; diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java index 3eaab4fd44..68cd5caee8 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftClient.java @@ -18,16 +18,11 @@ */ package org.jclouds.openstack.swift; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Functionality that's in Swift, and not in CloudFiles. * * @author Adrian Cole */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface SwiftClient extends CommonSwiftClient { } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java index 4aa5edacbd..de06bfa214 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneClient.java @@ -18,16 +18,11 @@ */ package org.jclouds.openstack.swift; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Functionality that's in Swift, and not in CloudFiles. * * @author Adrian Cole */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface SwiftKeystoneClient extends CommonSwiftClient { } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyApi.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyApi.java index b8a9f48b65..443354a94a 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyApi.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyApi.java @@ -18,15 +18,11 @@ */ package org.jclouds.openstack.swift.extensions; -import org.jclouds.concurrent.Timeout; - -import java.util.concurrent.TimeUnit; /** * @author Andrei Savu * @see */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface TemporaryUrlKeyApi { /** * Retrieve the key used to generate Temporary object access URLs diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java index 69d770b84d..08e8036c40 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudApiMetadata.java @@ -18,7 +18,9 @@ */ package org.jclouds.vcloud; +import static java.util.concurrent.TimeUnit.MINUTES; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE; import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_DEFAULT_FENCEMODE; import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED; @@ -66,6 +68,9 @@ public class VCloudApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(5) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "VCloudLoginClient.login", MINUTES.toMillis(3) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "VCloudVersionsClient.getSupportedVersions", MINUTES.toMillis(3) + ""); properties.setProperty(PROPERTY_VCLOUD_VERSION_SCHEMA, "1"); properties.setProperty(PROPERTY_VCLOUD_XML_NAMESPACE, String.format("http://www.vmware.com/vcloud/v${%s}", PROPERTY_VCLOUD_VERSION_SCHEMA)); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudClient.java index 174b2010e5..d7e08806a7 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.vcloud; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.vcloud.features.CatalogClient; import org.jclouds.vcloud.features.NetworkClient; @@ -38,7 +35,6 @@ import org.jclouds.vcloud.features.VmClient; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VCloudClient { /** * Provides asynchronous access to VApp Template features. diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsClient.java index ea8322a7bd..617512db39 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/VCloudVersionsClient.java @@ -20,11 +20,6 @@ package org.jclouds.vcloud; import java.net.URI; import java.util.SortedMap; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VCloudVersionsClient { SortedMap getSupportedVersions(); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/CatalogClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/CatalogClient.java index 1445c9d32c..9a0aef60ab 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/CatalogClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/CatalogClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.vcloud.domain.Catalog; import org.jclouds.vcloud.domain.CatalogItem; @@ -34,7 +31,6 @@ import org.jclouds.vcloud.options.CatalogItemOptions; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface CatalogClient { Catalog getCatalog(URI catalogId); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/NetworkClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/NetworkClient.java index 0e51beb2a8..3b33dd68c0 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/NetworkClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/NetworkClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.vcloud.domain.network.OrgNetwork; @@ -30,7 +27,6 @@ import org.jclouds.vcloud.domain.network.OrgNetwork; *

    * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface NetworkClient { OrgNetwork findNetworkInOrgVDCNamed(@Nullable String orgName, @Nullable String catalogName, String networkName); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/OrgClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/OrgClient.java index 38540c639f..03f1f11808 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/OrgClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/OrgClient.java @@ -20,9 +20,6 @@ package org.jclouds.vcloud.features; import java.net.URI; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.vcloud.domain.Org; import org.jclouds.vcloud.domain.ReferenceType; @@ -33,7 +30,6 @@ import org.jclouds.vcloud.domain.ReferenceType; * * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface OrgClient { /** diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/TaskClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/TaskClient.java index 1509045a45..51db7ba135 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/TaskClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/TaskClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.TasksList; @@ -31,7 +28,6 @@ import org.jclouds.vcloud.domain.TasksList; * * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface TaskClient { TasksList getTasksList(URI tasksListId); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppClient.java index 9273475e8c..0fc8a28a5b 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.VApp; @@ -34,7 +31,6 @@ import org.jclouds.vcloud.options.CloneVAppOptions; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VAppClient { VApp findVAppInOrgVDCNamed(@Nullable String orgName, @Nullable String catalogName, String vAppName); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppTemplateClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppTemplateClient.java index cebfa2d847..8a982190fc 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppTemplateClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VAppTemplateClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.ovf.Envelope; import org.jclouds.vcloud.domain.Task; @@ -38,7 +35,6 @@ import org.jclouds.vcloud.options.InstantiateVAppTemplateOptions; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VAppTemplateClient { /** * returns the vapp template corresponding to a catalog item in the catalog associated with the diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VDCClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VDCClient.java index bc61921f78..4167577fb0 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VDCClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VDCClient.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.domain.VDC; /** @@ -30,7 +27,6 @@ import org.jclouds.vcloud.domain.VDC; * * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VDCClient { VDC getVDC(URI vdc); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VmClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VmClient.java index ad1cc3770b..d954a51724 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VmClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/features/VmClient.java @@ -20,9 +20,6 @@ package org.jclouds.vcloud.features; import java.io.InputStream; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.domain.GuestCustomizationSection; import org.jclouds.vcloud.domain.NetworkConnectionSection; import org.jclouds.vcloud.domain.Task; @@ -34,7 +31,6 @@ import org.jclouds.vcloud.domain.Vm; * * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VmClient { Vm getVm(URI vApp); diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/internal/VCloudLoginClient.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/internal/VCloudLoginClient.java index c934d7aa9f..7c383cc2f2 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/internal/VCloudLoginClient.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/internal/VCloudLoginClient.java @@ -18,12 +18,8 @@ */ package org.jclouds.vcloud.internal; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.domain.VCloudSession; -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VCloudLoginClient { VCloudSession login(); diff --git a/archetypes/compute-service-archetype/src/main/resources/archetype-resources/src/main/java/compute/config/__providerName__ComputeServiceContextModule.java b/archetypes/compute-service-archetype/src/main/resources/archetype-resources/src/main/java/compute/config/__providerName__ComputeServiceContextModule.java index 053d671ace..939c292c85 100644 --- a/archetypes/compute-service-archetype/src/main/resources/archetype-resources/src/main/java/compute/config/__providerName__ComputeServiceContextModule.java +++ b/archetypes/compute-service-archetype/src/main/resources/archetype-resources/src/main/java/compute/config/__providerName__ComputeServiceContextModule.java @@ -19,8 +19,6 @@ import static org.jclouds.compute.domain.OsFamily.UBUNTU; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.annotation.Resource; import javax.inject.Inject; import javax.inject.Named; diff --git a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Api.java b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Api.java index 5d07771fd2..4ad338b16f 100644 --- a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Api.java +++ b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Api.java @@ -21,9 +21,6 @@ */ package ${package}; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import ${package}.features.KeyApi; import org.jclouds.rest.annotations.Delegate; @@ -35,7 +32,6 @@ import org.jclouds.rest.annotations.Delegate; * @see api doc * @author ${author} */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ${providerName}Api { /** diff --git a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__ApiMetadata.java b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__ApiMetadata.java index 27f98e76c1..a2f83f7e5c 100644 --- a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__ApiMetadata.java +++ b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__ApiMetadata.java @@ -22,6 +22,9 @@ */ package ${package}; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -59,7 +62,7 @@ public class ${providerName}ApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); - // TODO: add any custom properties here + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); return properties; } diff --git a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Client.java b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Client.java index a7f01d3de7..14b10b05a4 100644 --- a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Client.java +++ b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/__providerName__Client.java @@ -21,10 +21,6 @@ */ package ${package}; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Provides synchronous access to ${providerName}. *

    @@ -33,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * @see * @author ${author} */ -@Timeout(duration = 4, timeUnit = TimeUnit.SECONDS) public interface ${providerName}Client { /* * Note all these delegate to methods in ${providerName}AsyncClient with a specified or inherited timeout. diff --git a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/features/KeyApi.java b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/features/KeyApi.java index 28eec039f7..2a4aba69f1 100644 --- a/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/features/KeyApi.java +++ b/archetypes/rest-client-archetype/src/main/resources/archetype-resources/src/main/java/features/KeyApi.java @@ -22,9 +22,6 @@ package ${package}.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import ${package}.domain.Key; /** @@ -34,7 +31,6 @@ import ${package}.domain.Key; * @see KeyAsyncApi * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface KeyApi { /** diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index 3c33c23f45..d79a331c7e 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -18,12 +18,8 @@ */ package org.jclouds.blobstore.config; -import java.util.concurrent.TimeUnit; - import org.jclouds.blobstore.BlobStore; -import org.jclouds.concurrent.Timeout; -@Timeout(duration = 2, timeUnit = TimeUnit.MINUTES) public interface LocalBlobStore extends BlobStore { } diff --git a/common/openstack/src/main/java/org/jclouds/openstack/internal/OpenStackAuthClient.java b/common/openstack/src/main/java/org/jclouds/openstack/internal/OpenStackAuthClient.java index f3dc6ef6f0..ea15dee303 100644 --- a/common/openstack/src/main/java/org/jclouds/openstack/internal/OpenStackAuthClient.java +++ b/common/openstack/src/main/java/org/jclouds/openstack/internal/OpenStackAuthClient.java @@ -17,9 +17,6 @@ * under the License. */ package org.jclouds.openstack.internal; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.domain.AuthenticationResponse; /** @@ -29,7 +26,6 @@ import org.jclouds.openstack.domain.AuthenticationResponse; * @see * @author Adrian Cole */ -@Timeout(duration = 10, timeUnit = TimeUnit.SECONDS) public interface OpenStackAuthClient { AuthenticationResponse authenticate(String user, String key); diff --git a/common/openstack/src/main/java/org/jclouds/openstack/keystone/v1_1/AuthenticationClient.java b/common/openstack/src/main/java/org/jclouds/openstack/keystone/v1_1/AuthenticationClient.java index 0e51289ad8..b6ce00ccdc 100644 --- a/common/openstack/src/main/java/org/jclouds/openstack/keystone/v1_1/AuthenticationClient.java +++ b/common/openstack/src/main/java/org/jclouds/openstack/keystone/v1_1/AuthenticationClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.keystone.v1_1; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.keystone.v1_1.domain.Auth; /** @@ -32,7 +29,6 @@ import org.jclouds.openstack.keystone.v1_1.domain.Auth; * /> * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface AuthenticationClient { /** diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudClient.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudClient.java index 7d2b56372d..14ff021910 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudClient.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudClient.java @@ -21,9 +21,6 @@ package org.jclouds.trmk.vcloud_0_8; import java.net.URI; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.trmk.vcloud_0_8.domain.Catalog; import org.jclouds.trmk.vcloud_0_8.domain.CatalogItem; @@ -56,7 +53,6 @@ import org.jclouds.trmk.vcloud_0_8.options.InstantiateVAppTemplateOptions; * /> * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface TerremarkVCloudClient { Catalog getCatalog(URI catalogId); diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java index 853bd82204..9e6cd41a9f 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudApiMetadata.java @@ -1,6 +1,9 @@ package org.jclouds.trmk.vcloud_0_8.internal; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.trmk.vcloud_0_8.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_NAME; import static org.jclouds.trmk.vcloud_0_8.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_NS; import static org.jclouds.trmk.vcloud_0_8.reference.TerremarkConstants.PROPERTY_TERREMARK_EXTENSION_VERSION; @@ -11,7 +14,6 @@ import static org.jclouds.trmk.vcloud_0_8.reference.VCloudConstants.PROPERTY_VCL import static org.jclouds.trmk.vcloud_0_8.reference.VCloudConstants.PROPERTY_VCLOUD_XML_SCHEMA; import java.util.Properties; -import java.util.concurrent.TimeUnit; import org.jclouds.apis.ApiMetadata; import org.jclouds.compute.ComputeServiceContext; @@ -30,6 +32,9 @@ public abstract class TerremarkVCloudApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(5) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "TerremarkVCloudLoginClient.login", SECONDS.toMillis(10) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "TerremarkVCloudVersionsClient.getSupportedVersions", SECONDS.toMillis(10) + ""); properties.setProperty(PROPERTY_VCLOUD_VERSION_SCHEMA, "0.8"); properties.setProperty(PROPERTY_SESSION_INTERVAL, 8 * 60 + ""); properties.setProperty(PROPERTY_VCLOUD_XML_SCHEMA, "http://vcloud.safesecureweb.com/ns/vcloud.xsd"); @@ -41,7 +46,7 @@ public abstract class TerremarkVCloudApiMetadata extends BaseRestApiMetadata { properties.setProperty("jclouds.dns_name_length_min", "1"); properties.setProperty("jclouds.dns_name_length_max", "15"); // terremark can sometimes block extremely long times - properties.setProperty(PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED, TimeUnit.MINUTES.toMillis(20) + ""); + properties.setProperty(PROPERTY_VCLOUD_TIMEOUT_TASK_COMPLETED, MINUTES.toMillis(20) + ""); return properties; } diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudLoginClient.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudLoginClient.java index 452dbc644a..95328361f9 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudLoginClient.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudLoginClient.java @@ -18,12 +18,8 @@ */ package org.jclouds.trmk.vcloud_0_8.internal; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.trmk.vcloud_0_8.domain.VCloudSession; -@Timeout(duration = 10, timeUnit = TimeUnit.SECONDS) public interface TerremarkVCloudLoginClient { VCloudSession login(); diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudVersionsClient.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudVersionsClient.java index 685d503113..5e49e158a0 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudVersionsClient.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/internal/TerremarkVCloudVersionsClient.java @@ -20,11 +20,6 @@ package org.jclouds.trmk.vcloud_0_8.internal; import java.net.URI; import java.util.SortedMap; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - -@Timeout(duration = 10, timeUnit = TimeUnit.SECONDS) public interface TerremarkVCloudVersionsClient { SortedMap getSupportedVersions(); diff --git a/core/src/main/java/org/jclouds/concurrent/Timeout.java b/core/src/main/java/org/jclouds/concurrent/Timeout.java deleted file mode 100644 index e120809374..0000000000 --- a/core/src/main/java/org/jclouds/concurrent/Timeout.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Licensed to jclouds, Inc. (jclouds) under one or more - * contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. jclouds licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jclouds.concurrent; - -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; -import java.util.concurrent.TimeUnit; - -/** - * - * This class or method has a timeout used for synchronous calls. - * - * @see TimeUnit - * @see Future#get(long,TimeUnit) - * @author Adrian Cole - */ -@Target( { TYPE, METHOD }) -@Retention(RUNTIME) -public @interface Timeout { - long duration(); - - TimeUnit timeUnit(); -} diff --git a/core/src/main/java/org/jclouds/concurrent/internal/SyncProxy.java b/core/src/main/java/org/jclouds/concurrent/internal/SyncProxy.java index d6078901e5..8f392b1cf2 100644 --- a/core/src/main/java/org/jclouds/concurrent/internal/SyncProxy.java +++ b/core/src/main/java/org/jclouds/concurrent/internal/SyncProxy.java @@ -18,6 +18,7 @@ */ package org.jclouds.concurrent.internal; +import static com.google.common.base.Optional.fromNullable; import static com.google.common.base.Preconditions.checkState; import static com.google.common.reflect.Reflection.newProxy; @@ -32,7 +33,6 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.inject.Named; -import org.jclouds.concurrent.Timeout; import org.jclouds.internal.ClassMethodArgs; import org.jclouds.internal.ClassMethodArgsAndReturnVal; import org.jclouds.rest.annotations.Delegate; @@ -68,7 +68,7 @@ public class SyncProxy extends AbstractInvocationHandler { private final Class declaring; private final Map methodMap; private final Map syncMethodMap; - private final Map timeoutMap; + private final Map> timeoutMap; private final LoadingCache delegateMap; private final Map, Class> sync2Async; private static final Set objectMethods = ImmutableSet.copyOf(Object.class.getMethods()); @@ -83,15 +83,10 @@ public class SyncProxy extends AbstractInvocationHandler { this.delegate = async; this.declaring = declaring; this.sync2Async = ImmutableMap.copyOf(sync2Async); - if (!declaring.isAnnotationPresent(Timeout.class)) { - throw new IllegalArgumentException(String.format("type %s does not specify a default @Timeout", declaring)); - } - Timeout typeTimeout = declaring.getAnnotation(Timeout.class); - long typeNanos = convertToNanos(typeTimeout); ImmutableMap.Builder methodMapBuilder = ImmutableMap.builder(); ImmutableMap.Builder syncMethodMapBuilder = ImmutableMap.builder(); - ImmutableMap.Builder timeoutMapBuilder = ImmutableMap.builder(); + ImmutableMap.Builder> timeoutMapBuilder = ImmutableMap.builder(); for (Method method : declaring.getMethods()) { if (!objectMethods.contains(method)) { @@ -100,7 +95,7 @@ public class SyncProxy extends AbstractInvocationHandler { throw new IllegalArgumentException(String.format( "method %s has different typed exceptions than delegated method %s", method, delegatedMethod)); if (delegatedMethod.getReturnType().isAssignableFrom(ListenableFuture.class)) { - timeoutMapBuilder.put(method, getTimeout(method, typeNanos, timeouts)); + timeoutMapBuilder.put(method, timeoutInMillis(method, timeouts)); methodMapBuilder.put(method, delegatedMethod); } else { syncMethodMapBuilder.put(method, delegatedMethod); @@ -116,22 +111,7 @@ public class SyncProxy extends AbstractInvocationHandler { public Class getDeclaring() { return declaring; } - - private Long getTimeout(Method method, long typeNanos, final Map timeouts) { - Long timeout = overrideTimeout(method, timeouts); - if (timeout == null && method.isAnnotationPresent(Timeout.class)) { - Timeout methodTimeout = method.getAnnotation(Timeout.class); - timeout = convertToNanos(methodTimeout); - } - return timeout != null ? timeout : typeNanos; - - } - - static long convertToNanos(Timeout timeout) { - long methodNanos = TimeUnit.NANOSECONDS.convert(timeout.duration(), timeout.timeUnit()); - return methodNanos; - } - + @Override protected Object handleInvocation(Object o, Method method, Object[] args) throws Exception { if (method.isAnnotationPresent(Delegate.class)) { @@ -160,8 +140,11 @@ public class SyncProxy extends AbstractInvocationHandler { } } else { try { - return ((ListenableFuture) methodMap.get(method).invoke(delegate, args)).get(timeoutMap.get(method), - TimeUnit.NANOSECONDS); + ListenableFuture future = ((ListenableFuture) methodMap.get(method).invoke(delegate, args)); + Optional timeoutNanos = timeoutMap.get(method); + if (timeoutNanos.isPresent()) + return future.get(timeoutNanos.get(), TimeUnit.NANOSECONDS); + return future.get(); } catch (ProvisionException e) { throw Throwables2.returnFirstExceptionIfInListOrThrowStandardExceptionOrCause(method.getExceptionTypes(), e); } catch (ExecutionException e) { @@ -173,16 +156,14 @@ public class SyncProxy extends AbstractInvocationHandler { } // override timeout by values configured in properties(in ms) - private Long overrideTimeout(final Method method, final Map timeouts) { - if (timeouts == null) { - return null; - } - final String className = declaring.getSimpleName(); - Long timeout = timeouts.get(className + "." + method.getName()); - if (timeout == null) { - timeout = timeouts.get(className); - } - return timeout != null ? TimeUnit.MILLISECONDS.toNanos(timeout) : null; + private Optional timeoutInMillis(Method method, Map timeouts) { + String className = declaring.getSimpleName(); + Optional timeoutMillis = fromNullable(timeouts.get(className + "." + method.getName())) + .or(fromNullable(timeouts.get(className))) + .or(fromNullable(timeouts.get("default"))); + if (timeoutMillis.isPresent()) + return Optional.of(TimeUnit.MILLISECONDS.toNanos(timeoutMillis.get())); + return Optional.absent(); } @Override diff --git a/core/src/main/java/org/jclouds/rest/HttpClient.java b/core/src/main/java/org/jclouds/rest/HttpClient.java index c20047945d..ab9eca183f 100644 --- a/core/src/main/java/org/jclouds/rest/HttpClient.java +++ b/core/src/main/java/org/jclouds/rest/HttpClient.java @@ -20,9 +20,7 @@ package org.jclouds.rest; import java.io.InputStream; import java.net.URI; -import java.util.concurrent.TimeUnit; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.io.Payload; @@ -32,7 +30,6 @@ import org.jclouds.io.Payload; * * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface HttpClient { /** * diff --git a/core/src/test/java/org/jclouds/concurrent/internal/SyncProxyTest.java b/core/src/test/java/org/jclouds/concurrent/internal/SyncProxyTest.java index de9fe2dafb..3c66e0a852 100644 --- a/core/src/test/java/org/jclouds/concurrent/internal/SyncProxyTest.java +++ b/core/src/test/java/org/jclouds/concurrent/internal/SyncProxyTest.java @@ -18,22 +18,19 @@ */ package org.jclouds.concurrent.internal; +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; +import static org.easymock.EasyMock.verify; import static org.testng.Assert.assertEquals; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; -import org.jclouds.concurrent.Futures; -import org.jclouds.concurrent.Timeout; import org.jclouds.internal.ClassMethodArgs; import org.jclouds.rest.functions.AlwaysPresentImplicitOptionalConverter; -import org.testng.annotations.BeforeTest; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.google.common.base.Functions; @@ -41,270 +38,84 @@ import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; -import com.google.inject.Provides; /** * Tests behavior of ListenableFutureExceptionParser * - * DISABLED as it always fails on cloudbees - * * @author Adrian Cole */ -@Test(enabled = false, groups = "unit", singleThreaded = true) +@Test(groups = "unit", singleThreaded = true) public class SyncProxyTest { - @Test(enabled = false) - void testConvertNanos() { - assertEquals(SyncProxy.convertToNanos(Sync.class.getAnnotation(Timeout.class)), 40000000); + static ListenableFuture future; + + @SuppressWarnings("unchecked") + @BeforeMethod + void createMockedFuture() throws InterruptedException, ExecutionException, TimeoutException { + future = createMock(ListenableFuture.class); + expect(future.get(250000000, TimeUnit.NANOSECONDS)).andReturn("foo"); + replay(future); } - @Timeout(duration = 40, timeUnit = TimeUnit.MILLISECONDS) - private static interface Sync { - String getString(); - - String newString(); - - @Provides - Set string(); - - String getRuntimeException(); - - String getTypedException() throws FileNotFoundException; - - String take20Milliseconds(); - - String take200MillisecondsAndTimeout(); - - @Timeout(duration = 300, timeUnit = TimeUnit.MILLISECONDS) - String take200MillisecondsAndOverride(); - - String takeXMillisecondsPropOverride(long ms); - } - - static ExecutorService executorService = Executors.newCachedThreadPool(); - public static class Async { - public String toString() { - return "async"; + public ListenableFuture get() { + return future; } - - public ListenableFuture getString() { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() throws Exception { - return "foo"; - } - - }), executorService); - } - - public ListenableFuture getRuntimeException() { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() throws Exception { - throw new RuntimeException(); - } - - }), executorService); - } - - public ListenableFuture getTypedException() throws FileNotFoundException { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() throws FileNotFoundException { - throw new FileNotFoundException(); - } - - }), executorService); - } - - public String newString() { - return "new"; - } - - @Provides - public Set string() { - return ImmutableSet.of("new"); - } - - public ListenableFuture take20Milliseconds() { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() { - try { - Thread.sleep(20); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return "foo"; - } - - }), executorService); - } - - public ListenableFuture take200MillisecondsAndTimeout() { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() { - try { - Thread.sleep(200); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return "foo"; - } - - }), executorService); - } - - public ListenableFuture take200MillisecondsAndOverride() { - return take200MillisecondsAndTimeout(); - } - - public ListenableFuture takeXMillisecondsPropOverride(final long ms) { - return Futures.makeListenable(executorService.submit(new Callable() { - - public String call() { - try { - Thread.sleep(ms); - } catch (InterruptedException e) { - e.printStackTrace(); - } - return "foo"; - } - - }), executorService); - } - } - private Sync sync; + private static interface Sync { + String get(); + } - @BeforeTest - public void setUp() throws IllegalArgumentException, SecurityException, NoSuchMethodException { + public void testWithDefaultPropTimeout() throws Exception { LoadingCache cache = CacheBuilder.newBuilder().build( CacheLoader.from(Functions. constant(null))); - sync = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), Sync.class, new Async(), cache, ImmutableMap., Class> of(), - ImmutableMap.of("Sync.takeXMillisecondsPropOverride", 250L)); - // just to warm up - sync.string(); - } + Sync withOverride = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), Sync.class, new Async(), cache, + ImmutableMap., Class> of(), ImmutableMap. of("default", 250L)); - @Test(enabled = false) - public void testUnwrapListenableFuture() { - assertEquals(sync.getString(), "foo"); - } - - @Test(enabled = false) - public void testPassSync() { - assertEquals(sync.newString(), "new"); - assertEquals(sync.string(), ImmutableSet.of("new")); - } - - @Test(enabled = false) - public void testTake20Milliseconds() { - assertEquals(sync.take20Milliseconds(), "foo"); + assertEquals(withOverride.get(), "foo"); + verify(future); } - @Test(enabled = false, expectedExceptions = RuntimeException.class) - public void testTake200MillisecondsAndTimeout() { - assertEquals(sync.take200MillisecondsAndTimeout(), "foo"); - } - - @Test(enabled = false) - public void testTake200MillisecondsAndOverride() { - assertEquals(sync.take200MillisecondsAndOverride(), "foo"); - } - - @Test(enabled = false) - public void testTake200MillisecondsPropOverride() { - assertEquals(sync.takeXMillisecondsPropOverride(200), "foo"); - } - - @Test(enabled = false, expectedExceptions = RuntimeException.class) - public void testTake300MillisecondsPropTimeout() { - assertEquals(sync.takeXMillisecondsPropOverride(300), "foo"); - } - - @Test(enabled = false) - public void testToString() { - assertEquals(sync.toString(), "Sync Proxy for: Async"); - } - - @Test(enabled = false, expectedExceptions = RuntimeException.class) - public void testUnwrapRuntimeException() { - sync.getRuntimeException(); - } - - @Test(enabled = false, expectedExceptions = FileNotFoundException.class) - public void testUnwrapTypedException() throws FileNotFoundException { - sync.getTypedException(); - } - - @Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) - private static interface SyncWrongException { - String getString(); - - String newString(); - - String getRuntimeException(); - - String getTypedException() throws UnsupportedEncodingException; - - } - - @Test(enabled = false, expectedExceptions = IllegalArgumentException.class) - public void testWrongTypedException() throws IllegalArgumentException, SecurityException, NoSuchMethodException, - IOException { + public void testWithClassPropTimeout() throws Exception { LoadingCache cache = CacheBuilder.newBuilder().build( CacheLoader.from(Functions. constant(null))); - SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), SyncWrongException.class, new Async(), cache, ImmutableMap., Class> of(), + Sync withOverride = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), Sync.class, new Async(), cache, + ImmutableMap., Class> of(), ImmutableMap. of("default", 50L, "Sync", 250L)); + + assertEquals(withOverride.get(), "foo"); + verify(future); + + } + + public void testWithMethodPropTimeout() throws Exception { + LoadingCache cache = CacheBuilder.newBuilder().build( + CacheLoader.from(Functions. constant(null))); + Sync withOverride = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), Sync.class, new Async(), cache, + ImmutableMap., Class> of(), + ImmutableMap. of("default", 50L, "Sync", 100L, "Sync.get", 250L)); + + assertEquals(withOverride.get(), "foo"); + verify(future); + + } + + @SuppressWarnings("unchecked") + public void testWithMethodWithNoTimeoutsCallGetDirectly() throws Exception { + LoadingCache cache = CacheBuilder.newBuilder().build( + CacheLoader.from(Functions. constant(null))); + Sync withOverride = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), Sync.class, new Async(), cache, + ImmutableMap., Class> of(), ImmutableMap. of()); - } - private static interface SyncNoTimeOut { - String getString(); + future = createMock(ListenableFuture.class); + expect(future.get()).andReturn("foo"); + replay(future); + + assertEquals(withOverride.get(), "foo"); + verify(future); - String newString(); - - String getRuntimeException(); - - String getTypedException() throws UnsupportedEncodingException; - - } - - @Test(enabled = false, expectedExceptions = IllegalArgumentException.class) - public void testNoTimeOutException() throws IllegalArgumentException, SecurityException, NoSuchMethodException, - IOException { - LoadingCache cache = CacheBuilder.newBuilder().build( - CacheLoader.from(Functions. constant(null))); - SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), SyncNoTimeOut.class, new Async(), cache, ImmutableMap., Class> of(), - ImmutableMap. of()); - } - - @Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) - private static interface SyncClassOverride { - String getString(); - - String newString(); - - String getRuntimeException(); - - @Timeout(duration = 300, timeUnit = TimeUnit.MILLISECONDS) - String takeXMillisecondsPropOverride(long ms); - - } - - @Test(enabled = false, expectedExceptions = RuntimeException.class) - public void testClassOverridePropTimeout() throws Exception { - LoadingCache cache = CacheBuilder.newBuilder().build( - CacheLoader.from(Functions. constant(null))); - final SyncClassOverride sync2 = SyncProxy.proxy(new AlwaysPresentImplicitOptionalConverter(), SyncClassOverride.class, new Async(), cache, - ImmutableMap., Class> of(), ImmutableMap. of("SyncClassOverride", 100L)); - - assertEquals(sync2.takeXMillisecondsPropOverride(200), "foo"); } } diff --git a/core/src/test/java/org/jclouds/http/IntegrationTestClient.java b/core/src/test/java/org/jclouds/http/IntegrationTestClient.java index 3d60a2b190..559fd3ba20 100644 --- a/core/src/test/java/org/jclouds/http/IntegrationTestClient.java +++ b/core/src/test/java/org/jclouds/http/IntegrationTestClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.http; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.http.options.HttpRequestOptions; import org.jclouds.io.Payload; @@ -32,7 +29,6 @@ import com.google.inject.Provides; * * @author Adrian Cole */ -@Timeout(duration = 40, timeUnit = TimeUnit.SECONDS) public interface IntegrationTestClient { String rowdy(String path); diff --git a/core/src/test/java/org/jclouds/rest/InputParamValidatorTest.java b/core/src/test/java/org/jclouds/rest/InputParamValidatorTest.java index c14c28f157..8ed8c63cd8 100644 --- a/core/src/test/java/org/jclouds/rest/InputParamValidatorTest.java +++ b/core/src/test/java/org/jclouds/rest/InputParamValidatorTest.java @@ -19,13 +19,11 @@ package org.jclouds.rest; import java.lang.reflect.Method; -import java.util.concurrent.TimeUnit; import javax.ws.rs.POST; import javax.ws.rs.PathParam; import org.jclouds.ContextBuilder; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.IntegrationTestAsyncClient; import org.jclouds.http.IntegrationTestClient; import org.jclouds.predicates.validators.AllLowerCaseValidator; @@ -44,17 +42,14 @@ import com.google.inject.util.Types; @Test(groups = "unit") public class InputParamValidatorTest { - @Timeout(duration = 1000, timeUnit = TimeUnit.SECONDS) - class InputParamValidatorForm { + private static interface InputParamValidatorForm { @POST - @ParamValidators( { AllLowerCaseValidator.class }) - public void allParamsValidated(@PathParam("param1") String param1, @PathParam("param2") String param2) { - } + @ParamValidators(AllLowerCaseValidator.class) + void allParamsValidated(@PathParam("param1") String param1, @PathParam("param2") String param2); @POST - public void oneParamValidated(@PathParam("param1") String param1, - @ParamValidators( { AllLowerCaseValidator.class }) @PathParam("param2") String param2) { - } + void oneParamValidated(@PathParam("param1") String param1, + @ParamValidators(AllLowerCaseValidator.class) @PathParam("param2") String param2); } /** @@ -98,31 +93,16 @@ public class InputParamValidatorTest { new AllLowerCaseValidator().validate(null); } - /** - * Tries to use Validator on Integer parameter. Expected result: ClassCastException - * - * @throws Exception - * if method isn't found - */ - @Test - public void testWrongPredicateTypeLiteral() throws Exception { - @Timeout(duration = 1000, timeUnit = TimeUnit.SECONDS) - class WrongValidator { - @SuppressWarnings("unused") - @POST - @ParamValidators( { AllLowerCaseValidator.class }) - public void method(@PathParam("param1") Integer param1) { - } - } - WrongValidator validator = new WrongValidator(); - Method method = validator.getClass().getMethod("method", Integer.class); + private static interface WrongValidator { + @POST + @ParamValidators(AllLowerCaseValidator.class) + void method(@PathParam("param1") Integer param1); + } - try { - new InputParamValidator(injector).validateMethodParametersOrThrow(method, 55); - throw new TestException("ClassCastException expected, but wasn't thrown"); - } catch (ClassCastException e) { - // supposed to happen - continue - } + @Test(expectedExceptions = ClassCastException.class) + public void testWrongPredicateTypeLiteral() throws Exception { + Method method = WrongValidator.class.getMethod("method", Integer.class); + new InputParamValidator(injector).validateMethodParametersOrThrow(method, 55); } @SuppressWarnings("unchecked") diff --git a/core/src/test/java/org/jclouds/rest/annotationparsing/DelegateAnnotationExpectTest.java b/core/src/test/java/org/jclouds/rest/annotationparsing/DelegateAnnotationExpectTest.java index 9a5542bf5d..944156ecc9 100644 --- a/core/src/test/java/org/jclouds/rest/annotationparsing/DelegateAnnotationExpectTest.java +++ b/core/src/test/java/org/jclouds/rest/annotationparsing/DelegateAnnotationExpectTest.java @@ -21,14 +21,11 @@ package org.jclouds.rest.annotationparsing; import static org.jclouds.providers.AnonymousProviderMetadata.forClientMappedToAsyncClientOnEndpoint; import static org.testng.Assert.assertTrue; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.HEAD; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jclouds.Fallbacks.FalseOnNotFoundOr404; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.providers.ProviderMetadata; @@ -51,7 +48,6 @@ import com.google.inject.Module; @Test(groups = "unit", testName = "DelegateAnnotationExpectTest") public class DelegateAnnotationExpectTest extends BaseRestClientExpectTest { - @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) static interface DelegatingApi { @Delegate @@ -66,7 +62,6 @@ public class DelegateAnnotationExpectTest extends BaseRestClientExpectTest deployVirtualAppliance(VirtualApplianceDto virtualAppliance, VirtualMachineTaskDto options); + AcceptedRequestDto deployVirtualAppliance(VirtualApplianceDto virtualAppliance, VirtualMachineTaskDto options); /** * Undeploy a virtual appliance. @@ -390,7 +385,6 @@ public interface CloudApi { * the extra options for the undeploy process. * @return Response message to the undeploy request. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto undeployVirtualAppliance(VirtualApplianceDto virtualAppliance, VirtualMachineTaskDto options); @@ -519,7 +513,6 @@ public interface CloudApi { * extra deploy options. * @return Response message to the deploy request. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto deployVirtualMachine(VirtualMachineDto virtualMachine, VirtualMachineTaskDto options); /** @@ -531,7 +524,6 @@ public interface CloudApi { * extra undeploy options. * @return Response message to the undeploy request. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto undeployVirtualMachine(VirtualMachineDto virtualMachine, VirtualMachineTaskDto options); /** @@ -611,7 +603,6 @@ public interface CloudApi { * @return The task reference or null if the operation completed * synchronously. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto replaceVolumes(VirtualMachineDto virtualMachine, VirtualMachineOptions options, VolumeManagementDto... volumes); @@ -741,7 +732,6 @@ public interface CloudApi { * @return The created volume. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) VolumeManagementDto createVolume(VirtualDatacenterDto virtualDatacenter, VolumeManagementDto volume); /** @@ -756,7 +746,6 @@ public interface CloudApi { * @return The task reference or null if no task was generated. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto updateVolume(VolumeManagementDto volume); /** @@ -766,7 +755,6 @@ public interface CloudApi { * The volume to delete. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void deleteVolume(VolumeManagementDto volume); /** diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/ConfigApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/ConfigApi.java index fee541be01..a251ab61f3 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/ConfigApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/ConfigApi.java @@ -19,12 +19,9 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.abiquo.domain.config.options.LicenseOptions; import org.jclouds.abiquo.domain.config.options.PropertyOptions; import org.jclouds.abiquo.reference.annotations.EnterpriseEdition; -import org.jclouds.concurrent.Timeout; import com.abiquo.server.core.appslibrary.CategoriesDto; import com.abiquo.server.core.appslibrary.CategoryDto; @@ -44,7 +41,6 @@ import com.abiquo.server.core.enterprise.PrivilegesDto; * @author Ignasi Barrera * @author Francesc Montserrat */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface ConfigApi { /*********************** License ***********************/ diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EnterpriseApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EnterpriseApi.java index 48fb91d926..db2253a559 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EnterpriseApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EnterpriseApi.java @@ -19,11 +19,8 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.abiquo.domain.enterprise.options.EnterpriseOptions; import org.jclouds.abiquo.reference.annotations.EnterpriseEdition; -import org.jclouds.concurrent.Timeout; import com.abiquo.am.model.TemplatesStateDto; import com.abiquo.server.core.appslibrary.DatacenterRepositoryDto; @@ -53,7 +50,6 @@ import com.abiquo.server.core.infrastructure.network.VLANNetworksDto; * @author Ignasi Barrera * @author Francesc Montserrat */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface EnterpriseApi { /*********************** Enterprise ********************** */ @@ -296,7 +292,6 @@ public interface EnterpriseApi { * @param datacenterRepositoryId * Id of the datacenter repository containing the templates. */ - @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) void refreshTemplateRepository(Integer enterpriseId, Integer datacenterRepositoryId); /*********************** Network ***********************/ diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EventApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EventApi.java index b6730af9fa..3c41c57591 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EventApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/EventApi.java @@ -19,10 +19,7 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.abiquo.domain.event.options.EventOptions; -import org.jclouds.concurrent.Timeout; import com.abiquo.server.core.event.EventsDto; @@ -35,7 +32,6 @@ import com.abiquo.server.core.event.EventsDto; * @author Ignasi Barrera * @author Vivien Mahé */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface EventApi { /** * List events. diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/InfrastructureApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/InfrastructureApi.java index 364b691f19..50be0087b7 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/InfrastructureApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/InfrastructureApi.java @@ -19,8 +19,6 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.abiquo.domain.infrastructure.options.DatacenterOptions; import org.jclouds.abiquo.domain.infrastructure.options.IpmiOptions; import org.jclouds.abiquo.domain.infrastructure.options.MachineOptions; @@ -29,7 +27,6 @@ import org.jclouds.abiquo.domain.network.options.IpOptions; import org.jclouds.abiquo.domain.network.options.NetworkOptions; import org.jclouds.abiquo.domain.options.search.FilterOptions; import org.jclouds.abiquo.reference.annotations.EnterpriseEdition; -import org.jclouds.concurrent.Timeout; import com.abiquo.model.enumerator.HypervisorType; import com.abiquo.model.enumerator.RemoteServiceType; @@ -84,7 +81,6 @@ import com.abiquo.server.core.infrastructure.storage.TiersDto; * @author Ignasi Barrera * @author Francesc Montserrat */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface InfrastructureApi { /*********************** Datacenter ***********************/ @@ -150,7 +146,6 @@ public interface InfrastructureApi { * Password to authenticate. * @return The physical machine. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) MachineDto discoverSingleMachine(DatacenterDto datacenter, String ip, HypervisorType hypervisorType, String user, String password); @@ -176,7 +171,6 @@ public interface InfrastructureApi { * Optional query params. * @return The physical machine. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) MachineDto discoverSingleMachine(DatacenterDto datacenter, String ip, HypervisorType hypervisorType, String user, String password, MachineOptions options); @@ -202,7 +196,6 @@ public interface InfrastructureApi { * Password to authenticate. * @return The physical machine list. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) MachinesDto discoverMultipleMachines(final DatacenterDto datacenter, final String ipFrom, final String ipTo, final HypervisorType hypervisorType, final String user, final String password); @@ -230,7 +223,6 @@ public interface InfrastructureApi { * Optional query params. * @return The physical machine list. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) MachinesDto discoverMultipleMachines(final DatacenterDto datacenter, final String ipFrom, final String ipTo, final HypervisorType hypervisorType, final String user, final String password, final MachineOptions options); @@ -402,7 +394,6 @@ public interface InfrastructureApi { * @return The list of managed racks for the datacenter. */ @EnterpriseEdition - @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) UcsRacksDto listManagedRacks(DatacenterDto datacenter); /** @@ -415,7 +406,6 @@ public interface InfrastructureApi { * @return The created rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) UcsRackDto createManagedRack(final DatacenterDto datacenter, final UcsRackDto rack); /** @@ -428,7 +418,6 @@ public interface InfrastructureApi { * @return The rack or null if it does not exist. */ @EnterpriseEdition - @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) UcsRackDto getManagedRack(DatacenterDto datacenter, Integer rackId); /** @@ -439,7 +428,6 @@ public interface InfrastructureApi { * @return The updated rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) UcsRackDto updateManagedRack(final UcsRackDto rack); /** @@ -450,7 +438,6 @@ public interface InfrastructureApi { * @return The list of service profiles for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) LogicServersDto listServiceProfiles(UcsRackDto rack); /** @@ -463,7 +450,6 @@ public interface InfrastructureApi { * @return The list of service profiles for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) LogicServersDto listServiceProfiles(UcsRackDto rack, FilterOptions options); /** @@ -474,7 +460,6 @@ public interface InfrastructureApi { * @return The list of service profile templates for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) LogicServersDto listServiceProfileTemplates(UcsRackDto rack); /** @@ -487,7 +472,6 @@ public interface InfrastructureApi { * @return The list of service profile templates for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) LogicServersDto listServiceProfileTemplates(UcsRackDto rack, FilterOptions options); /** @@ -498,7 +482,6 @@ public interface InfrastructureApi { * @return The list of organizations for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) OrganizationsDto listOrganizations(UcsRackDto rack); /** @@ -511,7 +494,6 @@ public interface InfrastructureApi { * @return The list of organizations for the rack. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) OrganizationsDto listOrganizations(UcsRackDto rack, FilterOptions options); /** @@ -527,7 +509,6 @@ public interface InfrastructureApi { * The name of the new service profile. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void cloneLogicServer(UcsRackDto rack, LogicServerDto logicServer, OrganizationDto organization, String newName); /** @@ -539,7 +520,6 @@ public interface InfrastructureApi { * The original logic server. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void deleteLogicServer(UcsRackDto rack, LogicServerDto logicServer); /** @@ -555,7 +535,6 @@ public interface InfrastructureApi { * The name of the blade. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void associateLogicServer(UcsRackDto rack, LogicServerDto logicServer, OrganizationDto organization, String bladeName); /** @@ -574,7 +553,6 @@ public interface InfrastructureApi { * The name of the blade. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void associateTemplate(UcsRackDto rack, LogicServerDto logicServer, OrganizationDto organization, String newName, String bladeName); @@ -593,7 +571,6 @@ public interface InfrastructureApi { * The name of the blade. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void cloneAndAssociateLogicServer(UcsRackDto rack, LogicServerDto logicServer, OrganizationDto organization, String newName, String bladeName); @@ -606,7 +583,6 @@ public interface InfrastructureApi { * The logic server. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) void dissociateLogicServer(UcsRackDto rack, LogicServerDto logicServer); /** @@ -620,7 +596,6 @@ public interface InfrastructureApi { * The fsm. */ @EnterpriseEdition - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) FsmsDto listFsms(UcsRackDto rack, String dn); /*********************** Remote Service ********************** */ @@ -764,7 +739,7 @@ public interface InfrastructureApi { * @param machine * The machine to release. */ - Void cancelReservation(EnterpriseDto enterprise, MachineDto machine); + void cancelReservation(EnterpriseDto enterprise, MachineDto machine); /** * List all machines racks for a rack. diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/PricingApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/PricingApi.java index d52734d08a..c36a4e5a6d 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/PricingApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/PricingApi.java @@ -18,10 +18,6 @@ */ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - import com.abiquo.server.core.pricing.CostCodeCurrenciesDto; import com.abiquo.server.core.pricing.CostCodeDto; import com.abiquo.server.core.pricing.CostCodesDto; @@ -43,7 +39,6 @@ import com.abiquo.server.core.pricing.PricingTiersDto; * @author Ignasi Barrera * @author Susana Acedo */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface PricingApi { /*********************** Currency ********************** */ diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/TaskApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/TaskApi.java index cb4b32423a..12a9d81d6a 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/TaskApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/TaskApi.java @@ -19,10 +19,6 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - import com.abiquo.model.rest.RESTLink; import com.abiquo.model.transport.SingleResourceTransportDto; import com.abiquo.server.core.task.TaskDto; @@ -37,7 +33,6 @@ import com.abiquo.server.core.task.TasksDto; * @author Ignasi Barrera * @author Francesc Montserrat */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface TaskApi { /*********************** Task ***********************/ diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/VirtualMachineTemplateApi.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/VirtualMachineTemplateApi.java index d214c80216..c673c52667 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/features/VirtualMachineTemplateApi.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/features/VirtualMachineTemplateApi.java @@ -19,11 +19,8 @@ package org.jclouds.abiquo.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.abiquo.domain.cloud.options.ConversionOptions; import org.jclouds.abiquo.domain.cloud.options.VirtualMachineTemplateOptions; -import org.jclouds.concurrent.Timeout; import com.abiquo.model.enumerator.DiskFormatType; import com.abiquo.model.transport.AcceptedRequestDto; @@ -42,7 +39,6 @@ import com.abiquo.server.core.appslibrary.VirtualMachineTemplatesDto; * @author Ignasi Barrera * @author Francesc Montserrat */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualMachineTemplateApi { /*********************** Virtual Machine Template ***********************/ @@ -119,7 +115,6 @@ public interface VirtualMachineTemplateApi { * datacenter and original template. * @return Response message to the persistent request. */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) AcceptedRequestDto createPersistentVirtualMachineTemplate(Integer enterpriseId, Integer datacenterRepositoryId, VirtualMachineTemplatePersistentDto persistentOptions); diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/rest/internal/AbiquoHttpClient.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/rest/internal/AbiquoHttpClient.java index 9b42778976..01d6e62ec8 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/rest/internal/AbiquoHttpClient.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/rest/internal/AbiquoHttpClient.java @@ -19,9 +19,6 @@ package org.jclouds.abiquo.rest.internal; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.http.HttpResponse; import com.abiquo.model.rest.RESTLink; @@ -31,7 +28,6 @@ import com.abiquo.model.rest.RESTLink; * * @author Ignasi Barrera */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface AbiquoHttpClient { /** * Perform a GET request to the given link. diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApi.java index 72c49ea3dd..2680d9f0d0 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApi.java @@ -18,15 +18,12 @@ */ package org.jclouds.azure.management; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.features.DiskApi; import org.jclouds.azure.management.features.HostedServiceApi; import org.jclouds.azure.management.features.LocationApi; import org.jclouds.azure.management.features.OSImageApi; import org.jclouds.azure.management.features.OperationApi; import org.jclouds.azure.management.features.RoleApi; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; /** @@ -38,7 +35,6 @@ import org.jclouds.rest.annotations.Delegate; * @see doc * @author Gerald Pereira, Adrian Cole */ -@Timeout(duration = 4, timeUnit = TimeUnit.SECONDS) public interface AzureManagementApi { /** * The Service Management API includes operations for listing the available data center locations diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApiMetadata.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApiMetadata.java index 193e4f55f6..0b53f419ec 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApiMetadata.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/AzureManagementApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.azure.management; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.azure.management.config.AzureManagementProperties.SUBSCRIPTION_ID; import java.net.URI; @@ -63,6 +65,7 @@ public class AzureManagementApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); return properties; } diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/DiskApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/DiskApi.java index 12e63478b2..a0fd5530f2 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/DiskApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/DiskApi.java @@ -19,10 +19,7 @@ package org.jclouds.azure.management.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.Disk; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes operations for managing the disks in your subscription. @@ -31,7 +28,6 @@ import org.jclouds.concurrent.Timeout; * @see DiskAsyncApi * @author Gerald Pereira */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface DiskApi { /** diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/HostedServiceApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/HostedServiceApi.java index 16daf17976..50d9121e64 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/HostedServiceApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/HostedServiceApi.java @@ -19,13 +19,10 @@ package org.jclouds.azure.management.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.Deployment; import org.jclouds.azure.management.domain.HostedService; import org.jclouds.azure.management.domain.HostedServiceWithDetailedProperties; import org.jclouds.azure.management.options.CreateHostedServiceOptions; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes operations for managing the hosted services beneath your @@ -35,7 +32,6 @@ import org.jclouds.concurrent.Timeout; * @see HostedServiceAsyncApi * @author Gerald Pereira, Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface HostedServiceApi { /** diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/LocationApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/LocationApi.java index 25a4acadf2..b624ebfb8c 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/LocationApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/LocationApi.java @@ -19,10 +19,7 @@ package org.jclouds.azure.management.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.Location; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes operations for listing the available data center locations @@ -33,7 +30,6 @@ import org.jclouds.concurrent.Timeout; * @see LocationAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface LocationApi { /** diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OSImageApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OSImageApi.java index ebaceb02c2..1695ee6d52 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OSImageApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OSImageApi.java @@ -19,11 +19,8 @@ package org.jclouds.azure.management.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.OSImage; import org.jclouds.azure.management.domain.OSImageParams; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes operations for managing the OS images in your subscription. @@ -32,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * @see OSImageAsyncApi * @author Gerald Pereira, Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface OSImageApi { /** diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OperationApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OperationApi.java index ec70bc9146..cf81d1689b 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OperationApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/OperationApi.java @@ -18,10 +18,7 @@ */ package org.jclouds.azure.management.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.Operation; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes one operation for tracking the progress of asynchronous requests. @@ -30,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @see OperationAsyncApi * @author Gerald Pereira */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface OperationApi { Operation get(String requestId); diff --git a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/RoleApi.java b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/RoleApi.java index cb2e97d84d..d637ad41ec 100644 --- a/labs/azure-management/src/main/java/org/jclouds/azure/management/features/RoleApi.java +++ b/labs/azure-management/src/main/java/org/jclouds/azure/management/features/RoleApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.azure.management.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.management.domain.DeploymentParams; import org.jclouds.azure.management.domain.role.PersistentVMRole; -import org.jclouds.concurrent.Timeout; /** * The Service Management API includes operations for managing the virtual @@ -32,7 +29,6 @@ import org.jclouds.concurrent.Timeout; * @see RoleAsyncApi * @author Gerald Pereira, Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface RoleApi { // FUUUUUU this is not the good REST call !!! Use getDeployment instead :@ diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApi.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApi.java index a361c1a3f2..b82b190013 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApi.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApi.java @@ -18,12 +18,9 @@ */ package org.jclouds.snia.cdmi.v1; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.snia.cdmi.v1.features.ContainerApi; import org.jclouds.snia.cdmi.v1.features.DataApi; @@ -38,7 +35,6 @@ import org.jclouds.snia.cdmi.v1.features.DomainApi; * @see api doc * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface CDMIApi { /** diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApiMetadata.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApiMetadata.java index 714e13b92d..e43147d60b 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApiMetadata.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/CDMIApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.snia.cdmi.v1; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -55,6 +58,8 @@ public class CDMIApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "DataNonCDMIContentTypeApi", MINUTES.toMillis(10) + ""); return properties; } diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/ContainerApi.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/ContainerApi.java index fe3b1ae555..0ba1efa270 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/ContainerApi.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/ContainerApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.snia.cdmi.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.snia.cdmi.v1.domain.Container; import org.jclouds.snia.cdmi.v1.options.CreateContainerOptions; import org.jclouds.snia.cdmi.v1.queryparams.ContainerQueryParams; @@ -32,7 +29,6 @@ import org.jclouds.snia.cdmi.v1.queryparams.ContainerQueryParams; * @author Kenneth Nagin * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ContainerApi { /** diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataApi.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataApi.java index 935047ee07..e7ebea1b28 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataApi.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.snia.cdmi.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.snia.cdmi.v1.domain.DataObject; import org.jclouds.snia.cdmi.v1.options.CreateDataObjectOptions; import org.jclouds.snia.cdmi.v1.queryparams.DataObjectQueryParams; @@ -32,7 +29,6 @@ import org.jclouds.snia.cdmi.v1.queryparams.DataObjectQueryParams; * @author Kenneth Nagin * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface DataApi { /** * get CDMI Data object diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataNonCDMIContentTypeApi.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataNonCDMIContentTypeApi.java index 593565e2c2..cd3a4586b4 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataNonCDMIContentTypeApi.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DataNonCDMIContentTypeApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.snia.cdmi.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.io.Payload; import org.jclouds.snia.cdmi.v1.domain.DataObject; import org.jclouds.snia.cdmi.v1.queryparams.DataObjectQueryParams; @@ -32,7 +29,6 @@ import org.jclouds.snia.cdmi.v1.queryparams.DataObjectQueryParams; * @author Kenneth Nagin * @see api doc */ -@Timeout(duration = 600, timeUnit = TimeUnit.SECONDS) public interface DataNonCDMIContentTypeApi { /** * get CDMI Data object diff --git a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DomainApi.java b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DomainApi.java index f3e671a260..55b88ebff8 100644 --- a/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DomainApi.java +++ b/labs/cdmi/src/main/java/org/jclouds/snia/cdmi/v1/features/DomainApi.java @@ -18,10 +18,6 @@ */ package org.jclouds.snia.cdmi.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Domain Object Resource Operations * @@ -29,7 +25,6 @@ import org.jclouds.concurrent.Timeout; * @author Adrian Cole * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface DomainApi { } diff --git a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2ApiMetadata.java b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2ApiMetadata.java index a7242ff07e..838ec8d968 100644 --- a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2ApiMetadata.java +++ b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2ApiMetadata.java @@ -18,18 +18,21 @@ */ package org.jclouds.cloudstack.ec2; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; import org.jclouds.apis.ApiMetadata; import org.jclouds.cloudstack.ec2.config.CloudStackEC2RestClientModule; import org.jclouds.ec2.EC2ApiMetadata; +import org.jclouds.ec2.EC2AsyncClient; +import org.jclouds.ec2.EC2Client; import org.jclouds.ec2.compute.config.EC2ComputeServiceContextModule; import org.jclouds.ec2.compute.config.EC2ResolveImagesModule; -import org.jclouds.rest.RestContext; import com.google.common.collect.ImmutableSet; -import com.google.common.reflect.TypeToken; import com.google.inject.Module; /** @@ -39,9 +42,6 @@ import com.google.inject.Module; */ public class CloudStackEC2ApiMetadata extends EC2ApiMetadata { - public static final TypeToken> CONTEXT_TOKEN = new TypeToken>() { - }; - private static Builder builder() { return new Builder(); } @@ -61,13 +61,13 @@ public class CloudStackEC2ApiMetadata extends EC2ApiMetadata { public static Properties defaultProperties() { Properties properties = EC2ApiMetadata.defaultProperties(); - // any property overrides here + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AMIClient.describeImagesInRegion", MINUTES.toMillis(15) + ""); return properties; } public static class Builder extends EC2ApiMetadata.Builder { protected Builder(){ - super(CloudStackEC2Client.class, CloudStackEC2AsyncClient.class); + super(EC2Client.class, EC2AsyncClient.class); id("cloudstack-ec2") .name("CloudBridge (EC2 clone) API") .version("2010-11-15") diff --git a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2AsyncClient.java b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2AsyncClient.java deleted file mode 100644 index 43dabfeb96..0000000000 --- a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2AsyncClient.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to jclouds, Inc. (jclouds) under one or more - * contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. jclouds licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jclouds.cloudstack.ec2; - -import org.jclouds.cloudstack.ec2.services.CloudStackAMIAsyncClient; -import org.jclouds.ec2.EC2AsyncClient; -import org.jclouds.rest.annotations.Delegate; - -/** - * Provides asynchronous access to EC2 services. - * - * @author Adrian Cole - */ -public interface CloudStackEC2AsyncClient extends EC2AsyncClient { - /** - * {@inheritDoc} - */ - @Delegate - @Override - CloudStackAMIAsyncClient getAMIServices(); -} diff --git a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2Client.java b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2Client.java deleted file mode 100644 index 9f9fc16873..0000000000 --- a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/CloudStackEC2Client.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Licensed to jclouds, Inc. (jclouds) under one or more - * contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. jclouds licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jclouds.cloudstack.ec2; - -import java.util.concurrent.TimeUnit; - -import org.jclouds.cloudstack.ec2.services.CloudStackAMIClient; -import org.jclouds.concurrent.Timeout; -import org.jclouds.ec2.EC2Client; -import org.jclouds.rest.annotations.Delegate; - -/** - * Provides synchronous access to EC2 services. - * - * @author Adrian Cole - */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) -public interface CloudStackEC2Client extends EC2Client { - - /** - * {@inheritDoc} - */ - @Delegate - @Override - CloudStackAMIClient getAMIServices(); -} diff --git a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/config/CloudStackEC2RestClientModule.java b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/config/CloudStackEC2RestClientModule.java index 6458057bcc..606aca3d01 100644 --- a/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/config/CloudStackEC2RestClientModule.java +++ b/labs/cloudstack-ec2/src/main/java/org/jclouds/cloudstack/ec2/config/CloudStackEC2RestClientModule.java @@ -18,60 +18,17 @@ */ package org.jclouds.cloudstack.ec2.config; -import java.util.Map; - -import javax.inject.Singleton; - -import org.jclouds.cloudstack.ec2.CloudStackEC2AsyncClient; -import org.jclouds.cloudstack.ec2.CloudStackEC2Client; -import org.jclouds.cloudstack.ec2.services.CloudStackAMIAsyncClient; -import org.jclouds.cloudstack.ec2.services.CloudStackAMIClient; import org.jclouds.ec2.EC2AsyncClient; import org.jclouds.ec2.EC2Client; import org.jclouds.ec2.config.EC2RestClientModule; -import org.jclouds.ec2.features.WindowsApi; -import org.jclouds.ec2.features.WindowsAsyncApi; -import org.jclouds.ec2.services.AvailabilityZoneAndRegionAsyncClient; -import org.jclouds.ec2.services.AvailabilityZoneAndRegionClient; -import org.jclouds.ec2.services.ElasticBlockStoreAsyncClient; -import org.jclouds.ec2.services.ElasticBlockStoreClient; -import org.jclouds.ec2.services.ElasticIPAddressAsyncClient; -import org.jclouds.ec2.services.ElasticIPAddressClient; -import org.jclouds.ec2.services.InstanceAsyncClient; -import org.jclouds.ec2.services.InstanceClient; -import org.jclouds.ec2.services.KeyPairAsyncClient; -import org.jclouds.ec2.services.KeyPairClient; -import org.jclouds.ec2.services.SecurityGroupAsyncClient; -import org.jclouds.ec2.services.SecurityGroupClient; -import org.jclouds.ec2.services.WindowsAsyncClient; -import org.jclouds.ec2.services.WindowsClient; import org.jclouds.rest.ConfiguresRestClient; -import com.google.common.collect.ImmutableMap; -import com.google.common.reflect.TypeToken; -import com.google.inject.Provides; - /** * * @author Adrian Cole */ @ConfiguresRestClient -public class CloudStackEC2RestClientModule extends EC2RestClientModule { - public static final Map, Class> DELEGATE_MAP = ImmutableMap., Class> builder()// - .put(CloudStackAMIClient.class, CloudStackAMIAsyncClient.class)// - .put(ElasticIPAddressClient.class, ElasticIPAddressAsyncClient.class)// - .put(InstanceClient.class, InstanceAsyncClient.class)// - .put(KeyPairClient.class, KeyPairAsyncClient.class)// - .put(SecurityGroupClient.class, SecurityGroupAsyncClient.class)// - .put(WindowsClient.class, WindowsAsyncClient.class)// - .put(AvailabilityZoneAndRegionClient.class, AvailabilityZoneAndRegionAsyncClient.class)// - .put(ElasticBlockStoreClient.class, ElasticBlockStoreAsyncClient.class)// - .put(WindowsApi.class, WindowsAsyncApi.class)// - .build(); - - public CloudStackEC2RestClientModule() { - super(TypeToken.of(CloudStackEC2Client.class), TypeToken.of(CloudStackEC2AsyncClient.class), DELEGATE_MAP); - } +public class CloudStackEC2RestClientModule extends EC2RestClientModule { @Override protected void configure() { @@ -81,15 +38,4 @@ public class CloudStackEC2RestClientModule extends EC2RestClientModule { +public abstract class BaseCloudStackEC2RestClientExpectTest extends BaseRestClientExpectTest { protected static final String CONSTANT_DATE = "2012-04-16T15:54:08.897Z"; public BaseCloudStackEC2RestClientExpectTest() { diff --git a/labs/elb/src/main/java/org/jclouds/elb/ELBApi.java b/labs/elb/src/main/java/org/jclouds/elb/ELBApi.java index 5aee911c6e..28307ff5a0 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/ELBApi.java +++ b/labs/elb/src/main/java/org/jclouds/elb/ELBApi.java @@ -19,9 +19,6 @@ package org.jclouds.elb; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.elb.features.AvailabilityZoneApi; import org.jclouds.elb.features.InstanceApi; import org.jclouds.elb.features.LoadBalancerApi; @@ -43,7 +40,6 @@ import com.google.inject.Provides; * @see ELBAsyncApi */ @Beta -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface ELBApi { /** * diff --git a/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java b/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java index 766339e44f..afa6088b94 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java +++ b/labs/elb/src/main/java/org/jclouds/elb/ELBApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.elb; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; @@ -60,6 +62,7 @@ public class ELBApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, "amz"); return properties; diff --git a/labs/elb/src/main/java/org/jclouds/elb/features/AvailabilityZoneApi.java b/labs/elb/src/main/java/org/jclouds/elb/features/AvailabilityZoneApi.java index b2e3865b96..f59eea4e23 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/features/AvailabilityZoneApi.java +++ b/labs/elb/src/main/java/org/jclouds/elb/features/AvailabilityZoneApi.java @@ -19,10 +19,6 @@ package org.jclouds.elb.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Provides access to Amazon ELB via the Query API *

    @@ -31,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @see AvailabilityZoneAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface AvailabilityZoneApi { /** diff --git a/labs/elb/src/main/java/org/jclouds/elb/features/InstanceApi.java b/labs/elb/src/main/java/org/jclouds/elb/features/InstanceApi.java index 96af8942bc..1c5f1f7671 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/features/InstanceApi.java +++ b/labs/elb/src/main/java/org/jclouds/elb/features/InstanceApi.java @@ -19,9 +19,6 @@ package org.jclouds.elb.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.elb.domain.InstanceHealth; /** @@ -32,7 +29,6 @@ import org.jclouds.elb.domain.InstanceHealth; * @see InstanceAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface InstanceApi { /** diff --git a/labs/elb/src/main/java/org/jclouds/elb/features/LoadBalancerApi.java b/labs/elb/src/main/java/org/jclouds/elb/features/LoadBalancerApi.java index 2f31b15f2b..9877a02cd1 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/features/LoadBalancerApi.java +++ b/labs/elb/src/main/java/org/jclouds/elb/features/LoadBalancerApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.elb.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.elb.domain.Listener; import org.jclouds.elb.domain.LoadBalancer; import org.jclouds.elb.options.ListLoadBalancersOptions; @@ -36,7 +33,6 @@ import org.jclouds.javax.annotation.Nullable; * @see LoadBalancerAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface LoadBalancerApi { String createListeningInAvailabilityZones(String name, Iterable listeners, diff --git a/labs/elb/src/main/java/org/jclouds/elb/features/PolicyApi.java b/labs/elb/src/main/java/org/jclouds/elb/features/PolicyApi.java index d84f1b7e78..23e39eaa42 100644 --- a/labs/elb/src/main/java/org/jclouds/elb/features/PolicyApi.java +++ b/labs/elb/src/main/java/org/jclouds/elb/features/PolicyApi.java @@ -19,9 +19,6 @@ package org.jclouds.elb.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.elb.domain.Policy; import org.jclouds.elb.domain.PolicyType; import org.jclouds.elb.options.ListPoliciesOptions; @@ -34,7 +31,6 @@ import org.jclouds.javax.annotation.Nullable; * @see * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface PolicyApi { /** diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApi.java index c2175f9fef..2b49f1a4c5 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.fujitsu.fgcp; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.services.AdditionalDiskApi; import org.jclouds.fujitsu.fgcp.services.DiskImageApi; import org.jclouds.fujitsu.fgcp.services.FirewallApi; @@ -37,7 +34,6 @@ import org.jclouds.rest.annotations.Delegate; * * @author Dies Koper */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface FGCPApi { @Delegate diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApiMetadata.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApiMetadata.java index 770bd9fe62..0822b29efc 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApiMetadata.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/FGCPApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.fujitsu.fgcp; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -55,6 +58,7 @@ public class FGCPApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); // enables peer verification using the CAs bundled with the JRE (or // value of javax.net.ssl.trustStore if set) properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "false"); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskApi.java index ec0e455e54..93daba5500 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.VDisk; import org.jclouds.fujitsu.fgcp.domain.VDiskStatus; @@ -29,7 +26,6 @@ import org.jclouds.fujitsu.fgcp.domain.VDiskStatus; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface AdditionalDiskApi { VDiskStatus getStatus(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java index e3774855c4..c711a8a1bc 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/AdditionalDiskAsyncApi.java @@ -18,14 +18,11 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.binders.BindAlsoToSystemId; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; @@ -51,7 +48,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface AdditionalDiskAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerApi.java index 82bb512cb1..6cb14bb668 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerApi.java @@ -19,9 +19,6 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.BuiltinServer; import org.jclouds.fujitsu.fgcp.domain.BuiltinServerBackup; import org.jclouds.fujitsu.fgcp.domain.BuiltinServerConfiguration; @@ -33,7 +30,6 @@ import org.jclouds.fujitsu.fgcp.domain.BuiltinServerStatus; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface BuiltinServerApi { void start(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java index b5b3bdcb19..4516062d53 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/BuiltinServerAsyncApi.java @@ -19,14 +19,11 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.binders.BindAlsoToSystemId; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; @@ -55,7 +52,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface BuiltinServerAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageApi.java index 294d2827ef..468b0783a1 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.DiskImage; /** @@ -28,7 +25,6 @@ import org.jclouds.fujitsu.fgcp.domain.DiskImage; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DiskImageApi { DiskImage get(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java index 112a24dd5e..faf70a115c 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/DiskImageAsyncApi.java @@ -18,14 +18,11 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; import org.jclouds.fujitsu.fgcp.domain.DiskImage; @@ -48,7 +45,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface DiskImageAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallApi.java index bbb5067dd0..ebc23762ac 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallApi.java @@ -19,9 +19,6 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.Rule; /** @@ -29,7 +26,6 @@ import org.jclouds.fujitsu.fgcp.domain.Rule; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface FirewallApi extends BuiltinServerApi { Set getNATConfiguration(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java index 597e15dd2a..6146cb97a2 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/FirewallAsyncApi.java @@ -19,13 +19,10 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; import org.jclouds.fujitsu.fgcp.domain.Rule; @@ -49,7 +46,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface FirewallAsyncApi extends BuiltinServerAsyncApi { @POST diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerApi.java index d1c6309a53..276fc95d53 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerApi.java @@ -18,16 +18,11 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * API relating to a built-in server of type software load balancer (SLB). * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface LoadBalancerApi extends BuiltinServerApi { } diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerAsyncApi.java index 49871284bd..619bec3aa9 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/LoadBalancerAsyncApi.java @@ -18,12 +18,9 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.filters.RequestAuthenticator; import org.jclouds.fujitsu.fgcp.reference.RequestParameters; @@ -41,7 +38,6 @@ import org.jclouds.rest.annotations.RequestFilters; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface LoadBalancerAsyncApi extends BuiltinServerAsyncApi { /* diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressApi.java index 21771d74d0..ccf1d6da80 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.PublicIP; import org.jclouds.fujitsu.fgcp.domain.PublicIPStatus; @@ -29,7 +26,6 @@ import org.jclouds.fujitsu.fgcp.domain.PublicIPStatus; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface PublicIPAddressApi { void attach(String systemId, String ip); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java index 5b26fa1cf0..5e9b2b1935 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/PublicIPAddressAsyncApi.java @@ -18,14 +18,11 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; import org.jclouds.fujitsu.fgcp.domain.PublicIP; @@ -49,7 +46,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface PublicIPAddressAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateApi.java index 16bfde89d4..2d4e5af78b 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.VSystemDescriptor; /** @@ -29,7 +26,6 @@ import org.jclouds.fujitsu.fgcp.domain.VSystemDescriptor; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SystemTemplateApi { VSystemDescriptor get(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java index 0deb371877..8ce25df2e2 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/SystemTemplateAsyncApi.java @@ -18,14 +18,11 @@ */ package org.jclouds.fujitsu.fgcp.services; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; import org.jclouds.fujitsu.fgcp.domain.VSystemDescriptor; @@ -49,7 +46,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SystemTemplateAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCApi.java index 03ec4357cf..9c8c49ee46 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCApi.java @@ -20,9 +20,6 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.AddressRange; import org.jclouds.fujitsu.fgcp.domain.DiskImage; import org.jclouds.fujitsu.fgcp.domain.EventLog; @@ -40,7 +37,6 @@ import org.jclouds.javax.annotation.Nullable; * @see VirtualDCAsyncApi * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualDCApi { String createVirtualSystem(String descriptorId, String name); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java index 7836893678..cb8e6f898c 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualDCAsyncApi.java @@ -20,14 +20,11 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; import org.jclouds.fujitsu.fgcp.domain.AddressRange; @@ -59,7 +56,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualDCAsyncApi { // @POST diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerApi.java index e1dabaf021..81638facc8 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerApi.java @@ -19,9 +19,6 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.PerformanceInfo; import org.jclouds.fujitsu.fgcp.domain.VServer; import org.jclouds.fujitsu.fgcp.domain.VServerStatus; @@ -32,7 +29,6 @@ import org.jclouds.fujitsu.fgcp.domain.VServerWithDetails; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualServerApi { void start(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java index 15d85a2299..93fc1437f6 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualServerAsyncApi.java @@ -19,15 +19,12 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.binders.BindAlsoToSystemId; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; @@ -55,7 +52,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualServerAsyncApi { @GET diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemApi.java index 3bc12cda1b..1db2b09e7c 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemApi.java @@ -19,9 +19,6 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.domain.BuiltinServer; import org.jclouds.fujitsu.fgcp.domain.PublicIP; import org.jclouds.fujitsu.fgcp.domain.VDisk; @@ -35,7 +32,6 @@ import org.jclouds.fujitsu.fgcp.domain.VSystemWithDetails; * * @author Dies Koper */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualSystemApi { void destroy(String id); diff --git a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java index 12a02753b5..921ec880ab 100644 --- a/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java +++ b/labs/fgcp/src/main/java/org/jclouds/fujitsu/fgcp/services/VirtualSystemAsyncApi.java @@ -19,14 +19,11 @@ package org.jclouds.fujitsu.fgcp.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; -import org.jclouds.concurrent.Timeout; import org.jclouds.fujitsu.fgcp.FGCPAsyncApi; import org.jclouds.fujitsu.fgcp.binders.BindAlsoToSystemId; import org.jclouds.fujitsu.fgcp.compute.functions.SingleElementResponseToElement; @@ -57,7 +54,6 @@ import com.google.common.util.concurrent.ListenableFuture; @QueryParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @PayloadParams(keys = RequestParameters.VERSION, values = FGCPAsyncApi.VERSION) @Consumes(MediaType.TEXT_XML) -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VirtualSystemAsyncApi { @GET diff --git a/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApi.java b/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApi.java index d106c825ee..641ba34034 100644 --- a/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApi.java +++ b/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApi.java @@ -19,7 +19,6 @@ package org.jclouds.googlecompute; import com.google.common.annotations.Beta; -import org.jclouds.concurrent.Timeout; import org.jclouds.googlecompute.features.OperationApi; import org.jclouds.googlecompute.features.ProjectApi; import org.jclouds.googlecompute.features.ZoneApi; @@ -27,8 +26,6 @@ import org.jclouds.rest.annotations.Delegate; import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import java.util.concurrent.TimeUnit; - /** * Provides synchronous access to GoogleCompute. *

    @@ -38,7 +35,6 @@ import java.util.concurrent.TimeUnit; * @see api doc */ @Beta -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GoogleComputeApi { /** diff --git a/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApiMetadata.java b/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApiMetadata.java index 2af0309efd..267786043d 100644 --- a/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApiMetadata.java +++ b/labs/google-compute/src/main/java/org/jclouds/googlecompute/GoogleComputeApiMetadata.java @@ -32,7 +32,9 @@ import org.jclouds.rest.internal.BaseRestApiMetadata; import java.net.URI; import java.util.Properties; +import static java.util.concurrent.TimeUnit.MINUTES; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.oauth.v2.config.OAuthProperties.AUDIENCE; import static org.jclouds.oauth.v2.config.OAuthProperties.SIGNATURE_OR_MAC_ALGORITHM; @@ -61,6 +63,7 @@ public class GoogleComputeApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); properties.put("oauth.endpoint", "https://accounts.google.com/o/oauth2/token"); properties.put(AUDIENCE, "https://accounts.google.com/o/oauth2/token"); properties.put(SIGNATURE_OR_MAC_ALGORITHM, "RS256"); diff --git a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/OperationApi.java b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/OperationApi.java index 9fcf4b5855..5de9758585 100644 --- a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/OperationApi.java +++ b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/OperationApi.java @@ -20,14 +20,11 @@ package org.jclouds.googlecompute.features; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.googlecompute.domain.ListPage; import org.jclouds.googlecompute.domain.Operation; import org.jclouds.googlecompute.options.ListOptions; import org.jclouds.javax.annotation.Nullable; -import java.util.concurrent.TimeUnit; - /** * Provides synchronous access to Operations via their REST API. *

    @@ -35,7 +32,6 @@ import java.util.concurrent.TimeUnit; * @author David Alves * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface OperationApi { /** diff --git a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ProjectApi.java b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ProjectApi.java index f3c5192836..e5369462f4 100644 --- a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ProjectApi.java +++ b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ProjectApi.java @@ -19,13 +19,10 @@ package org.jclouds.googlecompute.features; -import org.jclouds.concurrent.Timeout; import org.jclouds.googlecompute.domain.Operation; import org.jclouds.googlecompute.domain.Project; import java.util.Map; -import java.util.concurrent.TimeUnit; - /** * Provides synchronous access to Projects via their REST API. *

    @@ -34,7 +31,6 @@ import java.util.concurrent.TimeUnit; * @see ProjectAsyncApi * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ProjectApi { /** diff --git a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ZoneApi.java b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ZoneApi.java index c505ddaf33..f02e5b3821 100644 --- a/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ZoneApi.java +++ b/labs/google-compute/src/main/java/org/jclouds/googlecompute/features/ZoneApi.java @@ -20,14 +20,11 @@ package org.jclouds.googlecompute.features; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.googlecompute.domain.ListPage; import org.jclouds.googlecompute.domain.Zone; import org.jclouds.googlecompute.options.ListOptions; import org.jclouds.javax.annotation.Nullable; -import java.util.concurrent.TimeUnit; - /** * Provides synchronous access to Zones via their REST API. *

    @@ -35,7 +32,6 @@ import java.util.concurrent.TimeUnit; * @author David Alves * @see */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface ZoneApi { /** diff --git a/labs/iam/src/main/java/org/jclouds/iam/IAMApi.java b/labs/iam/src/main/java/org/jclouds/iam/IAMApi.java index eb338a618a..65b0fb3f12 100644 --- a/labs/iam/src/main/java/org/jclouds/iam/IAMApi.java +++ b/labs/iam/src/main/java/org/jclouds/iam/IAMApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.iam; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.iam.domain.User; import org.jclouds.iam.features.UserApi; import org.jclouds.rest.annotations.Delegate; @@ -34,7 +31,6 @@ import org.jclouds.rest.annotations.Delegate; * /> * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface IAMApi { /** * Retrieves information about the current user, including the user's path, GUID, and ARN. diff --git a/labs/iam/src/main/java/org/jclouds/iam/IAMApiMetadata.java b/labs/iam/src/main/java/org/jclouds/iam/IAMApiMetadata.java index cdd6fcdfb7..4d61593233 100644 --- a/labs/iam/src/main/java/org/jclouds/iam/IAMApiMetadata.java +++ b/labs/iam/src/main/java/org/jclouds/iam/IAMApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.iam; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; @@ -56,6 +58,7 @@ public class IAMApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, "amz"); return properties; diff --git a/labs/iam/src/main/java/org/jclouds/iam/features/UserApi.java b/labs/iam/src/main/java/org/jclouds/iam/features/UserApi.java index 1581ad5822..c1f26bdf53 100644 --- a/labs/iam/src/main/java/org/jclouds/iam/features/UserApi.java +++ b/labs/iam/src/main/java/org/jclouds/iam/features/UserApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.iam.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.iam.domain.User; import org.jclouds.iam.options.ListUsersOptions; import org.jclouds.javax.annotation.Nullable; @@ -34,7 +31,6 @@ import org.jclouds.javax.annotation.Nullable; * @see * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface UserApi { /** * Retrieves information about the current user, including the user's path, GUID, and ARN. diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApi.java index 5ecc2b123d..21b2143c1f 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.jenkins.v1; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.jenkins.v1.domain.Node; import org.jclouds.jenkins.v1.features.ComputerApi; import org.jclouds.jenkins.v1.features.JobApi; @@ -34,7 +31,6 @@ import org.jclouds.rest.annotations.Delegate; * @see api doc * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface JenkinsApi { /** * @return the master computer diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApiMetadata.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApiMetadata.java index 00a8c26b48..cfc673f8bc 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApiMetadata.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/JenkinsApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.jenkins.v1; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -57,6 +60,7 @@ public class JenkinsApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); return properties; } diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerApi.java index 6ffc3669dd..494c60f2d1 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/ComputerApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.jenkins.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.jenkins.v1.domain.Computer; import org.jclouds.jenkins.v1.domain.ComputerView; @@ -31,7 +28,6 @@ import org.jclouds.jenkins.v1.domain.ComputerView; * @author Adrian Cole * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ComputerApi { /** diff --git a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobApi.java b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobApi.java index c71a92fbb1..59bf360c41 100644 --- a/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobApi.java +++ b/labs/jenkins/src/main/java/org/jclouds/jenkins/v1/features/JobApi.java @@ -19,9 +19,6 @@ package org.jclouds.jenkins.v1.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.jenkins.v1.domain.JobDetails; import org.jclouds.jenkins.v1.domain.LastBuild; @@ -32,7 +29,6 @@ import org.jclouds.jenkins.v1.domain.LastBuild; * @author Adrian Cole * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface JobApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApi.java index e703fe5a62..be9d46e949 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApi.java @@ -19,9 +19,6 @@ package org.jclouds.joyent.cloudapi.v6_5; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.joyent.cloudapi.v6_5.features.DatacenterApi; import org.jclouds.joyent.cloudapi.v6_5.features.DatasetApi; @@ -43,7 +40,6 @@ import com.google.inject.Provides; * @see api doc * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface JoyentCloudApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApiMetadata.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApiMetadata.java index a51fed6cf4..1d7cc26e2d 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApiMetadata.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/JoyentCloudApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.joyent.cloudapi.v6_5; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -59,6 +62,7 @@ public class JoyentCloudApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); // auth fail sometimes happens, as the rc.local script that injects the // authorized key executes after ssh has started. properties.setProperty("jclouds.ssh.max-retries", "7"); diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatacenterApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatacenterApi.java index 2453c21a8a..7d3f345d1e 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatacenterApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatacenterApi.java @@ -20,10 +20,6 @@ package org.jclouds.joyent.cloudapi.v6_5.features; import java.net.URI; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Datacenter Services * @@ -31,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @author Adrian Cole * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface DatacenterApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatasetApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatasetApi.java index 01494bfffc..20894294dd 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatasetApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/DatasetApi.java @@ -1,9 +1,6 @@ package org.jclouds.joyent.cloudapi.v6_5.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.joyent.cloudapi.v6_5.domain.Dataset; /** @@ -14,7 +11,6 @@ import org.jclouds.joyent.cloudapi.v6_5.domain.Dataset; * @see DatasetAsyncApi * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface DatasetApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/KeyApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/KeyApi.java index 26e5e93bec..b070160f3e 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/KeyApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/KeyApi.java @@ -1,9 +1,6 @@ package org.jclouds.joyent.cloudapi.v6_5.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.joyent.cloudapi.v6_5.domain.Key; /** @@ -14,7 +11,6 @@ import org.jclouds.joyent.cloudapi.v6_5.domain.Key; * @see KeyAsyncApi * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface KeyApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/MachineApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/MachineApi.java index 5a05e7608b..c1b317db4b 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/MachineApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/MachineApi.java @@ -19,9 +19,6 @@ package org.jclouds.joyent.cloudapi.v6_5.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.joyent.cloudapi.v6_5.domain.Machine; import org.jclouds.joyent.cloudapi.v6_5.options.CreateMachineOptions; @@ -33,7 +30,6 @@ import org.jclouds.joyent.cloudapi.v6_5.options.CreateMachineOptions; * @see MachineAsyncApi * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface MachineApi { /** diff --git a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/PackageApi.java b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/PackageApi.java index 098a10d9aa..a03d23d220 100644 --- a/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/PackageApi.java +++ b/labs/joyent-cloudapi/src/main/java/org/jclouds/joyent/cloudapi/v6_5/features/PackageApi.java @@ -1,10 +1,6 @@ package org.jclouds.joyent.cloudapi.v6_5.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Provides synchronous access to Packages. *

    @@ -13,7 +9,6 @@ import org.jclouds.concurrent.Timeout; * @see PackageAsyncApi * @see api doc */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface PackageApi { /** diff --git a/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java b/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java index fd0121fae2..02c59ffa05 100644 --- a/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java +++ b/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java @@ -18,13 +18,10 @@ */ package org.jclouds.oauth.v2; -import org.jclouds.concurrent.Timeout; import org.jclouds.oauth.v2.domain.Token; import org.jclouds.oauth.v2.domain.TokenRequest; import org.jclouds.rest.AuthorizationException; -import java.util.concurrent.TimeUnit; - /** * Provides synchronous access to OAuth. *

    @@ -32,7 +29,6 @@ import java.util.concurrent.TimeUnit; * @author David Alves * @see OAuthAsyncApi */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface OAuthApi { /** diff --git a/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApiMetadata.java b/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApiMetadata.java index bce3f3f886..9c2497d561 100644 --- a/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApiMetadata.java +++ b/labs/oauth/src/main/java/org/jclouds/oauth/v2/OAuthApiMetadata.java @@ -30,7 +30,9 @@ import org.jclouds.rest.internal.BaseRestApiMetadata; import java.net.URI; import java.util.Properties; +import static java.util.concurrent.TimeUnit.MINUTES; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.oauth.v2.config.OAuthProperties.SIGNATURE_OR_MAC_ALGORITHM; /** @@ -58,6 +60,7 @@ public class OAuthApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(1) + ""); properties.put(SIGNATURE_OR_MAC_ALGORITHM, "RS256"); properties.put(PROPERTY_SESSION_INTERVAL, 3600); return properties; diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApi.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApi.java index 6f0cd99852..89dc554783 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApi.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.glance.v1_0; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Zone; import org.jclouds.location.functions.ZoneToEndpoint; @@ -40,7 +37,6 @@ import com.google.inject.Provides; * @see api doc * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GlanceApi { /** * diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApiMetadata.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApiMetadata.java index 01b059edbe..4019bcb159 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApiMetadata.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/GlanceApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.openstack.glance.v1_0; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -62,6 +64,7 @@ public class GlanceApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); properties.setProperty(SERVICE_TYPE, ServiceType.IMAGE); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); return properties; diff --git a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/features/ImageApi.java b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/features/ImageApi.java index 0aceab60ab..a3197a73c6 100644 --- a/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/features/ImageApi.java +++ b/labs/openstack-glance/src/main/java/org/jclouds/openstack/glance/v1_0/features/ImageApi.java @@ -19,10 +19,7 @@ package org.jclouds.openstack.glance.v1_0.features; import java.io.InputStream; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.io.Payload; import org.jclouds.javax.annotation.Nullable; import org.jclouds.openstack.glance.v1_0.domain.Image; @@ -40,7 +37,6 @@ import org.jclouds.openstack.keystone.v2_0.domain.PaginatedCollection; * @see ImageAsyncApi * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ImageApi { /** diff --git a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApi.java b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApi.java index b2b24ee111..b84a19f357 100644 --- a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApi.java +++ b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApi.java @@ -19,12 +19,9 @@ package org.jclouds.openstack.quantum.v1_0; import java.util.Set; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Path; import javax.ws.rs.PathParam; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Zone; import org.jclouds.location.functions.ZoneToEndpoint; @@ -44,7 +41,6 @@ import com.google.inject.Provides; * @see QuantumAsyncApi * @see api doc */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface QuantumApi { /** * @return the Zone codes configured diff --git a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadata.java b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadata.java index 45a0725f3c..cc8a386e92 100644 --- a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadata.java +++ b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.openstack.quantum.v1_0; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -62,6 +64,7 @@ public class QuantumApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); properties.setProperty(SERVICE_TYPE, ServiceType.NETWORK); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); return properties; diff --git a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApi.java b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApi.java index 795118202a..24770d96d0 100644 --- a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApi.java +++ b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.quantum.v1_0.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.quantum.v1_0.domain.Network; import org.jclouds.openstack.quantum.v1_0.domain.NetworkDetails; import org.jclouds.openstack.quantum.v1_0.domain.Reference; @@ -38,7 +35,6 @@ import com.google.common.collect.FluentIterable; * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface NetworkApi { /** diff --git a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/PortApi.java b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/PortApi.java index b4a1680e6e..20b44d8f7a 100644 --- a/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/PortApi.java +++ b/labs/openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/PortApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.quantum.v1_0.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.quantum.v1_0.domain.Attachment; import org.jclouds.openstack.quantum.v1_0.domain.Port; import org.jclouds.openstack.quantum.v1_0.domain.PortDetails; @@ -40,7 +37,6 @@ import com.google.common.collect.FluentIterable; * @see api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface PortApi { /** * Returns the list of all ports currently defined in Quantum for the requested network diff --git a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java index 3fdbe8341a..77794d0420 100644 --- a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java +++ b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApi.java @@ -19,9 +19,6 @@ package org.jclouds.openstack.swift.v1; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Region; import org.jclouds.location.functions.RegionToEndpoint; @@ -42,7 +39,6 @@ import com.google.inject.Provides; * @see api doc * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SwiftApi { /** * diff --git a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java index 59e8e87618..e1d93d8c9f 100644 --- a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java +++ b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/SwiftApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.openstack.swift.v1; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE; import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE; @@ -62,6 +64,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); properties.setProperty(SERVICE_TYPE, ServiceType.OBJECT_STORE); properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS); return properties; diff --git a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java index 78d8a31f04..4c6e53dc0f 100644 --- a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java +++ b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/AccountApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.swift.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.swift.v1.domain.Account; /** @@ -32,7 +29,6 @@ import org.jclouds.openstack.swift.v1.domain.Account; * href="http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-account-services.html" * >api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AccountApi { /** diff --git a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java index f87e2b4ad1..f7fef52bfc 100644 --- a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java +++ b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ContainerApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.openstack.swift.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.openstack.swift.v1.domain.Container; import org.jclouds.openstack.swift.v1.options.ListContainersOptions; @@ -35,7 +32,6 @@ import com.google.common.collect.FluentIterable; * "http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-container-services.html" * >api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ContainerApi { /** diff --git a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java index 57dbb9e64d..228f1e5f64 100644 --- a/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java +++ b/labs/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/features/ObjectApi.java @@ -18,10 +18,6 @@ */ package org.jclouds.openstack.swift.v1.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Storage Object Services An object represents the data and any metadata for the files stored in * the system. Through the ReST interface, metadata for an object can be included by adding custom @@ -37,7 +33,6 @@ import org.jclouds.concurrent.Timeout; * "http://docs.openstack.org/api/openstack-object-storage/1.0/content/storage-object-services.html" * >api doc */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ObjectApi { } diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApi.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApi.java index 022e5a5076..e9fa7d55ca 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApi.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.opsource.servers; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.opsource.servers.features.AccountApi; import org.jclouds.opsource.servers.features.ServerApi; import org.jclouds.opsource.servers.features.ServerImageApi; @@ -32,7 +29,6 @@ import org.jclouds.rest.annotations.Delegate; * @see OpSourceServersAsyncApi * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface OpSourceServersApi { /** diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java index 5cd3e989a5..0ed3089be5 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/OpSourceServersApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.opsource.servers; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -53,6 +56,7 @@ public class OpSourceServersApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); return properties; } diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/AccountApi.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/AccountApi.java index 83c806f0ba..6e87901f5e 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/AccountApi.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/AccountApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.opsource.servers.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.opsource.servers.domain.Account; import org.jclouds.opsource.servers.domain.DataCentersList; @@ -31,7 +28,6 @@ import org.jclouds.opsource.servers.domain.DataCentersList; * @see AccountAsyncApi * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AccountApi { /** diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerApi.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerApi.java index cdbd82bff9..cd53fad3aa 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerApi.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.opsource.servers.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.opsource.servers.domain.DeployedServersList; import org.jclouds.opsource.servers.domain.PendingDeployServersList; @@ -31,7 +28,6 @@ import org.jclouds.opsource.servers.domain.PendingDeployServersList; * @see ServerAsyncApi * @author Kedar Dave */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ServerApi { /** diff --git a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerImageApi.java b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerImageApi.java index 8212f5343c..60b6d9517d 100644 --- a/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerImageApi.java +++ b/labs/opsource-servers/src/main/java/org/jclouds/opsource/servers/features/ServerImageApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.opsource.servers.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.opsource.servers.domain.ServerImagesList; /** @@ -30,7 +27,6 @@ import org.jclouds.opsource.servers.domain.ServerImagesList; * @see ServerImageAsyncApi * @author Kedar Dave */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ServerImageApi { /** diff --git a/labs/rds/src/main/java/org/jclouds/rds/RDSApi.java b/labs/rds/src/main/java/org/jclouds/rds/RDSApi.java index 37f1ff4f49..25ba59870e 100644 --- a/labs/rds/src/main/java/org/jclouds/rds/RDSApi.java +++ b/labs/rds/src/main/java/org/jclouds/rds/RDSApi.java @@ -19,9 +19,6 @@ package org.jclouds.rds; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.location.Region; import org.jclouds.location.functions.RegionToEndpointOrProviderIfNull; @@ -42,7 +39,6 @@ import com.google.inject.Provides; * @see RDSAsyncApi */ @Beta -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface RDSApi { /** * diff --git a/labs/rds/src/main/java/org/jclouds/rds/RDSApiMetadata.java b/labs/rds/src/main/java/org/jclouds/rds/RDSApiMetadata.java index f53bf44475..0943303d4f 100644 --- a/labs/rds/src/main/java/org/jclouds/rds/RDSApiMetadata.java +++ b/labs/rds/src/main/java/org/jclouds/rds/RDSApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.rds; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; @@ -58,6 +60,7 @@ public class RDSApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); properties.setProperty(PROPERTY_HEADER_TAG, "amz"); return properties; diff --git a/labs/rds/src/main/java/org/jclouds/rds/features/InstanceApi.java b/labs/rds/src/main/java/org/jclouds/rds/features/InstanceApi.java index d54e8ca096..bd93ae5249 100644 --- a/labs/rds/src/main/java/org/jclouds/rds/features/InstanceApi.java +++ b/labs/rds/src/main/java/org/jclouds/rds/features/InstanceApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.rds.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.rds.domain.Instance; import org.jclouds.rds.domain.InstanceRequest; @@ -36,7 +33,6 @@ import org.jclouds.rds.options.ListInstancesOptions; * @see InstanceAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface InstanceApi { /** * Creates a new DB instance in a random, system-chosen Availability Zone in the endpoint's diff --git a/labs/rds/src/main/java/org/jclouds/rds/features/SecurityGroupApi.java b/labs/rds/src/main/java/org/jclouds/rds/features/SecurityGroupApi.java index 78a8320a2d..ac77198b77 100644 --- a/labs/rds/src/main/java/org/jclouds/rds/features/SecurityGroupApi.java +++ b/labs/rds/src/main/java/org/jclouds/rds/features/SecurityGroupApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.rds.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.rds.domain.SecurityGroup; import org.jclouds.rds.options.ListSecurityGroupsOptions; @@ -35,7 +32,6 @@ import org.jclouds.rds.options.ListSecurityGroupsOptions; * @see SecurityGroupAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface SecurityGroupApi { /** * Creates a new DB Security Group. DB Security Groups control access to a DB Instance. diff --git a/labs/rds/src/main/java/org/jclouds/rds/features/SubnetGroupApi.java b/labs/rds/src/main/java/org/jclouds/rds/features/SubnetGroupApi.java index 43b2659c7b..b81b2aa682 100644 --- a/labs/rds/src/main/java/org/jclouds/rds/features/SubnetGroupApi.java +++ b/labs/rds/src/main/java/org/jclouds/rds/features/SubnetGroupApi.java @@ -18,11 +18,8 @@ */ package org.jclouds.rds.features; -import java.util.concurrent.TimeUnit; - import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.rds.domain.SubnetGroup; import org.jclouds.rds.options.ListSubnetGroupsOptions; @@ -35,7 +32,6 @@ import org.jclouds.rds.options.ListSubnetGroupsOptions; * @see SubnetGroupAsyncApi * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface SubnetGroupApi { /** diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApi.java index e5052f2c35..6de8a1171e 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApi.java @@ -19,10 +19,7 @@ package org.jclouds.savvis.vpdc; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.compute.domain.CIMOperatingSystem; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.savvis.vpdc.domain.Resource; import org.jclouds.savvis.vpdc.features.BrowsingApi; @@ -38,7 +35,6 @@ import org.jclouds.savvis.vpdc.features.VMApi; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VPDCApi { /** diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java index cb67b314ee..9ab015722b 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/VPDCApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.savvis.vpdc; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.savvis.vpdc.reference.VPDCConstants.PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED; import java.net.URI; @@ -59,6 +61,8 @@ public class VPDCApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(5) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "LoginApi.login", MINUTES.toMillis(3) + ""); properties.setProperty(PROPERTY_VPDC_TIMEOUT_TASK_COMPLETED, 600l * 1000l + ""); return properties; } diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/BrowsingApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/BrowsingApi.java index 7872563c80..2963ddb9a4 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/BrowsingApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/BrowsingApi.java @@ -19,11 +19,8 @@ package org.jclouds.savvis.vpdc.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - import org.jclouds.javax.annotation.Nullable; -import org.jclouds.concurrent.Timeout; import org.jclouds.savvis.vpdc.domain.FirewallService; import org.jclouds.savvis.vpdc.domain.Network; import org.jclouds.savvis.vpdc.domain.Org; @@ -39,7 +36,6 @@ import org.jclouds.savvis.vpdc.options.GetVMOptions; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface BrowsingApi { /** * Get an organization, which can contain list of vDC entities diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallApi.java index 47326995ab..fc1934dba4 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/FirewallApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.savvis.vpdc.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.savvis.vpdc.domain.FirewallRule; import org.jclouds.savvis.vpdc.domain.Task; @@ -31,7 +28,6 @@ import org.jclouds.savvis.vpdc.domain.Task; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface FirewallApi { /** diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/ServiceManagementApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/ServiceManagementApi.java index cf3203f1f5..51a0824320 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/ServiceManagementApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/ServiceManagementApi.java @@ -19,9 +19,6 @@ package org.jclouds.savvis.vpdc.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.savvis.vpdc.domain.Task; /** @@ -31,7 +28,6 @@ import org.jclouds.savvis.vpdc.domain.Task; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface ServiceManagementApi { /** * Powers on the VM diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/VMApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/VMApi.java index f19b44b9fd..5aa05f6868 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/VMApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/features/VMApi.java @@ -20,9 +20,6 @@ package org.jclouds.savvis.vpdc.features; import java.net.URI; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.savvis.vpdc.domain.Task; import org.jclouds.savvis.vpdc.domain.VMSpec; @@ -33,7 +30,6 @@ import org.jclouds.savvis.vpdc.domain.VMSpec; * @see * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface VMApi { /** diff --git a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/internal/LoginApi.java b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/internal/LoginApi.java index cb143eca53..d8210cad6c 100644 --- a/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/internal/LoginApi.java +++ b/labs/savvis-symphonyvpdc/src/main/java/org/jclouds/savvis/vpdc/internal/LoginApi.java @@ -18,15 +18,11 @@ */ package org.jclouds.savvis.vpdc.internal; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.savvis.vpdc.domain.internal.VCloudSession; /** * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface LoginApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java index d0a256fa62..943fd7fa91 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorApiMetadata.java @@ -18,7 +18,9 @@ */ package org.jclouds.vcloud.director.v1_5; +import static java.util.concurrent.TimeUnit.MINUTES; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.PROPERTY_VCLOUD_DIRECTOR_TIMEOUT_TASK_COMPLETED; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.PROPERTY_VCLOUD_DIRECTOR_VERSION_SCHEMA; import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.PROPERTY_VCLOUD_DIRECTOR_XML_NAMESPACE; @@ -59,6 +61,7 @@ public class VCloudDirectorApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(3) + ""); /** FIXME this should not be the default */ properties.setProperty(PROPERTY_SESSION_INTERVAL, Integer.toString(30 * 60)); diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/admin/VCloudDirectorAdminApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/admin/VCloudDirectorAdminApi.java index c24d60493d..2cdf72e6f9 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/admin/VCloudDirectorAdminApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/admin/VCloudDirectorAdminApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.vcloud.director.v1_5.admin; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.vcloud.director.v1_5.features.admin.AdminCatalogApi; import org.jclouds.vcloud.director.v1_5.features.admin.AdminNetworkApi; @@ -37,7 +34,6 @@ import org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi; * @see VCloudDirectorAsyncApi * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VCloudDirectorAdminApi extends VCloudDirectorApi { /** * @return asynchronous access to admin query features diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java index 8c343cb1a2..1e67214c7b 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/CatalogApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.Catalog; @@ -35,7 +32,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.CatalogURNToHref; * @see CatalogAsyncApi * @author grkvlt@apache.org, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface CatalogApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java index 9b336b2fb4..72b0aa7bb5 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MediaApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.Media; @@ -36,7 +33,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.MediaURNToHref; * @see MediaAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface MediaApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java index fd9bb4293f..4e9917fe03 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/MetadataApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.Metadata; import org.jclouds.vcloud.director.v1_5.domain.Task; @@ -33,7 +30,6 @@ import org.jclouds.vcloud.director.v1_5.domain.Task; */ public interface MetadataApi { - @Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public static interface Readable extends MetadataApi { /** * Retrieves an list of metadata @@ -50,7 +46,6 @@ public interface MetadataApi { String get(String key); } - @Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public static interface Writeable extends Readable { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java index df3202bdfe..cd09d64e08 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/NetworkApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.network.Network; @@ -33,7 +30,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.NetworkURNToHref; * @see NetworkAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface NetworkApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java index 4ebd8a2a60..5f67718ee0 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/OrgApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.org.Org; @@ -34,7 +31,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.OrgURNToHref; * @see OrgAsyncApi * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface OrgApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java index 6a05bfefe2..4b25dd5d1c 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/QueryApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.vcloud.director.v1_5.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.query.CatalogReferences; import org.jclouds.vcloud.director.v1_5.domain.query.QueryList; import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords; @@ -32,7 +29,6 @@ import org.jclouds.vcloud.director.v1_5.domain.query.VAppReferences; * @see QueryAsyncApi * @author grkvlt@apache.org */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface QueryApi { // TODO Add a typed object for filter syntax, or at least a fluent builder diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java index d01fe16754..d06347927f 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/TaskApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.Task; import org.jclouds.vcloud.director.v1_5.domain.TasksList; @@ -31,7 +28,6 @@ import org.jclouds.vcloud.director.v1_5.domain.TasksList; * @see TaskAsyncApi * @author grkvlt@apache.org, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface TaskApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/UploadApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/UploadApi.java index 2af32c46ee..caabe9bc35 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/UploadApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/UploadApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.io.Payload; /** @@ -30,7 +27,6 @@ import org.jclouds.io.Payload; * @see UploadAsyncApi * @author danikov */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface UploadApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java index 6642744883..f5f7f317e0 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.dmtf.ovf.NetworkSection; import org.jclouds.dmtf.ovf.StartupSection; import org.jclouds.rest.annotations.Delegate; @@ -45,7 +42,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.VAppURNToHref; * @see VAppAsyncApi * @version 1.5 */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VAppApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateApi.java index 6019f2b707..71d4878bbc 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.dmtf.ovf.NetworkSection; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; @@ -42,7 +39,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.VAppTemplateURNToHref; * @author Adam Lowe, Adrian Cole * @see VAppTemplateAsyncApi */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VAppTemplateApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcApi.java index cce7a0ab72..8b434047e6 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VdcApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.Media; @@ -43,7 +40,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.VdcURNToHref; * @see VdcAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VdcApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java index be48af22ef..299fdcb18f 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList; @@ -50,7 +47,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.VmURNToHref; * @see VmAsyncApi * @version 1.5 */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface VmApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java index b672b8e80d..cb269e7571 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog; @@ -38,7 +35,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.CatalogURNToAdminHref; * @see AdminCatalogAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminCatalogApi extends CatalogApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java index 4b9a4ebc99..7f73a5f620 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.Task; @@ -37,7 +34,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.NetworkURNToAdminHref; * @see AdminNetworkAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminNetworkApi extends NetworkApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java index bef5a01145..84d7abe003 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.org.AdminOrg; @@ -42,7 +39,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.OrgURNToAdminHref; * @see AdminOrgAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminOrgApi extends OrgApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java index 19d59280c3..e6be0b1265 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.vcloud.director.v1_5.features.admin; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.RoleReferences; import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords; import org.jclouds.vcloud.director.v1_5.features.QueryApi; @@ -31,7 +28,6 @@ import org.jclouds.vcloud.director.v1_5.features.QueryApi; * @see AdminQueryAsyncApi * @author Aled Sage */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminQueryApi extends QueryApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryAsyncApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryAsyncApi.java index c333c1d0f8..3c15504d86 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryAsyncApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryAsyncApi.java @@ -18,14 +18,11 @@ */ package org.jclouds.vcloud.director.v1_5.features.admin; -import java.util.concurrent.TimeUnit; - import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.JAXBResponseParser; import org.jclouds.rest.annotations.QueryParams; import org.jclouds.rest.annotations.RequestFilters; @@ -43,7 +40,6 @@ import com.google.common.util.concurrent.ListenableFuture; * @author Aled Sage */ @RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class) -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminQueryAsyncApi extends QueryAsyncApi { @GET diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java index 08440093a5..3cb3d3e207 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.rest.annotations.EndpointParam; import org.jclouds.vcloud.director.v1_5.domain.AdminVdc; @@ -36,7 +33,6 @@ import org.jclouds.vcloud.director.v1_5.functions.href.VdcURNToAdminHref; * @see AdminVdcAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AdminVdcApi extends VdcApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java index bb2a6a17f5..6da9f2cd3b 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.Group; /** @@ -30,7 +27,6 @@ import org.jclouds.vcloud.director.v1_5.domain.Group; * @see GroupAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface GroupApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java index 36b24521d4..8ce9b37068 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.features.admin; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.User; /** @@ -30,7 +27,6 @@ import org.jclouds.vcloud.director.v1_5.domain.User; * @see UserAsyncApi * @author danikov, Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface UserApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java index 40e547319b..adf3fa41ce 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java @@ -19,9 +19,6 @@ package org.jclouds.vcloud.director.v1_5.login; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.vcloud.director.v1_5.domain.Session; import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken; @@ -32,7 +29,6 @@ import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken; * @see SessionAsyncApi * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface SessionApi { /** diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorApi.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorApi.java index cdbe8995cc..23ba38e5b5 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorApi.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/user/VCloudDirectorApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.vcloud.director.v1_5.user; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.vcloud.director.v1_5.domain.Entity; import org.jclouds.vcloud.director.v1_5.domain.Session; @@ -44,7 +41,6 @@ import com.google.inject.Provides; * @see VCloudDirectorAsyncApi * @author danikov */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface VCloudDirectorApi { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java index a2451cb0c7..b20540a1ea 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.aws.ec2; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.aws.ec2.reference.AWSEC2Constants.PROPERTY_EC2_GENERATE_INSTANCE_NAMES; import static org.jclouds.ec2.reference.EC2Constants.PROPERTY_EC2_AMI_OWNERS; @@ -64,6 +67,9 @@ public class AWSEC2ApiMetadata extends EC2ApiMetadata { public static Properties defaultProperties() { Properties properties = EC2ApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(90) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "SpotInstanceClient.describeSpotPriceHistoryInRegion", MINUTES.toMillis(2) + ""); + properties.remove(PROPERTY_EC2_AMI_OWNERS); // auth fail sometimes happens in EC2, as the rc.local script that injects the // authorized key executes after ssh has started. diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2Client.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2Client.java index d4e1c984a1..37e8c58448 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2Client.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2Client.java @@ -18,8 +18,6 @@ */ package org.jclouds.aws.ec2; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.services.AWSAMIClient; import org.jclouds.aws.ec2.services.AWSInstanceClient; import org.jclouds.aws.ec2.services.AWSKeyPairClient; @@ -28,7 +26,6 @@ import org.jclouds.aws.ec2.services.MonitoringClient; import org.jclouds.aws.ec2.services.PlacementGroupClient; import org.jclouds.aws.ec2.services.SpotInstanceClient; import org.jclouds.aws.ec2.services.TagClient; -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.EC2Client; import org.jclouds.rest.annotations.Delegate; @@ -37,7 +34,6 @@ import org.jclouds.rest.annotations.Delegate; * * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface AWSEC2Client extends EC2Client { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSAMIClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSAMIClient.java index cd23fe7dad..9b39576103 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSAMIClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSAMIClient.java @@ -19,9 +19,6 @@ package org.jclouds.aws.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.services.AMIClient; import org.jclouds.javax.annotation.Nullable; @@ -31,8 +28,7 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) -public interface AWSAMIClient extends AMIClient{ +public interface AWSAMIClient extends AMIClient { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSInstanceClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSInstanceClient.java index a50133079a..d40e4c06e1 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSInstanceClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSInstanceClient.java @@ -19,10 +19,7 @@ package org.jclouds.aws.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.domain.AWSRunningInstance; -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.Reservation; import org.jclouds.ec2.options.RunInstancesOptions; import org.jclouds.ec2.services.InstanceClient; @@ -34,7 +31,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AWSInstanceClient extends InstanceClient { @Override diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSKeyPairClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSKeyPairClient.java index 44b7ba5564..6277c64593 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSKeyPairClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSKeyPairClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.aws.ec2.services; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.KeyPair; import org.jclouds.ec2.services.KeyPairClient; import org.jclouds.javax.annotation.Nullable; @@ -29,7 +26,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AWSKeyPairClient extends KeyPairClient { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSSecurityGroupClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSSecurityGroupClient.java index 8c8d4d9aa6..568aa00abc 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSSecurityGroupClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/AWSSecurityGroupClient.java @@ -19,10 +19,7 @@ package org.jclouds.aws.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.options.CreateSecurityGroupOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.ec2.domain.IpPermission; import org.jclouds.ec2.domain.SecurityGroup; import org.jclouds.ec2.services.SecurityGroupClient; @@ -37,7 +34,6 @@ import com.google.common.annotations.Beta; * @author Adrian Cole */ @Beta -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AWSSecurityGroupClient extends SecurityGroupClient { String createSecurityGroupInRegionAndReturnId(@Nullable String region, String name, String desc, diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java index b4efbd3043..9a1c8766be 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/MonitoringClient.java @@ -19,10 +19,7 @@ package org.jclouds.aws.ec2.services; import java.util.Map; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.domain.MonitoringState; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; /** @@ -32,7 +29,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface MonitoringClient { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java index e865f6275e..6f9383964c 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/PlacementGroupClient.java @@ -19,10 +19,7 @@ package org.jclouds.aws.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.domain.PlacementGroup; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; /** @@ -32,7 +29,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface PlacementGroupClient { /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/SpotInstanceClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/SpotInstanceClient.java index 89450950b6..05103ebf04 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/SpotInstanceClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/SpotInstanceClient.java @@ -19,14 +19,11 @@ package org.jclouds.aws.ec2.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.domain.LaunchSpecification; import org.jclouds.aws.ec2.domain.Spot; import org.jclouds.aws.ec2.domain.SpotInstanceRequest; import org.jclouds.aws.ec2.options.DescribeSpotPriceHistoryOptions; import org.jclouds.aws.ec2.options.RequestSpotInstancesOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; /** @@ -36,7 +33,6 @@ import org.jclouds.javax.annotation.Nullable; * * @author Adrian Cole */ -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface SpotInstanceClient { /** * Describes Spot Instance requests. Spot Instances are instances that Amazon EC2 starts on your @@ -129,7 +125,6 @@ public interface SpotInstanceClient { * /> * @return TODO */ - @Timeout(duration = 2, timeUnit = TimeUnit.MINUTES) Set describeSpotPriceHistoryInRegion(@Nullable String region, DescribeSpotPriceHistoryOptions... options); /** diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/TagClient.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/TagClient.java index b0430171b8..83dc99047c 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/TagClient.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/services/TagClient.java @@ -20,11 +20,8 @@ package org.jclouds.aws.ec2.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.ec2.domain.Tag; import org.jclouds.aws.ec2.util.TagFilters.FilterName; -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; /** @@ -39,7 +36,6 @@ import org.jclouds.javax.annotation.Nullable; * @see TagApi */ @Deprecated -@Timeout(duration = 45, timeUnit = TimeUnit.SECONDS) public interface TagClient { /** * Creates tags. diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java index 595ba7469d..c84aede3c9 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.aws.s3; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.util.Properties; import org.jclouds.apis.ApiMetadata; @@ -60,6 +63,8 @@ public class AWSS3ApiMetadata extends S3ApiMetadata { public static Properties defaultProperties() { Properties properties = S3ApiMetadata.defaultProperties(); + // 128KB/s for max size of 5GB + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AWSS3Client.uploadPart", SECONDS.toMillis(5242880 / 128) + ""); return properties; } diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3Client.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3Client.java index b561a1a5a2..4072a2ed50 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3Client.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3Client.java @@ -20,10 +20,7 @@ package org.jclouds.aws.s3; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - import org.jclouds.aws.s3.domain.DeleteResult; -import org.jclouds.concurrent.Timeout; import org.jclouds.io.Payload; import org.jclouds.s3.S3Client; import org.jclouds.s3.domain.ObjectMetadata; @@ -35,7 +32,6 @@ import org.jclouds.s3.options.PutObjectOptions; * @author Adrian Cole * @see AWSS3AsyncClient */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AWSS3Client extends S3Client { /** @@ -109,7 +105,6 @@ public interface AWSS3Client extends S3Client { * @see */ - @Timeout(duration = 5 * 1024 * 1024 / 128, timeUnit = TimeUnit.SECONDS) String uploadPart(String bucketName, String key, int partNumber, String uploadId, Payload part); /** diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java index a33d699597..cf8f7d9d1a 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java @@ -18,6 +18,8 @@ */ package org.jclouds.azureblob; +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX; import java.net.URI; @@ -63,6 +65,10 @@ public class AzureBlobApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", MINUTES.toMillis(2) + ""); + // 10 minutes per MB * max size of 64M + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AzureBlobClient.putBlob", MINUTES.toMillis(10 * 64) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "AzureBlobClient.getBlob", MINUTES.toMillis(10 * 64) + ""); properties.setProperty(PROPERTY_USER_METADATA_PREFIX, "x-ms-meta-"); return properties; } diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java index b2f4bfe323..7755a2db7a 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java @@ -19,17 +19,15 @@ package org.jclouds.azureblob; import java.util.Map; -import java.util.concurrent.TimeUnit; - import org.jclouds.azure.storage.domain.BoundedSet; import org.jclouds.azure.storage.options.ListOptions; +import org.jclouds.azureblob.domain.AzureBlob; import org.jclouds.azureblob.domain.BlobProperties; import org.jclouds.azureblob.domain.ContainerProperties; import org.jclouds.azureblob.domain.ListBlobsResponse; import org.jclouds.azureblob.domain.PublicAccess; import org.jclouds.azureblob.options.CreateContainerOptions; import org.jclouds.azureblob.options.ListBlobsOptions; -import org.jclouds.concurrent.Timeout; import org.jclouds.http.options.GetOptions; import com.google.inject.Provides; @@ -43,10 +41,9 @@ import com.google.inject.Provides; * @see * @author Adrian Cole */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AzureBlobClient { @Provides - public org.jclouds.azureblob.domain.AzureBlob newBlob(); + public AzureBlob newBlob(); /** * The List Containers operation returns a list of the containers under the specified identity. @@ -185,10 +182,8 @@ public interface AzureBlobClient { *

    * Blobs are listed in alphabetical order in the response body. */ - @Timeout(duration = 2, timeUnit = TimeUnit.MINUTES) ListBlobsResponse listBlobs(String container, ListBlobsOptions... options); - @Timeout(duration = 2, timeUnit = TimeUnit.MINUTES) ListBlobsResponse listBlobs(ListBlobsOptions... options); /** @@ -205,19 +200,14 @@ public interface AzureBlobClient { * If you attempt to upload a blob that is larger than 64 MB, the service returns status code 413 * (Request Payload Too Large). The Blob service also returns additional information about the * error in the response, including the maximum blob size permitted in bytes. - *

    - * A Put Blob operation is permitted 10 minutes per MB to complete. If the operation is taking - * longer than 10 minutes per MB on average, the operation will timeout. */ - @Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES) - String putBlob(String container, org.jclouds.azureblob.domain.AzureBlob object); + String putBlob(String container, AzureBlob object); /** * The Get Blob operation reads or downloads a blob from the system, including its metadata and * properties. */ - @Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES) - org.jclouds.azureblob.domain.AzureBlob getBlob(String container, String name, GetOptions... options); + AzureBlob getBlob(String container, String name, GetOptions... options); /** * The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApi.java index cdc7f499c3..56379df996 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.glesys; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.features.ArchiveApi; import org.jclouds.glesys.features.DomainApi; import org.jclouds.glesys.features.EmailAccountApi; @@ -36,7 +33,6 @@ import org.jclouds.rest.annotations.Delegate; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface GleSYSApi { /** diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java b/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java index ed637ac1b6..a6943bdd96 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/GleSYSApiMetadata.java @@ -18,6 +18,10 @@ */ package org.jclouds.glesys; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -57,6 +61,9 @@ public class GleSYSApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(30) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ServerApi.createWithHostnameAndRootPassword", MINUTES.toMillis(3) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ServerApi.clone", MINUTES.toMillis(3) + ""); properties.setProperty("jclouds.ssh.max-retries", "5"); properties.setProperty("jclouds.ssh.retry-auth", "true"); return properties; diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/features/ArchiveApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/features/ArchiveApi.java index d50417fbad..b0c26ecee6 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/features/ArchiveApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/features/ArchiveApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.glesys.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.domain.Archive; import org.jclouds.glesys.domain.ArchiveAllowedArguments; @@ -34,7 +31,6 @@ import com.google.common.collect.FluentIterable; * @see ArchiveAsyncApi * @see */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface ArchiveApi { /** diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/features/DomainApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/features/DomainApi.java index 2b393a0e9c..bed93bccca 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/features/DomainApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/features/DomainApi.java @@ -19,9 +19,6 @@ package org.jclouds.glesys.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.domain.Domain; import org.jclouds.glesys.domain.DomainRecord; import org.jclouds.glesys.options.AddDomainOptions; @@ -39,7 +36,6 @@ import com.google.common.collect.FluentIterable; * @see DomainAsyncApi * @see */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface DomainApi { /** diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/features/EmailAccountApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/features/EmailAccountApi.java index e00725c4e1..84e32f6e7f 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/features/EmailAccountApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/features/EmailAccountApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.glesys.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.domain.EmailAccount; import org.jclouds.glesys.domain.EmailAlias; import org.jclouds.glesys.domain.EmailOverview; @@ -37,7 +34,6 @@ import com.google.common.collect.FluentIterable; * @see org.jclouds.glesys.features.EmailAccountAsyncApi * @see */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface EmailAccountApi { /** diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/features/IpApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/features/IpApi.java index 571be6b108..207b02ed7c 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/features/IpApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/features/IpApi.java @@ -18,9 +18,6 @@ */ package org.jclouds.glesys.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.domain.IpDetails; import org.jclouds.glesys.options.ListIpOptions; @@ -34,7 +31,6 @@ import com.google.common.collect.FluentIterable; * @see IpAsyncApi * @see */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface IpApi { /** * Get a set of all IP addresses that are available and not used on any account or server. diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/features/ServerApi.java b/providers/glesys/src/main/java/org/jclouds/glesys/features/ServerApi.java index da32f36beb..7815a5dea4 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/features/ServerApi.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/features/ServerApi.java @@ -19,9 +19,6 @@ package org.jclouds.glesys.features; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.glesys.domain.AllowedArgumentsForCreateServer; import org.jclouds.glesys.domain.Console; import org.jclouds.glesys.domain.OSTemplate; @@ -49,7 +46,6 @@ import com.google.common.collect.FluentIterable; * @see ServerAsyncApi * @see */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface ServerApi { /** @@ -153,7 +149,6 @@ public interface ServerApi { * @param rootPassword the root password to use * @param options optional settings ex. description */ - @Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) ServerDetails createWithHostnameAndRootPassword(ServerSpec serverSpec, String hostname, String rootPassword, CreateServerOptions... options); @@ -172,7 +167,6 @@ public interface ServerApi { * @param hostname the new host name of the cloned server * @param options the settings to change */ - @Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) ServerDetails clone(String serverid, String hostname, CloneServerOptions... options); /** diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java index 26b9169464..52f0b72bf2 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridApiMetadata.java @@ -18,6 +18,9 @@ */ package org.jclouds.gogrid; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -57,6 +60,7 @@ public class GoGridApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(90) + ""); properties.setProperty("jclouds.ssh.max-retries", "5"); properties.setProperty("jclouds.ssh.retry-auth", "true"); return properties; diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridClient.java index 0d59f60ff1..4002061396 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.gogrid; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.gogrid.services.GridImageClient; import org.jclouds.gogrid.services.GridIpClient; import org.jclouds.gogrid.services.GridJobClient; @@ -31,7 +28,6 @@ import org.jclouds.rest.annotations.Delegate; /** * @author Oleksiy Yarmula */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface GoGridClient { /** diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridImageClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridImageClient.java index df690ec960..97552dc26a 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridImageClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridImageClient.java @@ -19,9 +19,6 @@ package org.jclouds.gogrid.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.gogrid.domain.Option; import org.jclouds.gogrid.domain.ServerImage; import org.jclouds.gogrid.options.GetImageListOptions; @@ -34,7 +31,6 @@ import org.jclouds.gogrid.options.SaveImageOptions; * href="http://wiki.gogrid.com/wiki/index.php/API#Server_Image_Methods"/> * @author Oleksiy Yarmula */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface GridImageClient { /** * Deletes an existing image diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridIpClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridIpClient.java index 8aa2a43442..b5f0c2953d 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridIpClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridIpClient.java @@ -19,9 +19,6 @@ package org.jclouds.gogrid.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.gogrid.domain.Ip; import org.jclouds.gogrid.domain.Option; import org.jclouds.gogrid.options.GetIpListOptions; @@ -29,7 +26,6 @@ import org.jclouds.gogrid.options.GetIpListOptions; /** * @author Oleksiy Yarmula */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface GridIpClient { /** diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridJobClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridJobClient.java index 90d0c18fa9..8674e70735 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridJobClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridJobClient.java @@ -19,9 +19,6 @@ package org.jclouds.gogrid.services; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.gogrid.domain.Job; import org.jclouds.gogrid.options.GetJobListOptions; @@ -32,7 +29,6 @@ import org.jclouds.gogrid.options.GetJobListOptions; * * @author Oleksiy Yarmula */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface GridJobClient { /** @@ -45,7 +41,6 @@ public interface GridJobClient { * * @return jobs found by request */ - @Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) Set getJobList(GetJobListOptions... options); /** diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridLoadBalancerClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridLoadBalancerClient.java index 28537b6599..f13e2ed85d 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridLoadBalancerClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridLoadBalancerClient.java @@ -20,9 +20,6 @@ package org.jclouds.gogrid.services; import java.util.List; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.gogrid.domain.IpPortPair; import org.jclouds.gogrid.domain.LoadBalancer; import org.jclouds.gogrid.domain.Option; @@ -31,7 +28,6 @@ import org.jclouds.gogrid.options.AddLoadBalancerOptions; /** * @author Oleksiy Yarmula */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface GridLoadBalancerClient { /** diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridServerClient.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridServerClient.java index e9292eac18..7845c16573 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridServerClient.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/services/GridServerClient.java @@ -20,9 +20,6 @@ package org.jclouds.gogrid.services; import java.util.Map; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.domain.Credentials; import org.jclouds.gogrid.domain.Option; import org.jclouds.gogrid.domain.PowerCommand; @@ -40,7 +37,6 @@ import org.jclouds.gogrid.options.GetServerListOptions; * @author Adrian Cole * @author Oleksiy Yarmula */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface GridServerClient { /** diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApi.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApi.java index 7756e66f1a..eee1afd5bc 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApi.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApi.java @@ -19,9 +19,6 @@ package org.jclouds.hpcloud.objectstorage; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.hpcloud.objectstorage.extensions.CDNContainerApi; import org.jclouds.location.Region; import org.jclouds.openstack.swift.CommonSwiftClient; @@ -43,7 +40,6 @@ import com.google.inject.Provides; * Storage API * @author Jeremy Daggett */ -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface HPCloudObjectStorageApi extends CommonSwiftClient { /** * diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/CDNContainerApi.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/CDNContainerApi.java index 0fca60f112..ff7d6f5d25 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/CDNContainerApi.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/extensions/CDNContainerApi.java @@ -19,9 +19,6 @@ package org.jclouds.hpcloud.objectstorage.extensions; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.hpcloud.objectstorage.domain.CDNContainer; import org.jclouds.hpcloud.objectstorage.options.ListCDNContainerOptions; @@ -42,7 +39,6 @@ import com.google.common.collect.FluentIterable; * @author Jeremy Daggett */ @Beta -@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS) public interface CDNContainerApi { FluentIterable list(); diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java index 3a500c0d47..c2b1aa249d 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApiMetadata.java @@ -18,6 +18,10 @@ */ package org.jclouds.softlayer; +import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.jclouds.Constants.PROPERTY_TIMEOUTS_PREFIX; + import java.net.URI; import java.util.Properties; @@ -57,6 +61,8 @@ public class SoftLayerApiMetadata extends BaseRestApiMetadata { public static Properties defaultProperties() { Properties properties = BaseRestApiMetadata.defaultProperties(); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "default", SECONDS.toMillis(90) + ""); + properties.setProperty(PROPERTY_TIMEOUTS_PREFIX + "ProductPackageClient", MINUTES.toMillis(3) + ""); properties.setProperty("jclouds.ssh.max-retries", "5"); properties.setProperty("jclouds.ssh.retry-auth", "true"); return properties; diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerClient.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerClient.java index 1656ff1c8e..b7cc842267 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerClient.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.softlayer; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.rest.annotations.Delegate; import org.jclouds.softlayer.features.AccountClient; import org.jclouds.softlayer.features.DatacenterClient; @@ -35,7 +32,6 @@ import org.jclouds.softlayer.features.VirtualGuestClient; * @see * @author Adrian Cole */ -@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) public interface SoftLayerClient { /** diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountClient.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountClient.java index 8933ca0dec..2448d59869 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountClient.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountClient.java @@ -19,9 +19,6 @@ package org.jclouds.softlayer.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.softlayer.domain.ProductPackage; /** @@ -32,7 +29,6 @@ import org.jclouds.softlayer.domain.ProductPackage; * @see * @author Jason King */ -@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS) public interface AccountClient { /** diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/DatacenterClient.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/DatacenterClient.java index bd71990a7b..72a0381a2d 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/DatacenterClient.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/DatacenterClient.java @@ -19,9 +19,6 @@ package org.jclouds.softlayer.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.softlayer.domain.Datacenter; /** @@ -32,7 +29,6 @@ import org.jclouds.softlayer.domain.Datacenter; * @see * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface DatacenterClient { /** diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/ProductPackageClient.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/ProductPackageClient.java index 40c93e7802..86cf8b09f3 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/ProductPackageClient.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/ProductPackageClient.java @@ -18,9 +18,6 @@ */ package org.jclouds.softlayer.features; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.softlayer.domain.ProductPackage; /** @@ -31,7 +28,6 @@ import org.jclouds.softlayer.domain.ProductPackage; * @see * @author Adrian Cole */ -@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS) public interface ProductPackageClient { /** diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestClient.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestClient.java index bbd5e40f08..34ab604d53 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestClient.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestClient.java @@ -19,9 +19,6 @@ package org.jclouds.softlayer.features; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.softlayer.domain.ProductOrder; import org.jclouds.softlayer.domain.ProductOrderReceipt; import org.jclouds.softlayer.domain.VirtualGuest; @@ -34,7 +31,6 @@ import org.jclouds.softlayer.domain.VirtualGuest; * @see * @author Adrian Cole */ -@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS) public interface VirtualGuestClient { /** diff --git a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/TerremarkECloudClient.java b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/TerremarkECloudClient.java index 91dbb63f08..7bacfc355b 100644 --- a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/TerremarkECloudClient.java +++ b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/TerremarkECloudClient.java @@ -20,9 +20,6 @@ package org.jclouds.trmk.ecloud; import java.net.URI; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.javax.annotation.Nullable; import org.jclouds.rest.annotations.Delegate; import org.jclouds.trmk.ecloud.domain.ECloudOrg; @@ -44,7 +41,6 @@ import org.jclouds.trmk.vcloud_0_8.domain.VAppExtendedInfo; * /> * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface TerremarkECloudClient extends TerremarkVCloudClient { /** * Provides synchronous access to Data Center Operations. diff --git a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/DataCenterOperationsClient.java b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/DataCenterOperationsClient.java index cbeae0be60..4859f17822 100644 --- a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/DataCenterOperationsClient.java +++ b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/DataCenterOperationsClient.java @@ -20,9 +20,6 @@ package org.jclouds.trmk.ecloud.features; import java.net.URI; import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.trmk.vcloud_0_8.domain.DataCenter; /** @@ -36,7 +33,6 @@ import org.jclouds.trmk.vcloud_0_8.domain.DataCenter; * @see DataCenterOperationsAsyncClient * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface DataCenterOperationsClient { /** diff --git a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/TagOperationsClient.java b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/TagOperationsClient.java index d52bb2119d..1c7a87e343 100644 --- a/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/TagOperationsClient.java +++ b/providers/trmk-ecloud/src/main/java/org/jclouds/trmk/ecloud/features/TagOperationsClient.java @@ -20,10 +20,6 @@ package org.jclouds.trmk.ecloud.features; import java.net.URI; import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; - /** * Tag Based Operations *

    @@ -31,7 +27,6 @@ import org.jclouds.concurrent.Timeout; * @see TagOperationsAsyncClient * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface TagOperationsClient { /** diff --git a/providers/trmk-vcloudexpress/src/main/java/org/jclouds/trmk/vcloudexpress/TerremarkVCloudExpressClient.java b/providers/trmk-vcloudexpress/src/main/java/org/jclouds/trmk/vcloudexpress/TerremarkVCloudExpressClient.java index dbc69aa99b..8b32525e63 100644 --- a/providers/trmk-vcloudexpress/src/main/java/org/jclouds/trmk/vcloudexpress/TerremarkVCloudExpressClient.java +++ b/providers/trmk-vcloudexpress/src/main/java/org/jclouds/trmk/vcloudexpress/TerremarkVCloudExpressClient.java @@ -19,9 +19,6 @@ package org.jclouds.trmk.vcloudexpress; import java.net.URI; -import java.util.concurrent.TimeUnit; - -import org.jclouds.concurrent.Timeout; import org.jclouds.trmk.vcloud_0_8.TerremarkVCloudClient; import org.jclouds.trmk.vcloud_0_8.domain.InternetService; import org.jclouds.trmk.vcloud_0_8.domain.Protocol; @@ -35,7 +32,6 @@ import org.jclouds.trmk.vcloud_0_8.options.AddInternetServiceOptions; * /> * @author Adrian Cole */ -@Timeout(duration = 300, timeUnit = TimeUnit.SECONDS) public interface TerremarkVCloudExpressClient extends TerremarkVCloudClient { InternetService addInternetServiceToVDC(URI vDCId, String serviceName, Protocol protocol, int port,