Java Code Examples for com.alibaba.dubbo.common.URL#toIdentityString()

The following examples show how to use com.alibaba.dubbo.common.URL#toIdentityString() . 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: RpcStatus.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @param methodName
 * @return status
 */
public static RpcStatus getStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map == null) {
        METHOD_STATISTICS.putIfAbsent(uri, new ConcurrentHashMap<String, RpcStatus>());
        map = METHOD_STATISTICS.get(uri);
    }
    RpcStatus status = map.get(methodName);
    if (status == null) {
        map.putIfAbsent(methodName, new RpcStatus());
        status = map.get(methodName);
    }
    return status;
}
 
Example 2
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map != null) {
        map.remove(methodName);
    }
}
 
Example 3
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @param methodName
 * @return status
 */
public static RpcStatus getStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map == null) {
        METHOD_STATISTICS.putIfAbsent(uri, new ConcurrentHashMap<String, RpcStatus>());
        map = METHOD_STATISTICS.get(uri);
    }
    RpcStatus status = map.get(methodName);
    if (status == null) {
        map.putIfAbsent(methodName, new RpcStatus());
        status = map.get(methodName);
    }
    return status;
}
 
Example 4
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 5
Source File: RpcStatus.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url url
 */
public static void removeStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map != null) {
        map.remove(methodName);
    }
}
 
Example 6
Source File: RpcStatus.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url        url
 * @param methodName method name
 * @return status
 */
public static RpcStatus getStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map == null) {
        METHOD_STATISTICS.putIfAbsent(uri, new ConcurrentHashMap<>());
        map = METHOD_STATISTICS.get(uri);
    }
    RpcStatus status = map.get(methodName);
    if (status == null) {
        map.putIfAbsent(methodName, new RpcStatus());
        status = map.get(methodName);
    }
    return status;
}
 
Example 7
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 8
Source File: RpcStatus.java    From dubbo3 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 9
Source File: RpcStatus.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map != null) {
        map.remove(methodName);
    }
}
 
Example 10
Source File: RpcStatus.java    From dubbo-2.6.5 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 11
Source File: RpcStatus.java    From dubbox-hystrix with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 12
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map != null) {
        map.remove(methodName);
    }
}
 
Example 13
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @param methodName
 * @return status
 */
public static RpcStatus getStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map == null) {
        METHOD_STATISTICS.putIfAbsent(uri, new ConcurrentHashMap<String, RpcStatus>());
        map = METHOD_STATISTICS.get(uri);
    }
    RpcStatus status = map.get(methodName);
    if (status == null) {
        map.putIfAbsent(methodName, new RpcStatus());
        status = map.get(methodName);
    }
    return status;
}
 
Example 14
Source File: RpcStatus.java    From dubbox with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * @param url
 * @return status
 */
public static RpcStatus getStatus(URL url) {
    String uri = url.toIdentityString();
    RpcStatus status = SERVICE_STATISTICS.get(uri);
    if (status == null) {
        SERVICE_STATISTICS.putIfAbsent(uri, new RpcStatus());
        status = SERVICE_STATISTICS.get(uri);
    }
    return status;
}
 
Example 15
Source File: RpcStatus.java    From dubbo-2.6.5 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url
 */
public static void removeStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map != null) {
        map.remove(methodName);
    }
}
 
Example 16
Source File: RpcStatus.java    From dubbo-2.6.5 with Apache License 2.0 5 votes vote down vote up
/**
 * @param url
 * @param methodName
 * @return status
 */
public static RpcStatus getStatus(URL url, String methodName) {
    String uri = url.toIdentityString();
    ConcurrentMap<String, RpcStatus> map = METHOD_STATISTICS.get(uri);
    if (map == null) {
        METHOD_STATISTICS.putIfAbsent(uri, new ConcurrentHashMap<String, RpcStatus>());
        map = METHOD_STATISTICS.get(uri);
    }
    RpcStatus status = map.get(methodName);
    if (status == null) {
        map.putIfAbsent(methodName, new RpcStatus());
        status = map.get(methodName);
    }
    return status;
}
 
Example 17
Source File: RpcStatus.java    From dubbox-hystrix with Apache License 2.0 4 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url) {
    String uri = url.toIdentityString();
    SERVICE_STATISTICS.remove(uri);
}
 
Example 18
Source File: RpcStatus.java    From dubbox with Apache License 2.0 4 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url) {
    String uri = url.toIdentityString();
    SERVICE_STATISTICS.remove(uri);
}
 
Example 19
Source File: RpcStatus.java    From dubbox with Apache License 2.0 4 votes vote down vote up
/**
 * 
 * @param url
 */
public static void removeStatus(URL url) {
    String uri = url.toIdentityString();
    SERVICE_STATISTICS.remove(uri);
}
 
Example 20
Source File: RpcStatus.java    From dubbo-2.6.5 with Apache License 2.0 4 votes vote down vote up
/**
 * @param url
 */
public static void removeStatus(URL url) {
    String uri = url.toIdentityString();
    SERVICE_STATISTICS.remove(uri);
}