Skip to content

Commit 38e7367

Browse files
author
Chris Wiechmann
committed
More logging around caching
1 parent 422ce3d commit 38e7367

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

modules/apim-adapter/src/main/java/com/axway/apim/adapter/apis/APIManagerAPIAdapter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,11 @@ private void addQuotaConfiguration(API api, boolean addQuota) throws AppExceptio
427427
private void addExistingClientAppQuotas(API api, boolean addQuota) throws AppException {
428428
if(!addQuota || !APIManagerAdapter.hasAdminAccount()) return;
429429
if(api.getApplications()==null || api.getApplications().size()==0) return;
430-
LOG.debug("Loading application quota for " + api.getApplications().size()+ " subscribed applications.");
430+
if(api.getApplications().size()>1000) {
431+
LOG.info("Loading application quotas for " + api.getApplications().size()+ " subscribed applications. This might take a few minutes ...");
432+
} else {
433+
LOG.info("Loading application quotas for " + api.getApplications().size()+ " subscribed applications.");
434+
}
431435
for(ClientApplication app : api.getApplications()) {
432436
APIQuota appQuota = APIManagerAdapter.getInstance().quotaAdapter.getQuota(app.getId(), null, true, true);
433437
app.setAppQuota(appQuota);

modules/apim-adapter/src/main/java/com/axway/apim/adapter/apis/APIManagerQuotaAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ private void readQuotaFromAPIManager(String quotaId) throws AppException {
8484
uri = new URIBuilder(cmd.getAPIManagerURL()).setPath(cmd.getApiBasepath() + "/quotas/"+quotaId).build();
8585
} else {
8686
if(applicationsQuotaCache.containsKey(quotaId)) {
87+
LOG.debug("Found quota with ID: " + quotaId + " in cache: " + applicationsQuotaCache.get(quotaId));
8788
this.apiManagerResponse.put(quotaId, applicationsQuotaCache.get(quotaId));
8889
return;
8990
}

0 commit comments

Comments
 (0)