apache / dubbo-admin

@@ -24,6 +24,7 @@
Loading
24 24
import org.apache.dubbo.admin.model.domain.Provider;
25 25
import org.apache.dubbo.admin.model.domain.RegistrySource;
26 26
import org.apache.dubbo.common.URLBuilder;
27 +
import org.apache.dubbo.common.constants.CommonConstants;
27 28
import org.apache.dubbo.common.url.component.ServiceConfigURL;
28 29
import org.apache.dubbo.common.utils.CollectionUtils;
29 30
import org.apache.dubbo.metadata.MetadataInfo;
@@ -178,6 +179,8 @@
Loading
178 179
                p.setUrl(url.toFullString());
179 180
                p.setDynamic(url.getParameter("dynamic", true));
180 181
                p.setEnabled(url.getParameter(Constants.ENABLED_KEY, true));
182 +
                p.setSerialization(url.getParameter(org.apache.dubbo.remoting.Constants.SERIALIZATION_KEY, "hessian2"));
183 +
                p.setTimeout(url.getParameter(CommonConstants.TIMEOUT_KEY, CommonConstants.DEFAULT_TIMEOUT));
181 184
                p.setWeight(url.getParameter(Constants.WEIGHT_KEY, Constants.DEFAULT_WEIGHT));
182 185
                p.setUsername(url.getParameter("owner"));
183 186
                p.setRegistrySource(RegistrySource.INSTANCE);

@@ -21,6 +21,7 @@
Loading
21 21
import org.apache.dubbo.admin.model.domain.RegistrySource;
22 22
import org.apache.dubbo.common.BaseServiceMetadata;
23 23
import org.apache.dubbo.common.URL;
24 +
import org.apache.dubbo.common.constants.CommonConstants;
24 25
import org.apache.dubbo.common.utils.StringUtils;
25 26
26 27
import java.util.ArrayList;
@@ -62,6 +63,8 @@
Loading
62 63
63 64
        p.setDynamic(url.getParameter("dynamic", true));
64 65
        p.setEnabled(url.getParameter(Constants.ENABLED_KEY, true));
66 +
        p.setSerialization(url.getParameter(org.apache.dubbo.remoting.Constants.SERIALIZATION_KEY, "hessian2"));
67 +
        p.setTimeout(url.getParameter(CommonConstants.TIMEOUT_KEY, CommonConstants.DEFAULT_TIMEOUT));
65 68
        p.setWeight(url.getParameter(Constants.WEIGHT_KEY, Constants.DEFAULT_WEIGHT));
66 69
        p.setUsername(url.getParameter("owner"));
67 70
        p.setRegistrySource(RegistrySource.INTERFACE);

@@ -46,6 +46,10 @@
Loading
46 46
47 47
    private boolean enabled;          /* provider enabled or not */
48 48
49 +
    private int timeout;              /* provider timeout */
50 +
51 +
    private String serialization;      /* provider serialization */
52 +
49 53
    private int weight;          /* provider weight */
50 54
51 55
    private String application; /* application name */
@@ -191,6 +195,22 @@
Loading
191 195
        this.registrySource = registrySource;
192 196
    }
193 197
198 +
    public int getTimeout() {
199 +
        return timeout;
200 +
    }
201 +
202 +
    public void setTimeout(int timeout) {
203 +
        this.timeout = timeout;
204 +
    }
205 +
206 +
    public String getSerialization() {
207 +
        return serialization;
208 +
    }
209 +
210 +
    public void setSerialization(String serialization) {
211 +
        this.serialization = serialization;
212 +
    }
213 +
194 214
    public URL toUrl() {
195 215
        Map<String, String> serviceName2Map = ConvertUtil.serviceName2Map(getService());
196 216
        /*if(!serviceName2Map.containsKey(Constants.INTERFACE_KEY)) {
@@ -221,16 +241,6 @@
Loading
221 241
        return url;
222 242
    }
223 243
224 -
    public boolean equalsWithoutRegistry(Provider provider) {
225 -
        if (this == provider) {
226 -
            return true;
227 -
        }
228 -
        if (!super.equals(provider)) {
229 -
            return false;
230 -
        }
231 -
        return dynamic == provider.dynamic && enabled == provider.enabled && weight == provider.weight && alived == provider.alived && Objects.equals(service, provider.service) && Objects.equals(parameters, provider.parameters) && Objects.equals(address, provider.address) && Objects.equals(registry, provider.registry) && Objects.equals(application, provider.application) && Objects.equals(username, provider.username) && Objects.equals(expired, provider.expired) && Objects.equals(override, provider.override) && Objects.equals(overrides, provider.overrides);
232 -
    }
233 -
234 244
    @java.lang.Override
235 245
    public boolean equals(Object o) {
236 246
        if (this == o) {
@@ -243,11 +253,11 @@
Loading
243 253
            return false;
244 254
        }
245 255
        Provider provider = (Provider) o;
246 -
        return dynamic == provider.dynamic && enabled == provider.enabled && weight == provider.weight && alived == provider.alived && Objects.equals(service, provider.service) && Objects.equals(url, provider.url) && Objects.equals(parameters, provider.parameters) && Objects.equals(address, provider.address) && Objects.equals(registry, provider.registry) && Objects.equals(application, provider.application) && Objects.equals(username, provider.username) && Objects.equals(expired, provider.expired) && Objects.equals(override, provider.override) && Objects.equals(overrides, provider.overrides) && registrySource == provider.registrySource;
256 +
        return dynamic == provider.dynamic && enabled == provider.enabled && timeout == provider.timeout && weight == provider.weight && alived == provider.alived && Objects.equals(service, provider.service) && Objects.equals(url, provider.url) && Objects.equals(parameters, provider.parameters) && Objects.equals(address, provider.address) && Objects.equals(registry, provider.registry) && Objects.equals(serialization, provider.serialization) && Objects.equals(application, provider.application) && Objects.equals(username, provider.username) && Objects.equals(expired, provider.expired) && Objects.equals(override, provider.override) && Objects.equals(overrides, provider.overrides) && registrySource == provider.registrySource;
247 257
    }
248 258
249 259
    @java.lang.Override
250 260
    public int hashCode() {
251 -
        return Objects.hash(super.hashCode(), service, url, parameters, address, registry, dynamic, enabled, weight, application, username, expired, alived, override, overrides, registrySource);
261 +
        return Objects.hash(super.hashCode(), service, url, parameters, address, registry, dynamic, enabled, timeout, serialization, weight, application, username, expired, alived, override, overrides, registrySource);
252 262
    }
253 263
}
Files Complexity Coverage
dubbo-admin-server/src/main/java/org/apache/dubbo/admin 18.83% 21.18%
Project Totals (149 files) 18.83% 21.18%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading