Remove the unused filed.
This commit is contained in:
parent
89b450537e
commit
afbfed2954
@ -35,19 +35,6 @@ public class ConnectionSetupRequest extends InternalRequest {
|
|||||||
|
|
||||||
private byte[] abilityTable;
|
private byte[] abilityTable;
|
||||||
|
|
||||||
/**.
|
|
||||||
* server will resolve {@link ConnectionSetupRequest#abilityTable} to server abilities, or to client abilities
|
|
||||||
*/
|
|
||||||
private boolean isServer;
|
|
||||||
|
|
||||||
public boolean isServer() {
|
|
||||||
return isServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServer(boolean server) {
|
|
||||||
isServer = server;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConnectionSetupRequest() {
|
public ConnectionSetupRequest() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +382,6 @@ public abstract class GrpcClient extends RpcClient {
|
|||||||
byte[] bitTable = AbilityTableUtils.getAbilityBiTableBy(AbilityKey.values(),
|
byte[] bitTable = AbilityTableUtils.getAbilityBiTableBy(AbilityKey.values(),
|
||||||
NacosAbilityManagerHolder.getInstance().getCurrentRunningAbility());
|
NacosAbilityManagerHolder.getInstance().getCurrentRunningAbility());
|
||||||
conSetupRequest.setAbilityTable(bitTable);
|
conSetupRequest.setAbilityTable(bitTable);
|
||||||
conSetupRequest.setServer(isServer());
|
|
||||||
conSetupRequest.setTenant(super.getTenant());
|
conSetupRequest.setTenant(super.getTenant());
|
||||||
grpcConn.sendRequest(conSetupRequest);
|
grpcConn.sendRequest(conSetupRequest);
|
||||||
// wait for response
|
// wait for response
|
||||||
@ -419,14 +418,6 @@ public abstract class GrpcClient extends RpcClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return whether server environment
|
|
||||||
* The same offset may refer to different functions in the client capability table and the server capability table.
|
|
||||||
*
|
|
||||||
* @return whether server environment
|
|
||||||
*/
|
|
||||||
protected abstract boolean isServer();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,11 +35,6 @@ public class GrpcClusterClient extends GrpcClient {
|
|||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isServer() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int rpcPortOffset() {
|
public int rpcPortOffset() {
|
||||||
return Integer.parseInt(System.getProperty(NACOS_SERVER_GRPC_PORT_OFFSET_KEY,
|
return Integer.parseInt(System.getProperty(NACOS_SERVER_GRPC_PORT_OFFSET_KEY,
|
||||||
|
@ -35,11 +35,6 @@ public class GrpcSdkClient extends GrpcClient {
|
|||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isServer() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int rpcPortOffset() {
|
public int rpcPortOffset() {
|
||||||
return Integer.parseInt(System.getProperty(NACOS_SERVER_GRPC_PORT_OFFSET_KEY,
|
return Integer.parseInt(System.getProperty(NACOS_SERVER_GRPC_PORT_OFFSET_KEY,
|
||||||
|
@ -48,11 +48,6 @@ public class GrpcClientTest {
|
|||||||
public void setUp() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
public void setUp() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||||
grpcClient = spy(new GrpcClient("testClient") {
|
grpcClient = spy(new GrpcClient("testClient") {
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean isServer() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int rpcPortOffset() {
|
public int rpcPortOffset() {
|
||||||
return 1000;
|
return 1000;
|
||||||
|
Loading…
Reference in New Issue
Block a user