There are many cases in which you may wish to retry an operation a certain number of times. Examples are database failures, network communication failures or file IO problems. Approach 1 This is the traditional approach and involves a counter and a loop. final int numberOfRetries = 5 ; final long timeToWait = 1000 ; for (int i=0; i
Read full article from fahd.blog: Retrying Operations in Java
No comments:
Post a Comment