Functionality for automatic retry after exception
public static &lt;T&gt; Optional&lt;T&gt; autoRetry(@NonNull final DoWork&lt;T&gt; task, @NonNull final Optional&lt;Predicate&lt;T&gt;&gt; predicate) {


No predicate, please. Call it something like acceptResult or resultRejector... you know what I mean.

Thread.sleep(retry * StaticData.NETWORK_CALL_WAIT);


This doesn't do what you write, as the first time retry=0.


  I take care to not retry after InterruptedException &amp; UnknownHostException.


The latter may be retryable as it may be a temporary network or DNS problem. But it's your choice.

final String regId = autoRetry(new DoWork&lt;String&gt;() {...


I'm too lazy to copy it in my Eclipse and without it, it's unreadable as I have no idea where the expressions ends. What about a private final DoWork&lt;String&gt; regIdDoWork = ... or alike?

Optional.&lt;Predicate&lt;Boolean&gt;&gt;absent()).orNull(); //No need of predicate hence send absent


How nicer would the world be if there was no Optional? :D Just null.

Note that even if you like Optional, you should probably use it for as return types only. This is the place where it may prevent bugs and where it doesn't add so much verbosity.