style(naming): Variable name specification
This commit is contained in:
parent
86e3b0dbc9
commit
4f264fed2d
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ target
|
||||
node_modules
|
||||
test/derby.log
|
||||
derby.log
|
||||
work
|
||||
|
@ -60,7 +60,7 @@ public class Service extends com.alibaba.nacos.api.naming.pojo.Service implement
|
||||
/**
|
||||
* Identify the information used to determine how many isEmpty judgments the service has experienced
|
||||
*/
|
||||
private int finalizeCnt = 0;
|
||||
private int finalizeCount = 0;
|
||||
|
||||
private String token;
|
||||
private List<String> owners = new ArrayList<>();
|
||||
@ -517,12 +517,12 @@ public class Service extends com.alibaba.nacos.api.naming.pojo.Service implement
|
||||
}
|
||||
}
|
||||
|
||||
public int getFinalizeCnt() {
|
||||
return finalizeCnt;
|
||||
public int getFinalizeCount() {
|
||||
return finalizeCount;
|
||||
}
|
||||
|
||||
public void setFinalizeCnt(int finalizeCnt) {
|
||||
this.finalizeCnt = finalizeCnt;
|
||||
public void setFinalizeCount(int finalizeCount) {
|
||||
this.finalizeCount = finalizeCount;
|
||||
}
|
||||
|
||||
public void addCluster(Cluster cluster) {
|
||||
|
@ -106,7 +106,7 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
@Value("${nacos.naming.empty.service.auto-clean:false}")
|
||||
private boolean emptyServiceAutoClean;
|
||||
|
||||
private int maxFinalizeCnt = 3;
|
||||
private int maxFinalizeCount = 3;
|
||||
|
||||
private final Object putServiceLock = new Object();
|
||||
|
||||
@ -827,7 +827,7 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
// experiences Empty is determined by finalizeCnt, and if the specified
|
||||
// value is reached, it is removed
|
||||
|
||||
if (service.getFinalizeCnt() > maxFinalizeCnt) {
|
||||
if (service.getFinalizeCount() > maxFinalizeCount) {
|
||||
Loggers.SRV_LOG.warn("namespace : {}, [{}] services are automatically cleaned",
|
||||
namespace, serviceName);
|
||||
try {
|
||||
@ -838,12 +838,12 @@ public class ServiceManager implements RecordListener<Service> {
|
||||
}
|
||||
}
|
||||
|
||||
service.setFinalizeCnt(service.getFinalizeCnt() + 1);
|
||||
service.setFinalizeCount(service.getFinalizeCount() + 1);
|
||||
|
||||
Loggers.SRV_LOG.debug("namespace : {}, [{}] The number of times the current service experiences " +
|
||||
"an empty instance is : {}", namespace, serviceName, service.getFinalizeCnt());
|
||||
"an empty instance is : {}", namespace, serviceName, service.getFinalizeCount());
|
||||
} else {
|
||||
service.setFinalizeCnt(0);
|
||||
service.setFinalizeCount(0);
|
||||
}
|
||||
return service;
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user