private LocalBucketBuilder getBucketLimits() {
        val builder = Bucket.builder().withNanosecondPrecision();
        properties.getBandwidth()
            .stream()
            .map(bandwidth -> {
                var limit = switch (bandwidth.getRefillStrategy()) {
                    case INTERVALLY -> Bandwidth.classic(bandwidth.getCapacity(), Refill.intervally(bandwidth.getRefillCount(),
                        Beans.newDuration(bandwidth.getRefillDuration())));
                    case GREEDY -> Bandwidth.simple(bandwidth.getCapacity(), Beans.newDuration(bandwidth.getDuration()))
                        .withInitialTokens(bandwidth.getInitialTokens() <= 0 ? bandwidth.getCapacity() : bandwidth.getInitialTokens());
                };
                limit = limit.withInitialTokens(bandwidth.getInitialTokens() <= 0
                    ? bandwidth.getCapacity() : bandwidth.getInitialTokens());
                return limit;
            })
            .forEach(builder::addLimit);
        return builder;
    }
This is {@link InMemoryBucketStore}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-bucket4j-core/src/main/java/org/apereo/cas/bucket4j/producer/InMemoryBucketStore.java