Added retrying logic from guava-retryer