Please confirm my understanding of RemoteBucketBuilder.build(K, Supplier) #492
-
Hello, I used to create bucket proxies backed by Redis as follows: var bucketProxy = proxyManager.builder().build(name, config); While upgrading our dependencies, I noticed
Its javadoc states:
Also, from the javadoc of
Does it mean that, if for some reason I need to update the configured limits (e.g. from 5 operations by second to 10), it will only be applied once the existing 5-operation bucket has been refilled (plus that custom duration), because in this case, the bucket will be deleted from the cache, so the config Supplier will need to be called again? Perhaps this behaviour was still there before but has been made more obvious with this Supplier-based method. Thank you 🙌 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @sp00m Current javadoc for config is little bit inncorect. It should be changed like this: The words above have following outcome according to configuration replacement: if you plan to use configuration replacement then your config supplier should return as fresh configuration as it possible, otherwise there is risk to lose the config change when bucket with changed configuration bacomes expired and then becomes ressurected with legacy config, becuse config suppliers returns legacy config. |
Beta Was this translation helpful? Give feedback.
Hello @sp00m
Current javadoc for config is little bit inncorect. It should be changed like this:
[The Supplier] will be called if and only if it detected that bucket is not persisted by any reason like was never persisted before, persisted but then expired, persisted but then explicitly removed, or persisted but lost because of any storage problem.
The words above have following outcome according to configuration replacement: if you plan to use configuration replacement then your config supplier should return as fresh configuration as it possible, otherwise there is risk to lose the config change when bucket with changed configuration bacomes expired and then becomes ressurected with lega…