Commit db7fe4bb authored by myscm's avatar myscm
Browse files

619381b0fb0b8106475d52d0:Merge branch 'release_612' into 'master'

No related merge requests found
Showing with 208 additions and 15 deletions
+208 -15
......@@ -6,7 +6,7 @@
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-all</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<name>${project.groupId}:${project.artifactId}</name>
<url>http://github.com/alipay/sofa-registry</url>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-client-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-common</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -31,12 +31,20 @@ public class PersistenceDataBuilder {
persistenceData.setGroup(dataInfo.getGroup());
persistenceData.setInstanceId(dataInfo.getInstanceId());
persistenceData.setData(data);
persistenceData.setVersion(System.currentTimeMillis());
persistenceData.setVersion(nextVersion());
return persistenceData;
}
public static PersistenceData createPersistenceDataForBool(String dataInfoId, boolean data) {
return createPersistenceData(dataInfoId, data ? "true" : "false");
}
public static String getDataInfoId(PersistenceData persistenceData) {
return DataInfo.toDataInfoId(
persistenceData.getDataId(), persistenceData.getInstanceId(), persistenceData.getGroup());
}
public static long nextVersion() {
return System.currentTimeMillis();
}
}
......@@ -67,6 +67,10 @@ public class ValueConstants {
SESSION_PROVIDE_DATA_INSTANCE_ID,
SESSION_PROVIDE_DATA_GROUP);
public static final String SHUTDOWN_SWITCH_DATA_ID =
DataInfo.toDataInfoId(
"session.shutdown.switch", SESSION_PROVIDE_DATA_INSTANCE_ID, SESSION_PROVIDE_DATA_GROUP);
public static final String BLACK_LIST_DATA_ID =
DataInfo.toDataInfoId(
"session.blacklist.data", SESSION_PROVIDE_DATA_INSTANCE_ID, SESSION_PROVIDE_DATA_GROUP);
......
......@@ -17,6 +17,7 @@
package com.alipay.sofa.registry.common.model.metaserver;
import java.util.Map;
import java.util.Set;
/**
* @author xiaojian.xj
......@@ -28,9 +29,13 @@ public class ClientManagerAddress {
private final Map<String, AddressVersion> clientOffAddress;
public ClientManagerAddress(long version, Map<String, AddressVersion> clientOffAddress) {
private final Set<String> reduces;
public ClientManagerAddress(
long version, Map<String, AddressVersion> clientOffAddress, Set<String> reduces) {
this.version = version;
this.clientOffAddress = clientOffAddress;
this.reduces = reduces;
}
/**
......@@ -51,6 +56,15 @@ public class ClientManagerAddress {
return clientOffAddress;
}
/**
* Getter method for property <tt>reduces</tt>.
*
* @return property value of reduces
*/
public Set<String> getReduces() {
return reduces;
}
@Override
public String toString() {
return "ClientManagerAddress{"
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alipay.sofa.registry.common.model.metaserver;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
/**
* @author xiaojian.xj
* @version : ShutdownSwitch.java, v 0.1 2021年10月14日 17:19 xiaojian.xj Exp $
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ShutdownSwitch {
private boolean shutdown = false;
@JsonSetter(nulls = Nulls.SKIP)
private String cause;
public ShutdownSwitch() {}
public ShutdownSwitch(boolean shutdown) {
this.shutdown = shutdown;
}
public ShutdownSwitch(boolean shutdown, String cause) {
this.shutdown = shutdown;
this.cause = cause;
}
public static ShutdownSwitch defaultSwitch() {
return new ShutdownSwitch();
}
public boolean isShutdown() {
return shutdown;
}
public void setShutdown(boolean shutdown) {
this.shutdown = shutdown;
}
/**
* Getter method for property <tt>cause</tt>.
*
* @return property value of cause
*/
public String getCause() {
return cause;
}
/**
* Setter method for property <tt>cause</tt>.
*
* @param cause value to be assigned to property cause
*/
public void setCause(String cause) {
this.cause = cause;
}
@Override
public String toString() {
return "ShutdownSwitch{" + "shutdown=" + shutdown + ", cause=" + cause + '}';
}
public enum CauseEnum {
FORCE("force"),
SELF_ADAPTION("self_adaption"),
;
private String cause;
CauseEnum(String cause) {
this.cause = cause;
}
/**
* Getter method for property <tt>cause</tt>.
*
* @return property value of cause
*/
public String getCause() {
return cause;
}
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alipay.sofa.registry.common.model.sessionserver;
import java.io.Serializable;
/**
* @author xiaojian.xj
* @version : StopPushRequest.java, v 0.1 2021年10月25日 15:53 xiaojian.xj Exp $
*/
public class StopPushRequest implements Serializable {
private final boolean stop;
public StopPushRequest(boolean stop) {
this.stop = stop;
}
public boolean isStop() {
return stop;
}
@Override
public String toString() {
return "StopPushRequest{" + "stop=" + stop + '}';
}
}
......@@ -25,6 +25,8 @@ import java.util.Map;
public class AppRevision implements Serializable {
private long id;
private String dataCenter;
private String revision;
......@@ -51,6 +53,24 @@ public class AppRevision implements Serializable {
this.lastHeartbeat = lastHeartbeat;
}
/**
* Getter method for property <tt>id</tt>.
*
* @return property value of id
*/
public long getId() {
return id;
}
/**
* Setter method for property <tt>id</tt>.
*
* @param id value to be assigned to property id
*/
public void setId(long id) {
this.id = id;
}
/**
* Getter method for property <tt>dataCenter</tt>.
*
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-server-parent</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-common</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -58,10 +58,15 @@ public class AbstractTestBase {
public static final Random random = new Random();
public static final String CLUSTER_ID = "DEFAULT_SEGMENT";
public static final String RECOVER_CLUSTER_ID = "RECOVER_DEFAULT_SEGMENT";
@BeforeClass
public static void beforeAbstractTestClass() {
System.setProperty("spring.main.show_banner", "false");
System.setProperty("spring.profiles.active", "test");
System.setProperty("nodes.clusterId", CLUSTER_ID);
System.setProperty("nodes.recoverClusterId", RECOVER_CLUSTER_ID);
}
@Before
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-distribution</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-distribution</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.alipay.sofa</groupId>
<artifactId>registry-distribution</artifactId>
<version>6.1.1</version>
<version>6.1.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment