@Override public void startProductConsumption(Object object) { if (object instanceof Entity) { String entityType = ((Entity) object).type(); AtomicLong counter = counters.get(entityType); if (counter == null) { counter = new AtomicLong(0); counters.put(entityType, counter); } long counterValue = counter.incrementAndGet(); if (limit == null || counterValue <= limit) out.println(compositeFormatter.render(entityType + '[', (Entity) object, "]")); else out.print("."); } else { out.println(plainConverter.convert(object)); } }
@Override public void setTimestampPattern(String timestampPattern) { super.setTimestampPattern(timestampPattern); compositeFormatter.setTimestampPattern(timestampPattern); }
@Override public void setDatePattern(String datePattern) { super.setDatePattern(datePattern); compositeFormatter.setDatePattern(datePattern); }