use of org.apache.servicecomb.core.executor.GroupExecutor in project java-chassis by ServiceComb.
the class ThreadPoolMetersInitializer method createThreadPoolMeters.
protected void createThreadPoolMeters(String threadPoolName, GroupExecutor groupExecutor) {
for (int idx = 0; idx < groupExecutor.getExecutorList().size(); idx++) {
Executor executor = groupExecutor.getExecutorList().get(idx);
createThreadPoolMeters(threadPoolName + "-group" + idx, executor);
}
}
use of org.apache.servicecomb.core.executor.GroupExecutor in project java-chassis by ServiceComb.
the class ThreadPoolMetersInitializer method createThreadPoolMeters.
public void createThreadPoolMeters() {
Map<Executor, Executor> operationExecutors = collectionOperationExecutors();
// currently, all operation executors come from bean
Map<String, Executor> beanExecutors = BeanUtils.getContext().getBeansOfType(Executor.class);
for (Entry<String, Executor> entry : beanExecutors.entrySet()) {
Executor executor = entry.getValue();
if (!operationExecutors.containsKey(executor)) {
continue;
}
if (GroupExecutor.class.isInstance(executor)) {
createThreadPoolMeters(entry.getKey(), (GroupExecutor) executor);
continue;
}
createThreadPoolMeters(entry.getKey(), executor);
}
}
Aggregations