public void incrementRenewedTokens(String tenant){
  logger.trace("Incrementing renewed tokens for tenant: {}",tenant);
  try {
    AtomicInteger count;
synchronized (this) {
      if ((count=renewedTokensMap.get(tenant)) == null) {
        renewedTokensMap.put(tenant,new AtomicInteger(1));
      }
 else {
        count.incrementAndGet();
      }
    }
    logger.trace("Tokens renewed for tenant: {} is- {}",tenant,renewedTokensMap.get(tenant));
    incrementTotalRenewed();
  }
 catch (  Exception e) {
    logger.error("Unable to increment renewed tokens",e);
  }
}

public void incrementRenewedTokens ( String tenant ) { logger . trace ( "Incrementing renewed tokens for tenant: {}" , tenant ) ; try { AtomicInteger count ; synchronized ( this ) { if ( ( count = renewedTokensMap . get ( tenant ) ) == null ) { renewedTokensMap . put ( tenant , new AtomicInteger ( 1 ) ) ; } else { count . incrementAndGet ( ) ; } } logger . trace ( "Tokens renewed for tenant: {} is- {}" , tenant , renewedTokensMap . get ( tenant ) ) ; incrementTotalRenewed ( ) ; } catch ( Exception e ) { logger . error ( "Unable to increment renewed tokens" , e ) ; } }
this will increment the total tokens renewed for a given tenant whenever any token is renewed from idm and sts .
