Skip to content

Commit

Permalink
[ISSUE apache#980]Made some fileds are final
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzwei committed Jul 12, 2022
1 parent 42ffaeb commit ed32988
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,44 +129,44 @@ private String get(String key, Supplier<String> defaultValueSupplier) {
}

static class ConfKeys {
public static String KEYS_EVENTMESH_ENV = "eventMesh.server.env";
public static final String KEYS_EVENTMESH_ENV = "eventMesh.server.env";

public static String KEYS_EVENTMESH_IDC = "eventMesh.server.idc";
public static final String KEYS_EVENTMESH_IDC = "eventMesh.server.idc";

public static String KEYS_EVENTMESH_SYSID = "eventMesh.sysid";
public static final String KEYS_EVENTMESH_SYSID = "eventMesh.sysid";

public static String KEYS_EVENTMESH_SERVER_CLUSTER = "eventMesh.server.cluster";
public static final String KEYS_EVENTMESH_SERVER_CLUSTER = "eventMesh.server.cluster";

public static String KEYS_EVENTMESH_SERVER_NAME = "eventMesh.server.name";
public static final String KEYS_EVENTMESH_SERVER_NAME = "eventMesh.server.name";

public static String KEYS_EVENTMESH_SERVER_HOST_IP = "eventMesh.server.hostIp";
public static final String KEYS_EVENTMESH_SERVER_HOST_IP = "eventMesh.server.hostIp";

public static String KEYS_EVENTMESH_SERVER_REGISTER_INTERVAL =
public static final String KEYS_EVENTMESH_SERVER_REGISTER_INTERVAL =
"eventMesh.server.registry.registerIntervalInMills";

public static String KEYS_EVENTMESH_SERVER_FETCH_REGISTRY_ADDR_INTERVAL =
public static final String KEYS_EVENTMESH_SERVER_FETCH_REGISTRY_ADDR_INTERVAL =
"eventMesh.server.registry.fetchRegistryAddrIntervalInMills";

public static String KEYS_ENENTMESH_CONNECTOR_PLUGIN_TYPE = "eventMesh.connector.plugin.type";
public static final String KEYS_ENENTMESH_CONNECTOR_PLUGIN_TYPE = "eventMesh.connector.plugin.type";

public static String KEYS_EVENTMESH_SECURITY_ENABLED = "eventMesh.server.security.enabled";
public static final String KEYS_EVENTMESH_SECURITY_ENABLED = "eventMesh.server.security.enabled";

public static String KEYS_ENENTMESH_SECURITY_PLUGIN_TYPE = "eventMesh.security.plugin.type";
public static final String KEYS_ENENTMESH_SECURITY_PLUGIN_TYPE = "eventMesh.security.plugin.type";

public static String KEYS_EVENTMESH_REGISTRY_ENABLED = "eventMesh.registry.plugin.enabled";
public static final String KEYS_EVENTMESH_REGISTRY_ENABLED = "eventMesh.registry.plugin.enabled";

public static String KEYS_ENENTMESH_REGISTRY_PLUGIN_TYPE = "eventMesh.registry.plugin.type";
public static final String KEYS_ENENTMESH_REGISTRY_PLUGIN_TYPE = "eventMesh.registry.plugin.type";

public static String KEYS_EVENTMESH_REGISTRY_PULGIN_SERVER_ADDR = "eventMesh.registry.plugin.server-addr";
public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_SERVER_ADDR = "eventMesh.registry.plugin.server-addr";

public static String KEYS_EVENTMESH_REGISTRY_PULGIN_USERNAME = "eventMesh.registry.plugin.username";
public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_USERNAME = "eventMesh.registry.plugin.username";

public static String KEYS_EVENTMESH_REGISTRY_PULGIN_PASSWORD = "eventMesh.registry.plugin.password";
public static final String KEYS_EVENTMESH_REGISTRY_PULGIN_PASSWORD = "eventMesh.registry.plugin.password";

public static String KEYS_EVENTMESH_METRICS_PLUGIN_TYPE = "eventMesh.metrics.plugin";
public static final String KEYS_EVENTMESH_METRICS_PLUGIN_TYPE = "eventMesh.metrics.plugin";

public static String KEYS_EVENTMESH_TRACE_ENABLED = "eventMesh.server.trace.enabled";
public static final String KEYS_EVENTMESH_TRACE_ENABLED = "eventMesh.server.trace.enabled";

public static String KEYS_EVENTMESH_TRACE_PLUGIN_TYPE = "eventMesh.trace.plugin";
public static final String KEYS_EVENTMESH_TRACE_PLUGIN_TYPE = "eventMesh.trace.plugin";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public class Codec {
private static final byte[] VERSION = serializeBytes("0000");

// todo: move to constants
public static String CLOUD_EVENTS_PROTOCOL_NAME = "cloudevents";
public static String EM_MESSAGE_PROTOCOL_NAME = "eventmeshmessage";
public static String OPEN_MESSAGE_PROTOCOL_NAME = "openmessage";
public static final String CLOUD_EVENTS_PROTOCOL_NAME = "cloudevents";
public static final String EM_MESSAGE_PROTOCOL_NAME = "eventmeshmessage";
public static final String OPEN_MESSAGE_PROTOCOL_NAME = "openmessage";

// todo: use json util
private static ObjectMapper OBJECT_MAPPER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,46 +155,46 @@ public void init() {

static class ConfKeys {

public static String KEYS_EVENTMESH_ROCKETMQ_NAMESRV_ADDR = "eventMesh.server.rocketmq.namesrvAddr";
public static final String KEYS_EVENTMESH_ROCKETMQ_NAMESRV_ADDR = "eventMesh.server.rocketmq.namesrvAddr";

public static String KEYS_EVENTMESH_ROCKETMQ_USERNAME = "eventMesh.server.rocketmq.username";
public static final String KEYS_EVENTMESH_ROCKETMQ_USERNAME = "eventMesh.server.rocketmq.username";

public static String KEYS_EVENTMESH_ROCKETMQ_PASSWORD = "eventMesh.server.rocketmq.password";
public static final String KEYS_EVENTMESH_ROCKETMQ_PASSWORD = "eventMesh.server.rocketmq.password";

public static String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MIN =
public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MIN =
"eventMesh.server.rocketmq.client.consumeThreadMin";

public static String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MAX =
public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_MAX =
"eventMesh.server.rocketmq.client.consumeThreadMax";

public static String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_QUEUESIZE =
public static final String KEYS_EVENTMESH_ROCKETMQ_CONSUME_THREADPOOL_QUEUESIZE =
"eventMesh.server.rocketmq.client.consumeThreadPoolQueueSize";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_ACK_WINDOW = "eventMesh.server.rocketmq.client.ackwindow";
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_ACK_WINDOW = "eventMesh.server.rocketmq.client.ackwindow";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PUB_WINDOW = "eventMesh.server.rocketmq.client.pubwindow";
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PUB_WINDOW = "eventMesh.server.rocketmq.client.pubwindow";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_CONSUME_TIMEOUT =
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_CONSUME_TIMEOUT =
"eventMesh.server.rocketmq.client.comsumeTimeoutInMin";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PULL_BATCHSIZE =
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_PULL_BATCHSIZE =
"eventMesh.server.rocketmq.client.pullBatchSize";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_POLL_NAMESRV_INTERVAL =
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_POLL_NAMESRV_INTERVAL =
"eventMesh.server.rocketmq.client.pollNameServerInterval";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_HEARTBEAT_BROKER_INTERVAL =
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_HEARTBEAT_BROKER_INTERVAL =
"eventMesh.server.rocketmq.client.heartbeatBrokerInterval";

public static String KEYS_EVENTMESH_ROCKETMQ_CLIENT_REBALANCE_INTERVAL =
public static final String KEYS_EVENTMESH_ROCKETMQ_CLIENT_REBALANCE_INTERVAL =
"eventMesh.server.rocketmq.client.rebalanceInterval";

public static String KEYS_EVENTMESH_ROCKETMQ_CLUSTER = "eventMesh.server.rocketmq.cluster";
public static final String KEYS_EVENTMESH_ROCKETMQ_CLUSTER = "eventMesh.server.rocketmq.cluster";

public static String KEYS_EVENTMESH_ROCKETMQ_ACCESS_KEY =
public static final String KEYS_EVENTMESH_ROCKETMQ_ACCESS_KEY =
"eventMesh.server.rocketmq.accessKey";

public static String KEYS_EVENTMESH_ROCKETMQ_SECRET_KEY =
public static final String KEYS_EVENTMESH_ROCKETMQ_SECRET_KEY =
"eventMesh.server.rocketmq.secretKey";

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class CloudEventsPublishInstance {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class CloudEventsRequestInstance {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class AsyncPublishBroadcast {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class AsyncPublishInstance {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class RequestReplyInstance {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
public class AsyncPublishInstance {

// This messageSize is also used in SubService.java (Subscriber)
public static int messageSize = 5;
public static final int messageSize = 5;

public static void main(String[] args) throws Exception {
Properties properties = Utils.readPropertiesFile(ExampleConstants.CONFIG_FILE_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,50 +208,50 @@ public void init() {

static class ConfKeys {

public static String KEYS_EVENTMESH_SERVER_GRPC_PORT = "eventMesh.server.grpc.port";
public static final String KEYS_EVENTMESH_SERVER_GRPC_PORT = "eventMesh.server.grpc.port";

public static String KEYS_EVENTMESH_SERVER_SESSION_EXPIRED_TIME = "eventMesh.server.session.expiredInMills";
public static final String KEYS_EVENTMESH_SERVER_SESSION_EXPIRED_TIME = "eventMesh.server.session.expiredInMills";

public static String KEYS_EVENTMESH_BATCHMSG_THREAD_NUM = "eventMesh.server.batchmsg.threads.num";
public static final String KEYS_EVENTMESH_BATCHMSG_THREAD_NUM = "eventMesh.server.batchmsg.threads.num";

public static String KEYS_EVENTMESH_BATCHMSG_REQ_NUM_PER_SECOND = "eventMesh.server.batchmsg.reqNumPerSecond";
public static final String KEYS_EVENTMESH_BATCHMSG_REQ_NUM_PER_SECOND = "eventMesh.server.batchmsg.reqNumPerSecond";

public static String KEYS_EVENTMESH_BATCHMSG_BATCH_ENABLED = "eventMesh.server.batchmsg.batch.enabled";
public static final String KEYS_EVENTMESH_BATCHMSG_BATCH_ENABLED = "eventMesh.server.batchmsg.batch.enabled";

public static String KEYS_EVENTMESH_ASYNC_ACCUMULATION_THRESHOLD = "eventMesh.server.async.accumulation.threshold";
public static final String KEYS_EVENTMESH_ASYNC_ACCUMULATION_THRESHOLD = "eventMesh.server.async.accumulation.threshold";

public static String KEY_EVENTMESH_BUSY_CHECK_INTERVAL = "eventMesh.server.busy.check.interval";
public static final String KEY_EVENTMESH_BUSY_CHECK_INTERVAL = "eventMesh.server.busy.check.interval";

public static String KEYS_EVENTMESH_SENDMSG_THREAD_NUM = "eventMesh.server.sendmsg.threads.num";
public static final String KEYS_EVENTMESH_SENDMSG_THREAD_NUM = "eventMesh.server.sendmsg.threads.num";

public static String KEYS_EVENTMESH_REPLYMSG_THREAD_NUM = "eventMesh.server.replymsg.threads.num";
public static final String KEYS_EVENTMESH_REPLYMSG_THREAD_NUM = "eventMesh.server.replymsg.threads.num";

public static String KEYS_EVENTMESH_PUSHMSG_THREAD_NUM = "eventMesh.server.pushmsg.threads.num";
public static final String KEYS_EVENTMESH_PUSHMSG_THREAD_NUM = "eventMesh.server.pushmsg.threads.num";

public static String KEYS_EVENTMESH_REGISTRY_THREAD_NUM = "eventMesh.server.registry.threads.num";
public static final String KEYS_EVENTMESH_REGISTRY_THREAD_NUM = "eventMesh.server.registry.threads.num";

public static String KEYS_EVENTMESH_CLIENTMANAGE_THREAD_NUM = "eventMesh.server.clientmanage.threads.num";
public static final String KEYS_EVENTMESH_CLIENTMANAGE_THREAD_NUM = "eventMesh.server.clientmanage.threads.num";

public static String KEYS_EVENTMESH_ADMIN_THREAD_NUM = "eventMesh.server.admin.threads.num";
public static final String KEYS_EVENTMESH_ADMIN_THREAD_NUM = "eventMesh.server.admin.threads.num";

public static String KEY_EVENTMESH_RETRY_THREAD_NUM = "eventMesh.server.retry.threads.num";
public static final String KEY_EVENTMESH_RETRY_THREAD_NUM = "eventMesh.server.retry.threads.num";

public static String KEYS_EVENTMESH_PULL_REGISTRY_INTERVAL = "eventMesh.server.pull.registry.interval";
public static final String KEYS_EVENTMESH_PULL_REGISTRY_INTERVAL = "eventMesh.server.pull.registry.interval";

public static String KEY_EVENTMESH_RETRY_BLOCKQ_SIZE = "eventMesh.server.retry.blockQ.size";
public static final String KEY_EVENTMESH_RETRY_BLOCKQ_SIZE = "eventMesh.server.retry.blockQ.size";

public static String KEY_EVENTMESH_BATCHMSG_BLOCKQ_SIZE = "eventMesh.server.batchmsg.blockQ.size";
public static final String KEY_EVENTMESH_BATCHMSG_BLOCKQ_SIZE = "eventMesh.server.batchmsg.blockQ.size";

public static String KEY_EVENTMESH_SENDMSG_BLOCKQ_SIZE = "eventMesh.server.sendmsg.blockQ.size";
public static final String KEY_EVENTMESH_SENDMSG_BLOCKQ_SIZE = "eventMesh.server.sendmsg.blockQ.size";

public static String KEY_EVENTMESH_PUSHMSG_BLOCKQ_SIZE = "eventMesh.server.pushmsg.blockQ.size";
public static final String KEY_EVENTMESH_PUSHMSG_BLOCKQ_SIZE = "eventMesh.server.pushmsg.blockQ.size";

public static String KEY_EVENTMESH_CLIENTM_BLOCKQ_SIZE = "eventMesh.server.clientM.blockQ.size";
public static final String KEY_EVENTMESH_CLIENTM_BLOCKQ_SIZE = "eventMesh.server.clientM.blockQ.size";

public static String KEY_EVENTMESH_CONSUMER_ENABLED = "eventMesh.server.consumer.enabled";
public static final String KEY_EVENTMESH_CONSUMER_ENABLED = "eventMesh.server.consumer.enabled";

public static String KEY_EVENTMESH_TLS_ENABLED = "eventMesh.server.useTls.enabled";
public static final String KEY_EVENTMESH_TLS_ENABLED = "eventMesh.server.useTls.enabled";

public static String KEY_EVENTMESH_SERVER_MSG_REQ_NUM_PER_SECOND = "eventMesh.server.http.msgReqnumPerSecond";
public static final String KEY_EVENTMESH_SERVER_MSG_REQ_NUM_PER_SECOND = "eventMesh.server.http.msgReqnumPerSecond";
}
}
Loading

0 comments on commit ed32988

Please sign in to comment.