Java Code Examples for com.alibaba.dubbo.registry.common.route.ParseUtils#hasIntersection()

The following examples show how to use com.alibaba.dubbo.registry.common.route.ParseUtils#hasIntersection() . 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: Routes.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 2
Source File: RelateUserUtils.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 3
Source File: Routes.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 4
Source File: RelateUserUtils.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 5
Source File: Routes.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 6
Source File: RelateUserUtils.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 7
Source File: Routes.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 8
Source File: RelateUserUtils.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 9
Source File: Routes.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}
 
Example 10
Source File: RelateUserUtils.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 添加与服务模式相关的Owner
 * 
 * @param usernames 用于添加的用户名
 * @param serviceNamePattern 服务模式,Glob模式
 */
public static void addOwnersOfServicePattern(Set<String> usernames, String serviceNamePattern,
                                            OwnerService ownerDAO) {
    List<String> serviceNamePatterns = ownerDAO.findAllServiceNames();
    for (String p : serviceNamePatterns) {
        if (ParseUtils.hasIntersection(p, serviceNamePattern)) {
            List<String> list = ownerDAO.findUsernamesByServiceName(p);
            usernames.addAll(list);
        }
    }
}