more-lambdas-java icon indicating copy to clipboard operation
more-lambdas-java copied to clipboard

Some useful collectors implements for Java 8.

Results 7 more-lambdas-java issues
Sort by recently updated
recently updated
newest added

'setRate' & 'setPeriod' only changed non-volatile variable 'allowTimesPerNanos' which might be invisible to other threads. (it didn't pass the newly added tests. Writing volatile 'lastAcquiredNanos' to zero will fix it.

使用 KeyAffinityExecutor.newSerializingExecutor(IntSupplier parallelism, IntSupplier queueBufferSize, String threadName) 返回的对象 没有设置并发参数方法 然后我尝试创建一个 KeyAffinityExecutorBuilder affinityExecutor = KeyAffinityExecutor.newKeyAffinityExecutor(); affinityExecutor.parallelism(this.mqttProperties::getConsumer) .executor(KeyAffinityExecutorUtils.executor("mqtt-async-service-%d", () -> this.mqttProperties.getBlockingQueue())) .usingRandom(it -> it > RANDOM_THRESHOLD) .build(); 可KeyAffinityExecutorUtils.executor方法是defalut 我无法使用 ,

因为只引入你这个maven依赖,运行的时候会有log4j的报错

Bumps [guava](https://github.com/google/guava) from 28.1-jre to 29.0-jre. Release notes Sourced from guava's releases. 29.0 Maven <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>29.0-jre</version> <!-- or, for Android: --> <version>29.0-android</version> </dependency> Javadoc 29.0-jre 29.0-android JDiff 29.0-jre...

dependencies

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.2.3 to 1.2.13. Commits 2648b9e prepare release 1.2.13 bb09515 fix CVE-2023-6378 4573294 start work on 1.2.13-SNAPSHOT a388193 Merge branch 'branch_1.2.x' of github.com:qos-ch/logback into branch_1.2.x de44dc4 prepare release...

dependencies

executeEx里select的逻辑 是mapping.compute。那么维护Map mapping这个有可能因为输入key的增长而一直扩展。 假设线程池执行的任务的key是一个很大的规模,例如用户id,或网络设备的mac地址,这种体量。是否会有oom的风险呢。 而直接用key做哈希计算选择线程,则不需要存储关系。

某个内部线程池并发度为0时会触发重新选择线程 假如存在2个key,一个key对应的线程较为忙碌,并发度较高,另一个key对应的线程较为空闲,可能出现并发度为0的情况,进而random时有概率分配到忙碌的线程中,这样前者越来越忙碌,且更加不会触发线程的重新分配,最终流量出现倾斜