public AgentStatusRepresentation create(AgentStatus status) { Builder<SlotStatusRepresentation> builder = ImmutableList.builder(); for (SlotStatus slot : status.getSlotStatuses()) { builder.add(SlotStatusRepresentation.from(slot, Integer.MAX_VALUE, repository)); } return new AgentStatusRepresentation( status.getAgentId(), safeTruncate(status.getAgentId(), shortIdPrefixSize), status.getInstanceId(), status.getState(), status.getInternalUri(), status.getExternalUri(), status.getLocation(), trimLeadingSegments(status.getLocation(), '/', commonLocationParts), status.getInstanceType(), builder.build(), status.getResources(), status.getVersion()); } }
public CoordinatorStatusRepresentation create(CoordinatorStatus status) { return new CoordinatorStatusRepresentation( status.getCoordinatorId(), safeTruncate(status.getCoordinatorId(), shortIdPrefixSize), status.getInstanceId(), status.getState(), status.getInternalUri(), status.getExternalUri(), status.getLocation(), trimLeadingSegments(status.getLocation(), '/', commonLocationParts), status.getInstanceType(), status.getVersion()); } }
safeTruncate(slotStatus.getId().toString(), shortIdPrefixSize), slotStatus.getSelf(), slotStatus.getExternalUri(),
safeTruncate(status.getId().toString(), shortIdPrefixSize), status.getSelf(), status.getExternalUri(),