Hi @nacx . I've seen in your <a 
href="https://github.com/jclouds/jclouds-labs/pull/61#issuecomment-47100656";>comment
 in this PR</a> regards the use of <code>Predicates2.retry</code> helper. How 
is this used exactly? Use case for instance: <i>For max 1 minute, execute a 
method every 2 seconds.</i> (The method will actually poll an API, and must 
return "AVAILABLE", before proceeding.) I can't seem to get it around my head 
yet.
<pre>
      Predicates2.retry(new Predicate<Server>() {
         @Override
         public boolean apply(Server input){
            // call something
            // proceed if true
         }
      }, 60l, 2l, 360l, TimeUnit.SECONDS);
</pre>

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72#issuecomment-55089269

Reply via email to