Generalization of `.getNanosToWaitForReset()`
See original GitHub issueHi, really good library, thanks a lot for your work!
I had to use the 7.0.0-beta-2020-04-18
release only because the ConsumptionProbe
has this method. I am using Caffeine as a local cache for buckets and need this information to compute accurate TTLs on buckets every time tokens are consumed. By getting this full refill interval, a bucket can be safely marked as stale after this point in time: we know it will be full, so there is no point keeping it in memory.
Some questions / comments:
- There isn’t any other way getting this information in the stable release, is there? Using the beta is mandatory?
- I need to apply the same logic when adding tokens manually but it is a bit absurd: refill what is needed + force refill 1 token + consume 1 token to get the
ConsumptionProbe
; It would be useful obtaining this information (.getNantosToWaitForReset()
) outside of consumption probes.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Generalization of .getNanosToWaitForReset() #187 - GitHub
I am using Caffeine as a local cache for buckets and need this information to compute accurate TTLs on buckets every time tokens...
Read more >Generalization - OASIS Open
Specialized content can be generalized to any ancestor type. The generalization process can preserve information about the former level of specialization to ...
Read more >Incorrect buffersize description in the CRYPTO_128_unwrap ...
There is an issue with the CRYPTO_128_unwrap() and internally on the ... Generalization of `.getNanosToWaitForReset()`, 7, 2021-11-09, 2022-08-10.
Read more >Same transports are created two times - Ipfs/Go-Ipfs - IssueHint
Coherence 12.2.1.4.7 with Bucket4j 6.2.0 fails with java.io.IOException: Unknown type id 768, 7, 2021-09-24 ; Generalization of `.getNanosToWaitForReset()`, 7 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With version 6.4.0 desired behavior can be achieved in the following way:
Thanks for your prompt action, works perfectly and does the job 😃