Skip to content

Commit 1798fed

Browse files
CrazyHZMbeiwei30
authored andcommitted
constants step4 rpc (#4072)
1 parent 85e595e commit 1798fed

File tree

85 files changed

+401
-313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+401
-313
lines changed

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagRouter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import java.util.stream.Collectors;
4242

4343
import static org.apache.dubbo.rpc.cluster.Constants.TAG_KEY;
44-
import static org.apache.dubbo.common.constants.RpcConstants.FORCE_USE_TAG;
44+
import static org.apache.dubbo.rpc.Constants.FORCE_USE_TAG;
4545

4646
/**
4747
* TagRouter, "application.tag-router"

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/ClusterUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
import static org.apache.dubbo.common.constants.CommonConstants.TIMESTAMP_KEY;
4040
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
4141
import static org.apache.dubbo.common.constants.RpcConstants.DUBBO_VERSION_KEY;
42-
import static org.apache.dubbo.common.constants.RpcConstants.INVOKER_LISTENER_KEY;
43-
import static org.apache.dubbo.common.constants.RpcConstants.REFERENCE_FILTER_KEY;
42+
import static org.apache.dubbo.rpc.Constants.INVOKER_LISTENER_KEY;
43+
import static org.apache.dubbo.rpc.Constants.REFERENCE_FILTER_KEY;
4444

4545
/**
4646
* ClusterUtils

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvoker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import static org.apache.dubbo.common.constants.CommonConstants.DEFAULT_TIMEOUT;
5050
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
5151
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
52-
import static org.apache.dubbo.common.constants.RpcConstants.MERGER_KEY;
52+
import static org.apache.dubbo.rpc.Constants.MERGER_KEY;
5353

5454
@SuppressWarnings("unchecked")
5555
public class MergeableClusterInvoker<T> extends AbstractClusterInvoker<T> {

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterInvoker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.List;
3434

3535
import static org.apache.dubbo.rpc.cluster.Constants.INVOCATION_NEED_MOCK;
36-
import static org.apache.dubbo.common.constants.RpcConstants.MOCK_KEY;
36+
import static org.apache.dubbo.rpc.Constants.MOCK_KEY;
3737

3838
public class MockClusterInvoker<T> implements Invoker<T> {
3939

dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/directory/MockDirInvocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
2828
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
2929
import static org.apache.dubbo.common.constants.RpcConstants.DUBBO_VERSION_KEY;
30-
import static org.apache.dubbo.common.constants.RpcConstants.TOKEN_KEY;
30+
import static org.apache.dubbo.rpc.Constants.TOKEN_KEY;
3131

3232
/**
3333
* MockInvocation.java

dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvokerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import java.util.Map;
3939

4040
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
41-
import static org.apache.dubbo.common.constants.RpcConstants.MERGER_KEY;
41+
import static org.apache.dubbo.rpc.Constants.MERGER_KEY;
4242
import static org.junit.jupiter.api.Assertions.assertEquals;
4343
import static org.mockito.BDDMockito.given;
4444
import static org.mockito.Mockito.mock;

dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterInvokerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import java.util.Arrays;
3939
import java.util.List;
4040

41-
import static org.apache.dubbo.common.constants.RpcConstants.MOCK_KEY;
41+
import static org.apache.dubbo.rpc.Constants.MOCK_KEY;
4242

4343
public class MockClusterInvokerTest {
4444

dubbo-common/src/main/java/org/apache/dubbo/common/constants/RpcConstants.java

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,11 @@
2121
* RpcConstants
2222
*/
2323
public interface RpcConstants {
24-
// BEGIN dubbo-rpc-hessian
25-
String HESSIAN2_REQUEST_KEY = "hessian2.request";
26-
27-
boolean DEFAULT_HESSIAN2_REQUEST = false;
28-
29-
String HESSIAN_OVERLOAD_METHOD_KEY = "hessian.overload.method";
30-
31-
boolean DEFAULT_HESSIAN_OVERLOAD_METHOD = false;
32-
33-
String DEFAULT_HTTP_CLIENT = "jdk";
34-
35-
String DEFAULT_HTTP_SERVER = "servlet";
36-
37-
String DEFAULT_HTTP_SERIALIZATION = "json";
38-
// END dubbo-rpc-hessian
39-
40-
// BEGIN dubbo-rpc-dubbo
41-
String SHARE_CONNECTIONS_KEY = "shareconnections";
42-
43-
/**
44-
* By default, a consumer JVM instance and a provider JVM instance share a long TCP connection (except when connections are set),
45-
* which can set the number of long TCP connections shared to avoid the bottleneck of sharing a single long TCP connection.
46-
*/
47-
String DEFAULT_SHARE_CONNECTIONS = "1";
4824

4925
String INPUT_KEY = "input";
5026

5127
String OUTPUT_KEY = "output";
5228

53-
String DECODE_IN_IO_THREAD_KEY = "decode.in.io";
54-
55-
boolean DEFAULT_DECODE_IN_IO_THREAD = true;
56-
57-
/**
58-
* callback inst id
59-
*/
60-
String CALLBACK_SERVICE_KEY = "callback.service.instid";
61-
6229
/**
6330
* The limit of callback service instances for one interface on every client
6431
*/
@@ -71,125 +38,10 @@ public interface RpcConstants {
7138
*/
7239
int DEFAULT_CALLBACK_INSTANCES = 1;
7340

74-
String CALLBACK_SERVICE_PROXY_KEY = "callback.service.proxy";
75-
76-
String IS_CALLBACK_SERVICE = "is_callback_service";
77-
78-
/**
79-
* Invokers in channel's callback
80-
*/
81-
String CHANNEL_CALLBACK_KEY = "channel.callback.invokers.key";
82-
83-
/**
84-
* The initial state for lazy connection
85-
*/
86-
String LAZY_CONNECT_INITIAL_STATE_KEY = "connect.lazy.initial.state";
87-
88-
/**
89-
* The default value of lazy connection's initial state: true
90-
*
91-
* @see #LAZY_CONNECT_INITIAL_STATE_KEY
92-
*/
93-
boolean DEFAULT_LAZY_CONNECT_INITIAL_STATE = true;
94-
95-
String OPTIMIZER_KEY = "optimizer";
96-
// END dubbo-rpc-dubbo
97-
98-
99-
// BEGIN dubbo-rpc-api
10041
String DUBBO_VERSION_KEY = "dubbo";
10142

102-
String LOCAL_KEY = "local";
103-
104-
String STUB_KEY = "stub";
105-
106-
String MOCK_KEY = "mock";
107-
108-
String DEPRECATED_KEY = "deprecated";
109-
11043
String $INVOKE = "$invoke";
11144

112-
String $ECHO = "$echo";
113-
114-
String RETURN_PREFIX = "return ";
115-
116-
String THROW_PREFIX = "throw";
117-
118-
String FAIL_PREFIX = "fail:";
119-
120-
String FORCE_PREFIX = "force:";
121-
122-
String MERGER_KEY = "merger";
123-
124-
String IS_SERVER_KEY = "isserver";
125-
126-
String FORCE_USE_TAG = "dubbo.force.tag";
127-
128-
String GENERIC_SERIALIZATION_NATIVE_JAVA = "nativejava";
129-
130-
String GENERIC_SERIALIZATION_DEFAULT = "true";
131-
132-
String GENERIC_SERIALIZATION_BEAN = "bean";
133-
134-
String GENERIC_SERIALIZATION_PROTOBUF = "protobuf-json";
135-
136-
String TPS_LIMIT_RATE_KEY = "tps";
137-
138-
String TPS_LIMIT_INTERVAL_KEY = "tps.interval";
139-
140-
long DEFAULT_TPS_LIMIT_INTERVAL = 60 * 1000;
141-
142-
String AUTO_ATTACH_INVOCATIONID_KEY = "invocationid.autoattach";
143-
144-
String STUB_EVENT_KEY = "dubbo.stub.event";
145-
146-
boolean DEFAULT_STUB_EVENT = false;
147-
148-
String STUB_EVENT_METHODS_KEY = "dubbo.stub.event.methods";
149-
150-
String PROXY_KEY = "proxy";
151-
152-
String EXECUTES_KEY = "executes";
153-
154-
String REFERENCE_FILTER_KEY = "reference.filter";
155-
156-
String INVOKER_LISTENER_KEY = "invoker.listener";
157-
158-
String SERVICE_FILTER_KEY = "service.filter";
159-
160-
String EXPORTER_LISTENER_KEY = "exporter.listener";
161-
162-
String ACCESS_LOG_KEY = "accesslog";
163-
164-
String ACTIVES_KEY = "actives";
165-
16645
String CONNECTIONS_KEY = "connections";
16746

168-
String ID_KEY = "id";
169-
170-
String ASYNC_KEY = "async";
171-
172-
String FUTURE_GENERATED_KEY = "future_generated";
173-
174-
String FUTURE_RETURNTYPE_KEY = "future_returntype";
175-
176-
String RETURN_KEY = "return";
177-
178-
String TOKEN_KEY = "token";
179-
180-
String INTERFACES = "interfaces";
181-
182-
String GENERIC_KEY = "generic";
183-
184-
String LOCAL_PROTOCOL = "injvm";
185-
// END dubbo-rpc-api
186-
187-
188-
// BEGIN dubbo-rpc-rest
189-
String KEEP_ALIVE_KEY = "keepalive";
190-
191-
boolean DEFAULT_KEEP_ALIVE = true;
192-
193-
String EXTENSION_KEY = "extension";
194-
// END dubbo-rpc-rest
19547
}

dubbo-compatible/src/test/java/org/apache/dubbo/filter/LegacyInvocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
2929
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
3030
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
31-
import static org.apache.dubbo.common.constants.RpcConstants.TOKEN_KEY;
31+
import static org.apache.dubbo.rpc.Constants.TOKEN_KEY;
3232

3333
/**
3434
* MockInvocation.java

dubbo-compatible/src/test/java/org/apache/dubbo/service/MockInvocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
2828
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
2929
import static org.apache.dubbo.common.constants.RpcConstants.DUBBO_VERSION_KEY;
30-
import static org.apache.dubbo.common.constants.RpcConstants.TOKEN_KEY;
30+
import static org.apache.dubbo.rpc.Constants.TOKEN_KEY;
3131

3232
/**
3333
* MockInvocation.java

0 commit comments

Comments
 (0)