File tree 8 files changed +15
-17
lines changed
data/src/main/java/com/alipay/sofa/registry/server/data/providedata
meta/src/main/java/com/alipay/sofa/registry/server/meta
session/src/main/java/com/alipay/sofa/registry/server/session/providedata
shared/src/main/java/com/alipay/sofa/registry/server/shared/util
api/src/main/java/com/alipay/sofa/registry/store/api/elector
jdbc/src/main/java/com/alipay/sofa/registry/jdbc/convertor
8 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .data .providedata ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .constants .ValueConstants ;
21
20
import com .alipay .sofa .registry .common .model .metaserver .CompressDatumSwitch ;
22
21
import com .alipay .sofa .registry .common .model .metaserver .CompressPushSwitch ;
30
29
import com .alipay .sofa .registry .server .shared .providedata .AbstractFetchSystemPropertyService ;
31
30
import com .alipay .sofa .registry .server .shared .providedata .SystemDataStorage ;
32
31
import com .alipay .sofa .registry .util .JsonUtils ;
32
+ import org .apache .commons .lang .StringUtils ;
33
33
import org .springframework .beans .factory .annotation .Autowired ;
34
34
35
35
public class CompressDatumService
@@ -52,7 +52,7 @@ protected int getSystemPropertyIntervalMillis() {
52
52
@ Override
53
53
protected boolean doProcess (CompressStorage expect , ProvideData data ) {
54
54
final String switchString = ProvideData .toString (data );
55
- if (StringUtil .isBlank (switchString )) {
55
+ if (StringUtils .isBlank (switchString )) {
56
56
LOGGER .info ("Fetch compress datum switch content empty" );
57
57
return true ;
58
58
}
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .meta .bootstrap ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .elector .LeaderInfo ;
21
20
import com .alipay .sofa .registry .common .model .store .URL ;
22
21
import com .alipay .sofa .registry .log .Logger ;
@@ -178,7 +177,7 @@ public void start() {
178
177
"[MetaBootstrap] retry connect to meta leader: {}, client:{}" ,
179
178
leader .getLeader (),
180
179
localMetaExchanger .getClient ());
181
- return StringUtil .isNotEmpty (leader .getLeader ())
180
+ return StringUtils .isNotEmpty (leader .getLeader ())
182
181
&& localMetaExchanger .getClient () != null ;
183
182
});
184
183
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .meta .remoting .meta ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .store .URL ;
21
20
import com .alipay .sofa .registry .log .Logger ;
22
21
import com .alipay .sofa .registry .log .LoggerFactory ;
33
32
import java .util .Collections ;
34
33
import java .util .concurrent .locks .ReadWriteLock ;
35
34
import java .util .concurrent .locks .ReentrantReadWriteLock ;
35
+ import org .apache .commons .lang .StringUtils ;
36
36
import org .springframework .beans .factory .annotation .Autowired ;
37
37
38
38
/**
@@ -77,12 +77,12 @@ public int getConnNum() {
77
77
78
78
public Response sendRequest (Object requestBody ) throws RequestException {
79
79
final String newLeader = metaLeaderService .getLeader ();
80
- if (StringUtil .isBlank (newLeader )) {
80
+ if (StringUtils .isBlank (newLeader )) {
81
81
LOGGER .error ("[sendRequest] meta leader is empty." );
82
82
return () -> ResultStatus .FAILED ;
83
83
}
84
84
85
- if (!StringUtil .equals (metaLeader , newLeader ) || boltExchange .getClient (serverType ) == null ) {
85
+ if (!StringUtils .equals (metaLeader , newLeader ) || boltExchange .getClient (serverType ) == null ) {
86
86
setLeaderAndConnect (newLeader );
87
87
}
88
88
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .meta .resource ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .CommonResponse ;
21
20
import com .alipay .sofa .registry .metrics .ReporterUtils ;
22
21
import com .alipay .sofa .registry .server .meta .MetaLeaderService ;
33
32
import javax .ws .rs .core .Response ;
34
33
import javax .ws .rs .core .Response .ResponseBuilder ;
35
34
import javax .ws .rs .core .Response .Status ;
35
+ import org .apache .commons .lang .StringUtils ;
36
36
import org .springframework .beans .factory .annotation .Autowired ;
37
37
38
38
/**
@@ -93,7 +93,7 @@ private CommonResponse getHealthCheckResult() {
93
93
ret = ret && start ;
94
94
sb .append (", remoteMetaRegisterServerStart:" ).append (start );
95
95
96
- boolean leaderNotEmpty = StringUtil .isNotBlank (metaLeaderService .getLeader ());
96
+ boolean leaderNotEmpty = StringUtils .isNotBlank (metaLeaderService .getLeader ());
97
97
ret = ret && leaderNotEmpty ;
98
98
99
99
sb .append (", role:" ).append (metaLeaderService .amILeader () ? "leader" : "follower" );
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .session .providedata ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .constants .ValueConstants ;
21
20
import com .alipay .sofa .registry .common .model .metaserver .CompressPushSwitch ;
22
21
import com .alipay .sofa .registry .common .model .metaserver .ProvideData ;
@@ -55,7 +54,7 @@ protected int getSystemPropertyIntervalMillis() {
55
54
@ Override
56
55
protected boolean doProcess (CompressStorage expect , ProvideData data ) {
57
56
final String switchString = ProvideData .toString (data );
58
- if (StringUtil .isBlank (switchString )) {
57
+ if (StringUtils .isBlank (switchString )) {
59
58
LOGGER .info ("Fetch session push compressed enabled content empty" );
60
59
return true ;
61
60
}
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .server .shared .util ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .console .PersistenceData ;
21
20
import com .alipay .sofa .registry .store .api .DBResponse ;
22
21
import com .alipay .sofa .registry .store .api .OperationStatus ;
22
+ import org .apache .commons .lang .StringUtils ;
23
23
24
24
/**
25
25
* @author xiaojian.xj
@@ -29,7 +29,7 @@ public class PersistenceDataParser {
29
29
30
30
public static boolean parse2BoolIgnoreCase (
31
31
PersistenceData persistenceData , boolean defaultValue ) {
32
- if (persistenceData == null || StringUtil .isBlank (persistenceData .getData ())) {
32
+ if (persistenceData == null || StringUtils .isBlank (persistenceData .getData ())) {
33
33
return defaultValue ;
34
34
}
35
35
return Boolean .parseBoolean (persistenceData .getData ());
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .store .api .elector ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .log .Logger ;
21
20
import com .alipay .sofa .registry .log .LoggerFactory ;
22
21
import com .alipay .sofa .registry .net .NetUtil ;
27
26
import java .util .List ;
28
27
import java .util .concurrent .TimeUnit ;
29
28
import javax .annotation .PostConstruct ;
29
+ import org .apache .commons .lang .StringUtils ;
30
30
31
31
/**
32
32
* @author chen.zhu
@@ -144,7 +144,7 @@ public boolean amILeader() {
144
144
}
145
145
146
146
protected boolean amILeader (String leader ) {
147
- return StringUtil .equals (myself (), leader ) && leaderNotExpired ();
147
+ return StringUtils .equals (myself (), leader ) && leaderNotExpired ();
148
148
}
149
149
150
150
private boolean leaderNotExpired () {
Original file line number Diff line number Diff line change 16
16
*/
17
17
package com .alipay .sofa .registry .jdbc .convertor ;
18
18
19
- import com .alipay .sofa .common .profile .StringUtil ;
20
19
import com .alipay .sofa .registry .common .model .store .AppRevision ;
21
20
import com .alipay .sofa .registry .core .model .AppRevisionInterface ;
22
21
import com .alipay .sofa .registry .jdbc .domain .AppRevisionDomain ;
23
22
import com .alipay .sofa .registry .util .JsonUtils ;
24
23
import com .fasterxml .jackson .core .type .TypeReference ;
25
24
import com .google .common .annotations .VisibleForTesting ;
26
25
import java .util .*;
26
+ import org .apache .commons .lang .StringUtils ;
27
27
import org .springframework .util .CollectionUtils ;
28
28
29
29
/**
@@ -75,7 +75,7 @@ public static AppRevision convert2Revision(AppRevisionDomain domain) {
75
75
appRevision .setBaseParams (JsonUtils .read (domain .getBaseParams (), BASE_FORMAT ));
76
76
77
77
String serviceParams = domain .getServiceParamsLarge ();
78
- if (StringUtil .isBlank (serviceParams )) {
78
+ if (StringUtils .isBlank (serviceParams )) {
79
79
serviceParams = domain .getServiceParams ();
80
80
}
81
81
appRevision .setInterfaceMap (JsonUtils .read (serviceParams , SERVICE_FORMAT ));
You can’t perform that action at this time.
0 commit comments