Skip to content

Commit

Permalink
1.server side client connection listener optimize 2. listen context a…
Browse files Browse the repository at this point in the history
…nd notifier updated . (#3385)

* Add gprc support-> client reconnection optimize

* Add gprc support-> 1.client connection listener optimize  2.listen context an notifier updated .

* Add gprc support->merge problem fix

* Add gprc support->check style fixed.

* Add gprc support->check style fixed and remove  gRpc classes in source package.
  • Loading branch information
shiyiyue1102 authored Jul 20, 2020
1 parent bd0f1a3 commit 85a0398
Show file tree
Hide file tree
Showing 46 changed files with 637 additions and 4,314 deletions.
36 changes: 18 additions & 18 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@
</plugin>

<!-- reuse when you need to update grpc model -->
<!--<plugin>-->
<!--<groupId>org.xolstice.maven.plugins</groupId>-->
<!--<artifactId>protobuf-maven-plugin</artifactId>-->
<!--<version>0.5.0</version>-->
<!--<configuration>-->
<!--<protocArtifact>com.google.protobuf:protoc:3.3.0:exe:osx-x86_64</protocArtifact>-->
<!--<pluginId>grpc-java</pluginId>-->
<!--<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.20.0:exe:osx-x86_64</pluginArtifact>-->
<!--</configuration>-->
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>compile</goal>-->
<!--<goal>compile-custom</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.3.0:exe:osx-x86_64</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.20.0:exe:osx-x86_64</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

package com.alibaba.nacos.api.config.remote.request;


/**
* ConfigChangeListenRequest.
* @author liuzunfei
* @version $Id: ConfigChangeListenRequest.java, v 0.1 2020年07月13日 9:01 PM liuzunfei Exp $
*/
public class ConfigChangeListenRequest extends ConfigCommonRequest {


private static final String LISTEN = "listen";

private static final String UNLISTEN = "unlisten";
Expand All @@ -37,7 +35,6 @@ public class ConfigChangeListenRequest extends ConfigCommonRequest {

private String operation = LISTEN;


public boolean isCancelListen() {
return UNLISTEN.equals(this.operation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,21 @@

package com.alibaba.nacos.api.config.remote.response;

import com.alibaba.nacos.api.remote.response.Response;
import com.alibaba.nacos.api.remote.response.ResponseCode;
import com.alibaba.nacos.api.remote.response.ServerPushResponse;

/**
* ConfigChangeNotifyResponse.
* @author liuzunfei
* @version $Id: ConfigChangeNotifyResponse.java, v 0.1 2020年07月14日 3:20 PM liuzunfei Exp $
*/
public class ConfigChangeNotifyResponse extends Response {
public class ConfigChangeNotifyResponse extends ServerPushResponse {

private String dataId;

private String group;

private String tenant;

public ConfigChangeNotifyResponse() {

}

@Override
public String getType() {
return ConfigResponseTypeConstants.CONFIG_CHANGE_NOTIFY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public void addLabel(String key, String value) {
/**
* Buid fail response.
*
* @param errorCode
* @param message
* @param errorCode errorCode.
* @param message message.
* @return
*/
public static ConfigQueryResponse buildFailResponse(int errorCode, String message) {
Expand Down
Loading

0 comments on commit 85a0398

Please sign in to comment.