replaceConfiguration

fun replaceConfiguration(newConfiguration: BucketConfiguration, tokensInheritanceStrategy: TokensInheritanceStrategy)(source)

Replaces the bucket's configuration. This delegates directly to the underlying LockFreeBucket's replaceConfiguration implementation.

The inheritance strategy is complex enough that I'm not going to summarize the algorithm here, see Bucket4j's documentation for more information.

Parameters

newConfiguration

The new BucketConfiguration to use.

tokensInheritanceStrategy

Configuration for the strategy to use for token inheritance.