use of com.navercorp.pinpoint.rpc.PinpointSocket in project pinpoint by naver.
the class CollectorClusterConnector method connect.
PinpointSocket connect(Address address) {
Objects.requireNonNull(clientFactory, "not started.");
Objects.requireNonNull(address, "address");
ClusterAddressProvider clusterAddressProvider = new ClusterAddressProvider(address);
PinpointSocket socket = ClientFactoryUtils.createPinpointClient(clusterAddressProvider, clientFactory);
return socket;
}
use of com.navercorp.pinpoint.rpc.PinpointSocket in project pinpoint by naver.
the class ClusterManager method getSocket.
public List<PinpointSocket> getSocket(String applicationName, String agentId, long startTimeStamp) {
if (!isEnabled()) {
return Collections.emptyList();
}
List<String> clusterIdList = clusterDataManager.getRegisteredAgentList(applicationName, agentId, startTimeStamp);
if (clusterIdList.isEmpty()) {
logger.warn("{}/{}/{} couldn't find agent.", applicationName, agentId, startTimeStamp);
return Collections.emptyList();
} else if (clusterIdList.size() > 1) {
logger.warn("{}/{}/{} found duplicate agent {}.", applicationName, agentId, startTimeStamp, clusterIdList);
}
List<PinpointSocket> pinpointSocketList = new ArrayList<>(clusterIdList.size());
for (String clusterId : clusterIdList) {
PinpointSocket pinpointSocket = clusterConnectionManager.getSocket(clusterId);
pinpointSocketList.add(pinpointSocket);
}
return pinpointSocketList;
}
Aggregations