Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
magestacks committed Apr 15, 2023
2 parents 8ac99e7 + a1b085f commit ebc6dbd
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;

import static cn.hippo4j.common.constant.Constants.IDENTIFY_SLICER_SYMBOL;
Expand Down Expand Up @@ -55,10 +56,13 @@ public AdapterExecutorProperties discoverAdapterExecutorAndGet(String mark) {
}

public void discoverAdapterExecutor() {
List<AdapterExecutorProperties> adapterExecutors = bootstrapConfigProperties.getAdapterExecutors();
for (AdapterExecutorProperties each : adapterExecutors) {
String buildKey = each.getMark() + IDENTIFY_SLICER_SYMBOL + each.getThreadPoolKey();
ADAPTER_EXECUTORS_MAP.putIfAbsent(buildKey, each);
}
Optional<List<AdapterExecutorProperties>> adapterExecutorProperties =
Optional.ofNullable(bootstrapConfigProperties.getAdapterExecutors());
adapterExecutorProperties.ifPresent(props -> {
for (AdapterExecutorProperties each : props) {
String buildKey = each.getMark() + IDENTIFY_SLICER_SYMBOL + each.getThreadPoolKey();
ADAPTER_EXECUTORS_MAP.putIfAbsent(buildKey, each);
}
});
}
}

0 comments on commit ebc6dbd

Please sign in to comment.