Skip to content

Commit

Permalink
proxy some optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
loboxu committed Feb 24, 2023
1 parent f1eb88e commit b12641b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.rocketmq.proxy.grpc;

import java.util.concurrent.TimeUnit;
import io.grpc.Server;
import org.apache.rocketmq.common.constant.LoggerName;
import org.apache.rocketmq.logging.org.slf4j.Logger;
import org.apache.rocketmq.logging.org.slf4j.LoggerFactory;
Expand All @@ -26,9 +27,9 @@
public class GrpcServer implements StartAndShutdown {
private static final Logger log = LoggerFactory.getLogger(LoggerName.PROXY_LOGGER_NAME);

private final io.grpc.Server server;
private final Server server;

protected GrpcServer(io.grpc.Server server) {
protected GrpcServer(Server server) {
this.server = server;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ public class GrpcChannelManager implements StartAndShutdown {
public GrpcChannelManager(ProxyRelayService proxyRelayService, GrpcClientSettingsManager grpcClientSettingsManager) {
this.proxyRelayService = proxyRelayService;
this.grpcClientSettingsManager = grpcClientSettingsManager;
this.init();
}

protected void init() {
this.scheduledExecutorService.scheduleAtFixedRate(
this::scanExpireResultFuture,
10, 10, TimeUnit.SECONDS
10, 1, TimeUnit.SECONDS
);
}

Expand Down

0 comments on commit b12641b

Please sign in to comment.