> + */
> + private Instance getInstance() {
> + for (Instance instance: instanceApi.list()) {
> + if (instance.getName().startsWith(Constants.NAME)) {
> + return instance;
> + }
> + }
> +
> + throw new RuntimeException(Constants.NAME + " not found. Run the
> CreateInstance example first.");
> + }
> +
> + private void createDatabase(Instance instance) throws TimeoutException {
> + System.out.println("Create Database");
> +
> + boolean result = databaseApi.create(Constants.NAME);
> + System.out.println(" " + result);
> Create takes a while, but we want the current ongoing operation to be
> displayed first
Ah, OK. Thanks for explaining.
```
System.out.print("Creating Database...");
boolean result = databaseApi.create(Constants.NAME);
System.out.println(result);
```
?
But that's really just a personal preference for signalling an ongoing
operation...fine to leave as is if you prefer.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/6/files#r4640384