Java Code Examples for com.xxl.job.admin.core.model.XxlJobRegistry#getRegistryKey()

The following examples show how to use com.xxl.job.admin.core.model.XxlJobRegistry#getRegistryKey() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobGroupController.java    From microservices-platform with Apache License 2.0 6 votes vote down vote up
private List<String> findRegistryByAppName(String appNameParam){
	HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>();
	List<XxlJobRegistry> list = XxlJobAdminConfig.getAdminConfig().getXxlJobRegistryDao().findAll(RegistryConfig.DEAD_TIMEOUT);
	if (list != null) {
		for (XxlJobRegistry item: list) {
			if (RegistryConfig.RegistType.EXECUTOR.name().equals(item.getRegistryGroup())) {
				String appName = item.getRegistryKey();
				List<String> registryList = appAddressMap.get(appName);
				if (registryList == null) {
					registryList = new ArrayList<String>();
				}

				if (!registryList.contains(item.getRegistryValue())) {
					registryList.add(item.getRegistryValue());
				}
				appAddressMap.put(appName, registryList);
			}
		}
	}
	return appAddressMap.get(appNameParam);
}
 
Example 2
Source File: JobGroupController.java    From zuihou-admin-boot with Apache License 2.0 6 votes vote down vote up
private List<String> findRegistryByAppName(String appNameParam) {
    HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>();
    List<XxlJobRegistry> list = XxlJobAdminConfig.getAdminConfig().getXxlJobRegistryDao().findAll(RegistryConfig.DEAD_TIMEOUT);
    if (list != null) {
        for (XxlJobRegistry item : list) {
            if (RegistryConfig.RegistType.EXECUTOR.name().equals(item.getRegistryGroup())) {
                String appName = item.getRegistryKey();
                List<String> registryList = appAddressMap.get(appName);
                if (registryList == null) {
                    registryList = new ArrayList<String>();
                }

                if (!registryList.contains(item.getRegistryValue())) {
                    registryList.add(item.getRegistryValue());
                }
                appAddressMap.put(appName, registryList);
            }
        }
    }
    return appAddressMap.get(appNameParam);
}
 
Example 3
Source File: JobGroupController.java    From zuihou-admin-cloud with Apache License 2.0 6 votes vote down vote up
private List<String> findRegistryByAppName(String appNameParam) {
    HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>();
    List<XxlJobRegistry> list = XxlJobAdminConfig.getAdminConfig().getXxlJobRegistryDao().findAll(RegistryConfig.DEAD_TIMEOUT);
    if (list != null) {
        for (XxlJobRegistry item : list) {
            if (RegistryConfig.RegistType.EXECUTOR.name().equals(item.getRegistryGroup())) {
                String appName = item.getRegistryKey();
                List<String> registryList = appAddressMap.get(appName);
                if (registryList == null) {
                    registryList = new ArrayList<String>();
                }

                if (!registryList.contains(item.getRegistryValue())) {
                    registryList.add(item.getRegistryValue());
                }
                appAddressMap.put(appName, registryList);
            }
        }
    }
    return appAddressMap.get(appNameParam);
}
 
Example 4
Source File: JobGroupController.java    From xxl-job with GNU General Public License v3.0 6 votes vote down vote up
private List<String> findRegistryByAppName(String appnameParam){
	HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>();
	List<XxlJobRegistry> list = xxlJobRegistryDao.findAll(RegistryConfig.DEAD_TIMEOUT, new Date());
	if (list != null) {
		for (XxlJobRegistry item: list) {
			if (RegistryConfig.RegistType.EXECUTOR.name().equals(item.getRegistryGroup())) {
				String appname = item.getRegistryKey();
				List<String> registryList = appAddressMap.get(appname);
				if (registryList == null) {
					registryList = new ArrayList<String>();
				}

				if (!registryList.contains(item.getRegistryValue())) {
					registryList.add(item.getRegistryValue());
				}
				appAddressMap.put(appname, registryList);
			}
		}
	}
	return appAddressMap.get(appnameParam);
}