use of com.navercorp.pinpoint.common.buffer.AutomaticBuffer in project pinpoint by naver.
the class AnnotationTranscoder method encodeIntBooleanIntBooleanValue.
private byte[] encodeIntBooleanIntBooleanValue(Object o) {
final IntBooleanIntBooleanValue value = (IntBooleanIntBooleanValue) o;
// int + int
final Buffer buffer = new AutomaticBuffer(8);
buffer.putVInt(value.getIntValue1());
buffer.putBoolean(value.isBooleanValue1());
buffer.putVInt(value.getIntValue2());
buffer.putBoolean(value.isBooleanValue2());
return buffer.getBuffer();
}
use of com.navercorp.pinpoint.common.buffer.AutomaticBuffer in project pinpoint by naver.
the class TransactionIdUtilsTest method writeTransactionId_for_compatibility.
private static ByteBuffer writeTransactionId_for_compatibility(String agentId, long agentStartTime, long transactionSequence) {
final Buffer buffer = new AutomaticBuffer(1 + 5 + 24 + 10 + 10);
buffer.putByte(TransactionIdUtils.VERSION);
buffer.putPrefixedString(agentId);
buffer.putVLong(agentStartTime);
buffer.putVLong(transactionSequence);
return buffer.wrapByteBuffer();
}
use of com.navercorp.pinpoint.common.buffer.AutomaticBuffer in project pinpoint by naver.
the class AgentStatEncoder method encodeValue.
public ByteBuffer encodeValue(List<T> agentStatDataPoints) {
Buffer valueBuffer = new AutomaticBuffer();
valueBuffer.putByte(this.codec.getVersion());
codec.encodeValues(valueBuffer, agentStatDataPoints);
return valueBuffer.wrapByteBuffer();
}
use of com.navercorp.pinpoint.common.buffer.AutomaticBuffer in project pinpoint by naver.
the class ServerMetaDataBo method writeValue.
public byte[] writeValue() {
final Buffer buffer = new AutomaticBuffer();
buffer.put2PrefixedString(this.serverInfo);
final int numVmArgs = this.vmArgs == null ? 0 : this.vmArgs.size();
buffer.putVInt(numVmArgs);
if (this.vmArgs != null) {
for (String vmArg : this.vmArgs) {
buffer.put2PrefixedString(vmArg);
}
}
final int numServiceInfos = this.serviceInfos == null ? 0 : this.serviceInfos.size();
buffer.putVInt(numServiceInfos);
if (this.serviceInfos != null) {
for (ServiceInfoBo serviceInfo : this.serviceInfos) {
buffer.putPrefixedBytes(serviceInfo.writeValue());
}
}
return buffer.getBuffer();
}
use of com.navercorp.pinpoint.common.buffer.AutomaticBuffer in project pinpoint by naver.
the class AgentInfoBo method writeValue.
public byte[] writeValue() {
final Buffer buffer = new AutomaticBuffer();
buffer.putPrefixedString(this.getHostName());
buffer.putPrefixedString(this.getIp());
buffer.putPrefixedString(this.getPorts());
buffer.putPrefixedString(this.getApplicationName());
buffer.putShort(this.getServiceTypeCode());
buffer.putInt(this.getPid());
buffer.putPrefixedString(this.getAgentVersion());
buffer.putLong(this.getStartTime());
buffer.putLong(this.getEndTimeStamp());
buffer.putInt(this.getEndStatus());
buffer.putPrefixedString(this.getVmVersion());
buffer.putBoolean(this.isContainer());
buffer.putPrefixedString(this.getAgentName());
return buffer.getBuffer();
}
Aggregations