use of com.navercorp.pinpoint.thrift.dto.TStringMetaData in project pinpoint by naver.
the class TestTcpDataSender method addData.
private void addData(TBase<?, ?> data) {
if (data instanceof TApiMetaData) {
TApiMetaData md = (TApiMetaData) data;
final String javaMethodDescriptor = toJavaMethodDescriptor(md);
apiIdMap.put(md.getApiId(), javaMethodDescriptor);
} else if (data instanceof TSqlMetaData) {
TSqlMetaData md = (TSqlMetaData) data;
int id = md.getSqlId();
String sql = md.getSql();
sqlIdMap.put(id, sql);
} else if (data instanceof TStringMetaData) {
TStringMetaData md = (TStringMetaData) data;
int id = md.getStringId();
String string = md.getStringValue();
stringIdMap.put(id, string);
}
datas.add(data);
}
use of com.navercorp.pinpoint.thrift.dto.TStringMetaData in project pinpoint by naver.
the class DefaultStringMetaDataService method cacheString.
@Override
public int cacheString(final String value) {
if (value == null) {
return 0;
}
final Result result = this.stringCache.put(value);
if (result.isNewValue()) {
final TStringMetaData stringMetaData = new TStringMetaData();
stringMetaData.setAgentId(agentId);
stringMetaData.setAgentStartTime(agentStartTime);
stringMetaData.setStringId(result.getId());
stringMetaData.setStringValue(value);
this.enhancedDataSender.request(stringMetaData);
}
return result.getId();
}
Aggregations