class AbstractInspectHandler implements InspectHandler {
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    protected InstanceDao instanceDao;
    @Autowired
    protected AsyncService asyncService;

    protected List<Inspector> inspectorList;

    protected abstract String getThreadPoolKey();

    protected abstract Map<String, List<InstanceInfo>> getSplitMap();

    public void init() {
        asyncService.assemblePool(getThreadPoolKey(), new ThreadPoolExecutor(10, 100,
                0L, TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<Runnable>(1024),
                new NamedThreadFactory(getThreadPoolKey(), true)));
    }

    public void handle() {<FILL_FUNCTION_BODY>}

    public void setInspectorList(List<Inspector> inspectorList) {
        this.inspectorList = inspectorList;
    }

    public List<InstanceInfo> getAllInstanceList() {
        return instanceDao.getAllInsts();
    }

}

        if (inspectorList == null || inspectorList.isEmpty()) {
            logger.warn("inspectorList is null");
            return;
        }
        Map<String, List<InstanceInfo>> splitMap = getSplitMap();
        for (Map.Entry<String, List<InstanceInfo>> entry : splitMap.entrySet()) {
            String splitKey = entry.getKey();
            List<InstanceInfo> instances = entry.getValue();
            final Map<InspectParamEnum, Object> paramMap = new HashMap<InspectParamEnum, Object>();
            paramMap.put(InspectParamEnum.SPLIT_KEY, splitKey);
            paramMap.put(InspectParamEnum.INSTANCE_LIST, instances);
            String key = getThreadPoolKey() + "-" + splitKey;
            asyncService.submitFuture(getThreadPoolKey(), new KeyCallable<Boolean>(key) {
                @Override
                public Boolean execute() {
                    for (Inspector inspector : inspectorList) {
                        boolean isSuccess = false;
                        try {
                            isSuccess = inspector.inspect(paramMap);
                        } catch (Throwable e) {
                            logger.error(e.getMessage(), e);
                        }
                        if (!isSuccess) {
                            logger.error(getThreadPoolKey() + "-failed:" + inspector.getClass().getName());
                            return false;
                        }
                    }
                    return true;
                }
            });
        }
    
<no_super_class>