mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-05 10:29:56 +08:00
code cleanup by sonar
This commit is contained in:
@@ -39,12 +39,12 @@ public class HashPartitionProvider implements PartitionProvider {
|
|||||||
@Value("${queue.partitions.hash_function_name:murmur3_128}")
|
@Value("${queue.partitions.hash_function_name:murmur3_128}")
|
||||||
private String hashFunctionName;
|
private String hashFunctionName;
|
||||||
|
|
||||||
private final ConcurrentMap<QueueKey, String> partitionTopicsMap = new ConcurrentHashMap<>();
|
private final Map<QueueKey, String> partitionTopicsMap = new ConcurrentHashMap<>();
|
||||||
private final ConcurrentMap<QueueKey, Integer> partitionSizesMap = new ConcurrentHashMap<>();
|
private final Map<QueueKey, Integer> partitionSizesMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private HashFunction hashFunction;
|
private HashFunction hashFunction;
|
||||||
|
|
||||||
protected volatile ConcurrentMap<QueueKey, List<Integer>> myPartitions = new ConcurrentHashMap<>();
|
protected Map<QueueKey, List<Integer>> myPartitions = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ApplicationEventPublisher applicationEventPublisher;
|
private ApplicationEventPublisher applicationEventPublisher;
|
||||||
@@ -118,7 +118,7 @@ public class HashPartitionProvider implements PartitionProvider {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final ConcurrentMap<QueueKey, List<Integer>> oldPartitions = myPartitions;
|
final Map<QueueKey, List<Integer>> oldPartitions = myPartitions;
|
||||||
myPartitions = newPartitions;
|
myPartitions = newPartitions;
|
||||||
|
|
||||||
log.info("Current Server responsible partitions: {}", myPartitions);
|
log.info("Current Server responsible partitions: {}", myPartitions);
|
||||||
|
|||||||
Reference in New Issue
Block a user