> +
> +@Singleton
> +public class ProfitBricksComputeServiceAdapter implements
> ComputeServiceAdapter<Server, Hardware, Image, DataCenter> {
> +
> + @Resource
> + @Named(ComputeServiceConstants.COMPUTE_LOGGER)
> + protected Logger logger = Logger.NULL;
> +
> + private final ProfitBricksApi api;
> + private final Predicate<String> waitDcUntilAvailable;
> +
> + @Inject
> + ProfitBricksComputeServiceAdapter(ProfitBricksApi api) {
> + this.api = api;
> + this.waitDcUntilAvailable = Predicates2.retry(new
> ProvisioningStatusPollingPredicate(
> + api, ProvisioningStatusAware.DATACENTER,
> ProvisioningState.AVAILABLE), 10l * 60l, 2l, TimeUnit.SECONDS);
Consider making the predicate injectable. That would facilitate making the
timeouts configurable so users can customise them. Take a look at
[Azure](https://github.com/jclouds/jclouds-labs/blob/master/azurecompute/src/main/java/org/jclouds/azurecompute/compute/config/AzureComputeServiceContextModule.java#L95-L101)
to see an example.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/145/files#r25732194