AtomicInteger count = customTypeCounter.get(order.getCustomerType()); if (count == null) { count = new AtomicInteger(0); customTypeCounter.put(order.getCustomerType(), count); } count.incrementAndGet(); if (count.get() < 30) { result.add(order); }
转载于:https://www.cnblogs.com/lambertwe/p/5395139.html