if(tenantId<0){
return;
}
if (inferMeasurement(entry).equals(UsageConstants.SERVICE_BANDWIDTH)) {
if (entry.getRequestSize() > 0) {
Util.addToPersistingControllerQueue(new BandwidthUsage(getTenantID(entry.getTenantName()), UsageConstants.SERVICE_INCOMING_BW, entry.getRequestSize()));
}
if (entry.getResponseSize() > 0) {
Util.addToPersistingControllerQueue(new BandwidthUsage(getTenantID(entry.getTenantName()), UsageConstants.SERVICE_OUTGOING_BW, entry.getResponseSize()));
}
} else if (inferMeasurement(entry).equals(UsageConstants.WEBAPP_BANDWIDTH)) {
if (entry.getRequestSize() > 0) {
Util.addToPersistingControllerQueue(new BandwidthUsage(getTenantID(entry.getTenantName()), UsageConstants.WEBAPP_INCOMING_BW, entry.getRequestSize()));
}
if (entry.getResponseSize() > 0) {
Util.addToPersistingControllerQueue(new BandwidthUsage(getTenantID(entry.getTenantName()), UsageConstants.WEBAPP_OUTGOING_BW, entry.getResponseSize()));
}
}
} catch (UserStoreException e) {
log.error("Error persisting bandwidth usage statistics.", e);
}