long size = (long) current.getSize(); long capacity = (long) current.getCapacity(); long maxSize = (long) current.getMaximumSize(); long maxCapacity = (long) current.getMaximumCapacity();
    protected void updateInstanceStats(InstanceStats current) {      // update the entry      current.update();      String agent = current.getAgentName();      long size = (long) current.getSize();      long capacity = (long) current.getCapacity();      long maxSize = (long) current.getMaximumSize();      long maxCapacity = (long) current.getMaximumCapacity();      if (agent != null) {        if (agents == null) {          agents = new AgentsTable();        }        ClassStats cs = agents.get(agent);        if (cs == null) {          cs = newClassStats();          agents.put(agent, cs);        }        // We could increment a counter every time a collection is created,        // but this would require to lookup the subject information.        cs.allocate(current);        cs.update(size, maxSize, capacity, maxCapacity);      }      overall_stats.update(          size, maxSize, capacity, maxCapacity);    }