use of com.navercorp.pinpoint.common.server.bo.AgentLifeCycleBo in project pinpoint by naver.
the class AgentLifeCycleMapper method createAgentLifeCycleBo.
private AgentLifeCycleBo createAgentLifeCycleBo(Cell valueCell) {
if (valueCell == null) {
return null;
}
byte[] value = CellUtil.cloneValue(valueCell);
final Buffer buffer = new FixedBuffer(value);
final int version = buffer.readInt();
switch(version) {
case 0:
final String agentId = buffer.readPrefixedString();
final long startTimestamp = buffer.readLong();
final long eventTimestamp = buffer.readLong();
final long eventIdentifier = buffer.readLong();
final AgentLifeCycleState agentLifeCycleState = AgentLifeCycleState.getStateByCode(buffer.readShort());
final AgentLifeCycleBo agentLifeCycleBo = new AgentLifeCycleBo(agentId, startTimestamp, eventTimestamp, eventIdentifier, agentLifeCycleState);
return agentLifeCycleBo;
default:
return null;
}
}
Aggregations