'Guava's Rate Limiter-Have TimeGap of Few Seconds between requests Or Restrict the new of requests in a minute

Is there a way where i could use google guava's rate limiter keeping 1 permit per second and acquire second permit only after n seconds.

Or Limiting the requests per minute.

Gone through few old posts but still could find appropriate solution.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source