Refactor method name.
This commit is contained in:
parent
2901dc2ceb
commit
921d46f2d6
|
|
@ -25,5 +25,5 @@ import org.skywalking.apm.collector.server.Server;
|
|||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface GRPCManagerService extends Service {
|
||||
Server getElseCreateServer(String host, int port);
|
||||
Server getOrCreateIfAbsent(String host, int port);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class GRPCManagerServiceImpl implements GRPCManagerService {
|
|||
this.servers = servers;
|
||||
}
|
||||
|
||||
@Override public Server getElseCreateServer(String host, int port) {
|
||||
@Override public Server getOrCreateIfAbsent(String host, int port) {
|
||||
String id = host + String.valueOf(port);
|
||||
if (servers.containsKey(id)) {
|
||||
return servers.get(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue