int tenantId = tenant.getId();
long incomingBw = getOldIncomingRegistryBandwidth(yearMonth, tenantId);
long outgoingBw = getOldOutgoingRegistryBandwidth(yearMonth, tenantId);
if (incomingBw != 0) {
meteringAgent.persistUsage(tenantId, yearMonth,
UsageConstants.REGISTRY_INCOMING_BW, incomingBw + "");
}
if (outgoingBw != 0) {
meteringAgent.persistUsage(tenantId, yearMonth,
UsageConstants.REGISTRY_OUTGOING_BW, outgoingBw + "");